ghc-lib-0.20201101: The GHC API, decoupled from GHC versions
Safe HaskellNone
LanguageHaskell2010

GHC.Tc.Gen.Expr

Synopsis

Documentation

tcCheckPolyExpr :: LHsExpr GhcRn -> TcSigmaType -> TcM (LHsExpr GhcTc) Source #

tcCheckPolyExprNC :: LHsExpr GhcRn -> TcSigmaType -> TcM (LHsExpr GhcTc) Source #

tcCheckMonoExpr :: LHsExpr GhcRn -> TcRhoType -> TcM (LHsExpr GhcTc) Source #

tcCheckMonoExprNC :: LHsExpr GhcRn -> TcRhoType -> TcM (LHsExpr GhcTc) Source #

tcMonoExpr :: LHsExpr GhcRn -> ExpRhoType -> TcM (LHsExpr GhcTc) Source #

tcMonoExprNC :: LHsExpr GhcRn -> ExpRhoType -> TcM (LHsExpr GhcTc) Source #

tcInferRho :: LHsExpr GhcRn -> TcM (LHsExpr GhcTc, TcRhoType) Source #

tcInferRhoNC :: LHsExpr GhcRn -> TcM (LHsExpr GhcTc, TcRhoType) Source #

tcExpr :: HsExpr GhcRn -> ExpRhoType -> TcM (HsExpr GhcTc) Source #

tcSyntaxOp Source #

Arguments

:: CtOrigin 
-> SyntaxExprRn 
-> [SyntaxOpType]

shape of syntax operator arguments

-> ExpRhoType

overall result type

-> ([TcSigmaType] -> [Mult] -> TcM a)

Type check any arguments, takes a type per hole and a multiplicity per arrow in the shape.

-> TcM (a, SyntaxExprTc) 

Typecheck a syntax operator The operator is a variable or a lambda at this stage (i.e. renamer output)t

tcSyntaxOpGen :: CtOrigin -> SyntaxExprRn -> [SyntaxOpType] -> SyntaxOpType -> ([TcSigmaType] -> [Mult] -> TcM a) -> TcM (a, SyntaxExprTc) Source #

Slightly more general version of tcSyntaxOp that allows the caller to specify the shape of the result of the syntax operator

tcCheckId :: Name -> ExpRhoType -> TcM (HsExpr GhcTc) Source #

addAmbiguousNameErr :: RdrName -> TcM () Source #

This name really is ambiguous, so add a suitable "ambiguous occurrence" error, then continue

getFixedTyVars :: [FieldLabelString] -> [TyVar] -> [ConLike] -> TyVarSet Source #