TcMatches

ghc-8.6.3: The GHC API

Safe Haskell | None
Language | Haskell2010

TcMatches

# Documentation

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

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

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

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

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

data TcMatchCtxt body #

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) #

type TcExprStmtChecker = TcStmtChecker HsExpr ExpRhoType #

type TcCmdStmtChecker = TcStmtChecker HsCmd TcRhoType #

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

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) #

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

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

tcDoStmt :: TcExprStmtChecker #

tcGuardStmt :: TcExprStmtChecker #