HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Moduleghc-9.10.3GHC2021

Language.Haskell.Syntax.Type

  • 40 types
  • 11 values
  • Packageghc-9.10.3
  • Exports62
  • LanguageGHC2021
  • LicenceBSD-3-Clause
  • SourceType.hs
datadata HsScaled pass a
#

This is used in the syntax. In constructor declaration. It must keep the arrow representation.

Constructors

Instances5Data, ToHie, HasHaddock
  • Data thing => Data (HsScaled GhcPs thing)Defined in ghc-9.10.3 · GHC.Hs.Instances · orphan
  • Data thing => Data (HsScaled GhcRn thing)Defined in ghc-9.10.3 · GHC.Hs.Instances · orphan
  • Data thing => Data (HsScaled GhcTc thing)Defined in ghc-9.10.3 · GHC.Hs.Instances · orphan
  • ToHie a => ToHie (HsScaled GhcRn a)Defined in ghc-9.10.3 · GHC.Iface.Ext.Ast
  • HasHaddock a => HasHaddock (HsScaled GhcPs a)Defined in ghc-9.10.3 · GHC.Parser.PostProcess.Haddock
datadata HsArrow pass
#

Denotes the type of arrows in the surface language

Constructors

Instances4Data, Outputable
datadata HsType pass
#

Haskell Type

Constructors

Instances15Data, Outputable, ToHie, DisambTD, HasHaddock, Anno, …
datadata HsBndrVis pass
#
Instances6CvtFlag, Data, OutputableBndrFlag, RepTV
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 The flag annotates the binder. It is Specificity in places where explicit specificity is allowed (e.g. x :: forall {a} b. ...) or () in other places.

Constructors

Instances10ToHie, Data, NamedThing, 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 HsTyLit pass
#

Haskell Type Literal

Instances4Data, 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
typetype BangType pass = HsType pass
#

Bang Type

In the parser, strictness and packedness annotations bind more tightly than docstrings. This means that when consuming a BangType (and looking for HsBangTy) we must be ready to peer behind a potential layer of HsDocTy. See #15206 for motivation and getBangType for an example.

datadata HsSrcBang
#

Haskell Source Bang

Bangs on data constructor arguments as the user wrote them in the source code.

(HsSrcBang _ SrcUnpack SrcLazy) and (HsSrcBang _ SrcUnpack NoSrcStrict) (without StrictData) makes no sense, we emit a warning (in checkValidDataCon) and treat it like (HsSrcBang _ NoSrcUnpack SrcLazy)

Instances2Data, Outputable
datadata ConDeclField pass
#

Constructor Declaration Field

Instances8Data, Outputable, ToHie, Anno, …
datadata HsConDetails tyarg 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
valuenoTypeArgs :: [Void]
#

An empty list that can be used to indicate that there are no type arguments allowed in cases where HsConDetails is applied to Void.

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 ConDeclField 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.

Constructors

Instances10Eq, Data, Outputable, ToHie, OutputableBndr, Anno, …
datadata AmbiguousFieldOcc pass
#

Ambiguous Field Occurrence

Represents an *occurrence* of a field that is potentially ambiguous after the renamer, with the ambiguity resolved by the typechecker. We always store the RdrName that the user originally wrote, and store the selector function after the renamer (for unambiguous occurrences) or the typechecker (for ambiguous occurrences).

See Note [HsRecField and HsRecUpdField] in GHC.Hs.Pat. See Note [Located RdrNames] in GHC.Hs.Expr.

Instances8Data, Outputable, OutputableBndr, ToHie, Anno, …