ghc-lib-9.10.1.20240511: The GHC API, decoupled from GHC versions
Safe HaskellIgnore
LanguageGHC2021

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 #

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 #

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 #

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 representation-polymorphic unlifted newtypes have been eta-expanded.

See Note [Eta-expanding rep-poly unlifted newtypes].