ghc-8.0.2: The GHC API

Safe Haskell | None
Language | Haskell2010

TcMatches

# Documentation

tcMatchesFun :: Name -> MatchGroup Name (LHsExpr Name) -> ExpRhoType -> TcM (HsWrapper, MatchGroup TcId (LHsExpr TcId)) Source #

tcGRHS :: TcMatchCtxt body -> ExpRhoType -> GRHS Name (Located (body Name)) -> TcM (GRHS TcId (Located (body TcId))) Source #

tcGRHSsPat :: GRHSs Name (LHsExpr Name) -> TcRhoType -> TcM (GRHSs TcId (LHsExpr TcId)) Source #

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

tcMatchLambda :: SDoc -> TcMatchCtxt HsExpr -> MatchGroup Name (LHsExpr Name) -> ExpRhoType -> TcM (HsWrapper, [TcSigmaType], MatchGroup TcId (LHsExpr TcId)) Source #

data TcMatchCtxt body Source #

Constructors

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

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

type TcExprStmtChecker = TcStmtChecker HsExpr ExpRhoType Source #

type TcCmdStmtChecker = TcStmtChecker HsCmd TcRhoType Source #

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

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

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

tcBody :: LHsExpr Name -> ExpRhoType -> TcM (LHsExpr TcId) Source #

tcDoStmt :: TcExprStmtChecker Source #

tcGuardStmt :: TcExprStmtChecker Source #