ghc-9.6.3: The GHC API
Safe HaskellSafe-Inferred
LanguageHaskell2010

GHC.Tc.Gen.Head

Synopsis

Documentation

data HsExprArg (p :: TcPass) Source #

Constructors

EValArg 

Fields

ETypeArg 

Fields

EPrag AppCtxt (HsPragE (GhcPass (XPass p))) 
EWrap EWrap 

Instances

Instances details
OutputableBndrId (XPass p) => Outputable (HsExprArg p) Source # 
Instance details

Defined in GHC.Tc.Gen.Head

Methods

ppr :: HsExprArg p -> SDoc Source #

data EValArg (p :: TcPass) where Source #

Constructors

ValArg :: LHsExpr (GhcPass (XPass p)) -> EValArg p 
ValArgQL 

Fields

Instances

Instances details
OutputableBndrId (XPass p) => Outputable (EValArg p) Source # 
Instance details

Defined in GHC.Tc.Gen.Head

Methods

ppr :: EValArg p -> SDoc Source #

data TcPass Source #

Constructors

TcpRn 
TcpInst 
TcpTc 

data AppCtxt Source #

Instances

Instances details
Outputable AppCtxt Source # 
Instance details

Defined in GHC.Tc.Gen.Head

Methods

ppr :: AppCtxt -> SDoc Source #

rebuildHsApps Source #

Arguments

:: HsExpr GhcTc

the function being applied

-> AppCtxt 
-> [HsExprArg 'TcpTc]

the arguments to the function

-> TcRhoType

result type of the application

-> TcM (HsExpr GhcTc) 

Rebuild an application: takes a type-checked application head expression together with arguments in the form of typechecked HsExprArgs and returns a typechecked application of the head to the arguments.

This performs a representation-polymorphism check to ensure that the remaining value arguments in an application have a fixed RuntimeRep.

See Note [Checking for representation-polymorphic built-ins].

countVisAndInvisValArgs :: [HsExprArg id] -> Arity Source #

Count visible and invisible value arguments in a list of HsExprArg arguments.

countHsWrapperInvisArgs :: HsWrapper -> Arity Source #

Counts the number of invisible term-level arguments applied by an HsWrapper. Precondition: this wrapper contains no abstractions.