HORIZON HASKELLDocslts/ghc-10.0.xfc4e5982026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · fc4e598 · 2026-10-11

Moduleghc-10.0.0.20260917GHC2024

Language.Haskell.Syntax.Type

  • 43 types
  • 6 values
datadata HsFunArr pass
#

Denotes a function arrow, which could be -> or ⊸ or ::. :: counts as an "arrow" for these purposes, because in HsConDeclField we need to support both

data T where MkT :: Int -> Bool -> T
data T where MkT :: { x :: Int, y :: Bool } -> T

Constructors

Instances3Data
datadata HsModifiedFunArrOf mult pass
#

Denotes function arrows with optional modifiers attached.

The mult type argument is usually `LHsType (NoGhcTc pass)`, but when the annotation is part of a type used in a term, it is `LHsExpr pass`. See Note [Types in terms].

Constructors

Instances7Data, ToHie, …
datadata HsType pass
#

Haskell Type

Constructors

Instances20Outputable, ToHie, DisambTD, HasHaddock, Data, Anno, …
datadata HsBndrVis pass
#
Instances6CvtFlag, Data, OutputableBndrFlag, RepTV
datadata HsBndrVar pass
#

Constructors

Instances4Data, Outputable
datadata HsForAllTelescope pass
#

The type variable binders in an HsForAllTy. See also Note [Variable Specificity and Forall Visibility] in GHC.Tc.Gen.HsType.

Constructors

Instances4Data, Outputable
datadata HsTyVarBndr flag pass
#

Haskell Type Variable Binder See Note [Type variable binders]

Instances9ToHie, Data, Outputable, Anno, …
datadata LHsQTyVars pass
#

Located Haskell Quantified Type Variables

Instances5Data, Outputable, ToHie
datadata HsOuterTyVarBndrs flag pass
#

The outermost type variables in a type that obeys the forall-or-nothing rule. See Note [forall-or-nothing rule].

Constructors

Instances6ToHie, Data, Outputable, Anno
datadata HsWildCardBndrs pass thing
#

Haskell Wildcard Binders

Constructors

Instances7ToHie, Data, Outputable, HasHaddock, …
datadata HsPatSigType pass
#

Types that can appear in pattern signatures, as well as the signatures for term-level binders in RULES. See Note [Pattern signature binders and scoping].

This is very similar to HsSigWcType, but with slightly different semantics: see Note [HsType binders]. See also Note [The wildcard story for types].

Constructors

Instances5Data, Outputable, ToHie
datadata HsSigType pass
#

A type signature that obeys the forall-or-nothing rule. In other words, an LHsType that uses an HsOuterSigTyVarBndrs to represent its outermost type variable quantification. See Note [Representing type signatures].

Instances8Data, Outputable, ToHie, HasHaddock, Anno, …
datadata HsTyPat pass
#

Constructors

Instances5Data, Outputable, ToHie
datadata HsModifierOf ty pass
#

Modifier. Usually a modifier holds an LHsType, but inside expressions, it has an LHsExpr. See Note [Overview of Modifiers].

Constructors

Instances9Data, ToHie, Anno, …
datadata HsLit x
#

Haskell Literal

Constructors

Instances5Eq, Data, Outputable
newtypenewtype HsIPName
#

These names are used early on to store the names of implicit parameters. They completely disappear after type-checking.

Constructors

Instances6Eq, Data, Outputable, OutputableBndr, ToHie, Anno
datadata HsArg p tm ty
#

Arguments in an expression/type after splitting

Constructors

Instances6Data, HasLoc, Outputable, ToHie
datadata PromotionFlag
#

Is a TyCon a promoted data constructor or just a normal type constructor?

Instances6Eq, Data, Ord, NFData, Outputable, Binary
datadata HsConDeclRecField pass
#

Constructor Declaration Record Field

Instances9Data, Outputable, ToHie, HasHaddock, Anno, …
datadata HsConDetails arg rec
#

Describes the arguments to a data constructor. This is a common representation for several constructor-related concepts, including:

  • The arguments in a Haskell98-style constructor declaration (see HsConDeclH98Details in GHC.Hs.Decls).

  • The arguments in constructor patterns in case/function definitions (see HsConPatDetails in GHC.Hs.Pat).

  • The left-hand side arguments in a pattern synonym binding (see HsPatSynDetails in GHC.Hs.Binds).

One notable exception is the arguments in a GADT constructor, which uses a separate data type entirely (see HsConDeclGADTDetails in GHC.Hs.Decls). This is because GADT constructors cannot be declared with infix syntax, unlike the concepts above (#18844).

Constructors

Instances3Data, Outputable, ToHie
datadata HsConDeclField pass
#

Constructor declaration field specification, see Note [HsConDeclField on pass]

Constructors

Instances5Data, ToHie, HasHaddock
datadata FieldOcc pass
#

Field Occurrence

Represents an *occurrence* of a field. This may or may not be a binding occurrence (e.g. this type is used in HsConDeclRecField and RecordPatSynField which bind their fields, but also in HsRecField for record construction and patterns, which do not).

We store both the RdrName the user originally wrote, and after the renamer we use the extension field to store the selector function. See note [FieldOcc pass]

There is a wrinkle in that update field occurances are sometimes ambiguous during the rename stage. See note [Ambiguous FieldOcc in record updates] to see how we currently handle this.

Constructors

Instances10Eq, Data, Outputable, ToHie, OutputableBndr, Anno, …