TcMatches

ghc-8.6.4.20190406: The GHC API

Safe Haskell | None
Language | Haskell2010

TcMatches

# Documentation

tcMatchesFun :: Located Name -> MatchGroup GhcRn (LHsExpr GhcRn) -> ExpRhoType -> TcM (HsWrapper, MatchGroup GhcTcId (LHsExpr GhcTcId)) Source #

tcGRHS :: TcMatchCtxt body -> ExpRhoType -> GRHS GhcRn (Located (body GhcRn)) -> TcM (GRHS GhcTcId (Located (body GhcTcId))) Source #

tcGRHSsPat :: GRHSs GhcRn (LHsExpr GhcRn) -> TcRhoType -> TcM (GRHSs GhcTcId (LHsExpr GhcTcId)) Source #

tcMatchesCase :: Outputable (body GhcRn) => TcMatchCtxt body -> TcSigmaType -> MatchGroup GhcRn (Located (body GhcRn)) -> ExpRhoType -> TcM (MatchGroup GhcTcId (Located (body GhcTcId))) Source #

tcMatchLambda :: SDoc -> TcMatchCtxt HsExpr -> MatchGroup GhcRn (LHsExpr GhcRn) -> ExpRhoType -> TcM (MatchGroup GhcTcId (LHsExpr GhcTcId), HsWrapper) Source #

data TcMatchCtxt body Source #

Constructors

MC |
Fields mc_what :: HsMatchContext Name mc_body :: Located (body GhcRn) -> ExpRhoType -> TcM (Located (body GhcTcId))

type TcStmtChecker body rho_type = forall thing. HsStmtContext Name -> Stmt GhcRn (Located (body GhcRn)) -> rho_type -> (rho_type -> TcM thing) -> TcM (Stmt GhcTcId (Located (body GhcTcId)), thing) Source #

type TcExprStmtChecker = TcStmtChecker HsExpr ExpRhoType Source #

type TcCmdStmtChecker = TcStmtChecker HsCmd TcRhoType Source #

tcStmts :: Outputable (body GhcRn) => HsStmtContext Name -> TcStmtChecker body rho_type -> [LStmt GhcRn (Located (body GhcRn))] -> rho_type -> TcM [LStmt GhcTcId (Located (body GhcTcId))] Source #

tcStmtsAndThen :: Outputable (body GhcRn) => HsStmtContext Name -> TcStmtChecker body rho_type -> [LStmt GhcRn (Located (body GhcRn))] -> rho_type -> (rho_type -> TcM thing) -> TcM ([LStmt GhcTcId (Located (body GhcTcId))], thing) Source #

tcDoStmts :: HsStmtContext Name -> Located [LStmt GhcRn (LHsExpr GhcRn)] -> ExpRhoType -> TcM (HsExpr GhcTcId) Source #

tcBody :: LHsExpr GhcRn -> ExpRhoType -> TcM (LHsExpr GhcTcId) Source #

tcDoStmt :: TcExprStmtChecker Source #

tcGuardStmt :: TcExprStmtChecker Source #