ghc-9.10.0.20240426: The GHC API
Safe HaskellNone
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 Source #

data EValArg (p :: TcPass) where Source #

Constructors

ValArg :: forall (p :: TcPass). 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 representation-polymorphic unlifted newtypes have been eta-expanded.

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

addArgWrap :: forall (p :: TcPass). HsWrapper -> [HsExprArg p] -> [HsExprArg p] Source #

isHsValArg :: forall (id :: TcPass). HsExprArg id -> Bool Source #

leadingValArgs :: forall (id :: TcPass). [HsExprArg id] -> [EValArg id] Source #

isVisibleArg :: forall (id :: TcPass). HsExprArg id -> Bool Source #