HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

newtypenewtype FieldLabelStrings p
#
Instances7Data, Outputable, OutputableBndr, Anno, …
datadata LHsRecUpdFields p where

Haskell Record Update Fields.

Instances3Data

Expressions proper

familytype family SyntaxExpr p

Syntax Expression

SyntaxExpr is represents the function used in interpreting rebindable syntax. In the parser, we have no information to supply; in the renamer, we have the name of the function (but see Note [Monad fail : Rebindable syntax, overloaded strings] for a wrinkle) and in the type-checker we have a more elaborate structure SyntaxExprTc.

In some contexts, rebindable syntax is not implemented, and so we have constructors to represent that possibility in both the renamer and typechecker instantiations.

E.g. (>>=) is filled in before the renamer by the appropriate Name for (>>=), and then instantiated by the type checker with its type args etc

Instances1SyntaxExpr
datadata HsExpr p

A Haskell expression.

Constructors

Instances35Outputable, CollectBinders, DisambECP, DisambInfixOp, Data, Anno, …
datadata DotFieldOcc p
#
Instances5Data, Outputable, Anno
datadata HsPragE p

A pragma, written as {-# ... #-}, that may appear within an expression.

Instances4Data, Outputable
  • Data (HsPragE GhcPs)Defined in ghc-lib-parser-9.14.1.20251220 · GHC.Hs.Instances · orphan
  • Data (HsPragE GhcRn)Defined in ghc-lib-parser-9.14.1.20251220 · GHC.Hs.Instances · orphan
  • Data (HsPragE GhcTc)Defined in ghc-lib-parser-9.14.1.20251220 · GHC.Hs.Instances · orphan
  • Outputable (HsPragE (GhcPass p))Defined in ghc-lib-parser-9.14.1.20251220 · GHC.Hs.Expr · orphan
typetype LHsTupArg id = XRec id (HsTupArg id)

Located Haskell Tuple Argument

HsTupArg is used for tuple sections (,a,) is represented by ExplicitTuple [Missing ty1, Present a, Missing ty3] Which in turn stands for (x:ty1 y:ty2. (x,a,y))

datadata HsTupArg id

Haskell Tuple Argument

Constructors

Instances3Data
  • Data (HsTupArg GhcPs)Defined in ghc-lib-parser-9.14.1.20251220 · GHC.Hs.Instances · orphan
  • Data (HsTupArg GhcRn)Defined in ghc-lib-parser-9.14.1.20251220 · GHC.Hs.Instances · orphan
  • Data (HsTupArg GhcTc)Defined in ghc-lib-parser-9.14.1.20251220 · GHC.Hs.Instances · orphan
datadata HsCmd id

Haskell Command (e.g. a "statement" in an Arrow proc block)

Instances30Outputable, CollectBinders, DisambECP, Data, Anno, Body, …
typetype LHsCmdTop p = XRec p (HsCmdTop p)

Top-level command, introducing a new arrow. This may occur inside a proc (where the stack is empty) or as an argument of a command-forming operator.

Located Haskell Top-level Command

datadata HsCmdTop p

Haskell Top-level Command

Constructors

Instances5Data, Outputable, Anno
datadata MatchGroup p body
#

Constructors

Instances6Data
datadata Match p body
#

Constructors

Instances13Data, Outputable, Anno, …
datadata GRHSs p body

Guarded Right-Hand Sides

GRHSs are used both for pattern bindings and for Matches

Constructors

Instances6Data
datadata GRHS p body

Guarded Right Hand Side.

Constructors

Instances9Data, Anno, …
typetype LStmtLR idL idR body = XRec idL (StmtLR idL idR body)

Located Statement with separate Left and Right id's

datadata StmtLR idL idR body
#

Constructors

Instances20CollectBinders, CollectFldBinders, Data, Outputable, Anno, …
datadata ParStmtBlock idL idR

Parenthesised Statement Block

Constructors

Instances5Data, Outputable
typetype FailOperator id = Maybe (SyntaxExpr id)

The fail operator

This is used for `.. <-` "bind statements" in do notation, including non-monadic "binds" in applicative.

The fail operator is 'Just expr' if it potentially fail monadically. if the pattern match cannot fail, or shouldn't fail monadically (regular incomplete pattern exception), it is Nothing.

See Note [Monad fail : Rebindable syntax, overloaded strings] for the type of expression in the Just case, and why it is so.

See Note [Failing pattern matches in Stmts] for which contexts for 'BindStmt's should use the monadic fail and which shouldn't.

datadata HsUntypedSplice id
Instances4Data, Anno
datadata HsQuote p

Haskell (Untyped) Quote = Expr + Pat + Type + Var

Instances4Data, Outputable
datadata ArithSeqInfo id

Arithmetic Sequence Information

Constructors

Instances4Data, Outputable
datadata HsMatchContext fn

Haskell Match Context

Context of a pattern match. This is more subtle than it would seem. See Note [FunBind vs PatBind].

Constructors

Instances2Data, Outputable
datadata HsStmtContext fn

Haskell Statement Context.

Constructors

Instances2Data, Outputable