Post-Type checking Expression
PostTcExpr is an evidence expression attached to the syntax tree by the type checker (c.f. postTcType).
:: a typeCtrl KGHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27
Moduleghc-9.10.3GHC2021
Abstract Haskell syntax for expressions.
module Language.Haskell.Syntax.Expr
Post-Type checking Expression
PostTcExpr is an evidence expression attached to the syntax tree by the type checker (c.f. postTcType).
Post-Type checking Table
We use a PostTcTable where there are a bunch of pieces of evidence, more than is convenient to keep individually.
The function to use in rebindable syntax. See Note [NoSyntaxExpr].
Data SyntaxExprRnDefined in ghc-9.10.3 · GHC.Hs.Instances · orphanOutputable SyntaxExprRnDefined in ghc-9.10.3 · GHC.Hs.ExprToHie (LocatedA SyntaxExprRn)Defined in ghc-9.10.3 · GHC.Iface.Ext.AstAn expression with wrappers, used for rebindable syntax
This should desugar to
syn_res_wrap $ syn_expr (syn_arg_wraps[0] arg0)
(syn_arg_wraps[1] arg1) ...where the actual arguments come from elsewhere in the AST.
Data SyntaxExprTcDefined in ghc-9.10.3 · GHC.Hs.Instances · orphanOutputable SyntaxExprTcDefined in ghc-9.10.3 · GHC.Hs.ExprToHie (LocatedA SyntaxExprTc)Defined in ghc-9.10.3 · GHC.Iface.Ext.AstThis is used for rebindable-syntax pieces that are too polymorphic for tcSyntaxOp (trS_fmap and the mzip in ParStmt)
Make a 'SyntaxExpr GhcRn' from an expression Used only in getMonadFailOp. See Note [Monad fail : Rebindable syntax, overloaded strings] in GHC.Rename.Expr
Make a SyntaxExpr from a Name (the "rn" is because this is used in the renamer).
Data HsBracketTcDefined in ghc-9.10.3 · GHC.Hs.Instances · orphanPending Type-checker Splice
Data PendingTcSpliceDefined in ghc-9.10.3 · GHC.Hs.Instances · orphanOutputable PendingTcSpliceDefined in ghc-9.10.3 · GHC.Hs.ExprToHie PendingTcSpliceDefined in ghc-9.10.3 · GHC.Iface.Ext.AstPending Renamer Splice
Data PendingRnSpliceDefined in ghc-9.10.3 · GHC.Hs.Instances · orphanOutputable PendingRnSpliceDefined in ghc-9.10.3 · GHC.Hs.ExprToHie PendingRnSpliceDefined in ghc-9.10.3 · GHC.Iface.Ext.AstData EpAnnHsCaseDefined in ghc-9.10.3 · GHC.Hs.ExprNoAnn EpAnnHsCaseDefined in ghc-9.10.3 · GHC.Hs.ExprData EpAnnUnboundVarDefined in ghc-9.10.3 · GHC.Hs.ExprData AnnExplicitSumDefined in ghc-9.10.3 · GHC.Hs.ExprNoAnn AnnExplicitSumDefined in ghc-9.10.3 · GHC.Hs.ExprInformation about the parent of a record update:
the parent type constructor or pattern synonym,
the relevant con-likes,
the field labels.
Data (HsRecUpdParent GhcPs)Defined in ghc-9.10.3 · GHC.Hs.Instances · orphanData (HsRecUpdParent GhcRn)Defined in ghc-9.10.3 · GHC.Hs.Instances · orphanData (HsRecUpdParent GhcTc)Defined in ghc-9.10.3 · GHC.Hs.Instances · orphandata HsRecUpdParent GhcPsDefined in ghc-9.10.3 · GHC.Hs.Exprdata HsRecUpdParent GhcRnDefined in ghc-9.10.3 · GHC.Hs.Exprdata HsRecUpdParent GhcTcTcRecUpdParenttcRecUpdParent :: RecSelParenttcRecUpdLabels :: NonEmpty FieldGlobalRdrElttcRecUpdCons :: UniqSet ConLikeAnnProjectionapOpen :: EpaLocation'('
apClose :: EpaLocation')'
Data AnnProjectionDefined in ghc-9.10.3 · GHC.Hs.ExprNoAnn AnnProjectionDefined in ghc-9.10.3 · GHC.Hs.ExprData AnnFieldLabelDefined in ghc-9.10.3 · GHC.Hs.ExprNoAnn AnnFieldLabelDefined in ghc-9.10.3 · GHC.Hs.ExprData XXExprGhcRnDefined in ghc-9.10.3 · GHC.Hs.Instances · orphanOutputable XXExprGhcRnDefined in ghc-9.10.3 · GHC.Hs.ExprData XXExprGhcTcDefined in ghc-9.10.3 · GHC.Hs.Instances · orphanOutputable XXExprGhcTcDefined in ghc-9.10.3 · GHC.Hs.ExprThe different source constructs that we use to instantiate the "original" field in an `XXExprGhcRn original expansion`
Data HsThingRnDefined in ghc-9.10.3 · GHC.Hs.Instances · orphanOutputable HsThingRnDefined in ghc-9.10.3 · GHC.Hs.ExprWrap a located expression with a PopErrCtxt
Wrap a located expression with a PopSrcExpr with an appropriate location
mkExpandedExpr Build an expression using the extension constructor XExpr, and the two components of the expansion: original expression and expanded expressions.
mkExpandedStmt Build an expression using the extension constructor XExpr, and the two components of the expansion: original do stmt and expanded expression
mkExpandedPatRn mkExpandedStmtAt :: SrcSpanAnnALocation for the expansion expression
-> ExprLStmt GhcRnsource statement
-> HsExpr GhcRnexpanded expression
-> LHsExpr GhcRnsuitably wrapped located XXExprGhcRn
Build an expression using the extension constructor XExpr, and the two components of the expansion: original do stmt and expanded expression an associate with a provided location
mkExpandedStmtPopAt :: SrcSpanAnnALocation for the expansion statement
-> ExprLStmt GhcRnsource statement
-> HsExpr GhcRnexpanded expression
-> LHsExpr GhcRnsuitably wrapped XXExprGhcRn
Wrap the expanded version of the expression with a pop.
mkExpandedExprTc Build a XXExprGhcRn out of an extension constructor, and the two components of the expansion: original and expanded typechecked expressions.
mkExpandedStmtTc Build a XXExprGhcRn out of an extension constructor. The two components of the expansion are: original statement and expanded typechecked expression.
HsUntypedSpliceToputsplice_result_finalizers :: ThModFinalizersTH finalizers produced by the splice.
utsplice_result :: thingThe result of splicing; See Note [Lifecycle of a splice]
HsUntypedSpliceNested SplicePointNameData a => Data (HsUntypedSpliceResult a)Defined in ghc-9.10.3 · GHC.Hs.Instances · orphanhsExprNeedsParens p e returns True if the expression e needs
parentheses under precedence p.
Parenthesize an expression without token information
parenthesizeHsExpr p e checks if hsExprNeedsParens p e is true,
and if so, surrounds e with an HsPar. Otherwise, it simply returns e.
Command Syntax Table (for Arrow syntax)
Data MatchGroupTcDefined in ghc-9.10.3 · GHC.Hs.ExprIs there only one RHS in this list of matches?
Data XBindStmtRnDefined in ghc-9.10.3 · GHC.Hs.Instances · orphanData XBindStmtTcDefined in ghc-9.10.3 · GHC.Hs.Instances · orphanFinalizers produced by a splice with addModFinalizer
See Note [Delaying modFinalizers in untyped splices] in GHC.Rename.Splice. For how this is used.
ThModFinalizers [ForeignRef (Q ())]Data ThModFinalizersDefined in ghc-9.10.3 · GHC.Hs.ExprData DelayedSpliceDefined in ghc-9.10.3 · GHC.Hs.ExprData UntypedSpliceFlavourDefined in ghc-9.10.3 · GHC.Hs.ExprOutputable HsArrowMatchContextOutputable HsLamVariantOutputableBndrId idL => Outputable (ApplicativeArg (GhcPass idL))OutputableBndrId p => Outputable (ArithSeqInfo (GhcPass p))OutputableBndrId p => Outputable (HsCmd (GhcPass p))OutputableBndrId p => Outputable (HsCmdTop (GhcPass p))OutputableBndrId p => Outputable (HsExpr (GhcPass p))OutputableBndrId p => Outputable (HsQuote (GhcPass p))Outputable (HsPragE (GhcPass p))Outputable fn => Outputable (HsMatchContext fn)Outputable fn => Outputable (HsStmtContext fn)UnXRec p => Outputable (DotFieldOcc p)(UnXRec p, Outputable (XRec p FieldLabelString)) => Outputable (FieldLabelStrings p)(UnXRec p, Outputable (XRec p FieldLabelString)) => OutputableBndr (Located (FieldLabelStrings p))(UnXRec p, Outputable (XRec p FieldLabelString)) => OutputableBndr (FieldLabelStrings p)HasAnnotation (Anno a) => WrapXRec (GhcPass p) a(OutputableBndrId pr, Outputable body) => Outputable (Match (GhcPass pr) body)(Outputable (StmtLR (GhcPass idL) (GhcPass idL) (LHsExpr (GhcPass idL))), Outputable (XXParStmtBlock (GhcPass idL) (GhcPass idR))) => Outputable (ParStmtBlock (GhcPass idL) (GhcPass idR))(OutputableBndrId pl, OutputableBndrId pr, Anno (StmtLR (GhcPass pl) (GhcPass pr) body) ~ SrcSpanAnnA, Outputable body) => Outputable (StmtLR (GhcPass pl) (GhcPass pr) body)