HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Moduleghc-9.10.3GHC2021

Language.Haskell.Syntax.Extension

  • 3 types
  • 3 classes
  • 2 values
  • Packageghc-9.10.3
  • Exports341
  • LanguageGHC2021
  • LicenceBSD-3-Clause
  • SourceExtension.hs
datadata NoExtField
#

A placeholder type for TTG extension points that are not currently unused to represent any particular value.

This should not be confused with DataConCantHappen, which are found in unused extension constructors and therefore should never be inhabited. In contrast, NoExtField is used in extension points (e.g., as the field of some constructor), so it must have an inhabitant to construct AST passes that manipulate fields with that extension point as their type.

Instances5Eq, Data, Ord, Outputable, ToHie
familytype family XRec p a
#

GHC's L prefixed variants wrap their vanilla variant in this type family, to add SrcLoc info via Located. Other passes than GhcPass not interested in location information can define this as type instance XRec NoLocated a = a. See Note [XRec and SrcSpans in the AST]

Instances1XRec
familytype family Anno a
#
Instances103Anno, …
classclass UnXRec p where
#

We can strip off the XRec to access the underlying data. See Note [XRec and SrcSpans in the AST]

Methods

Instances1UnXRec
classclass MapXRec p where
#

We can map over the underlying type contained in an XRec while preserving the annotation as is.

Methods

Instances1MapXRec
classclass WrapXRec p a where
#

The trivial wrapper that carries no additional information See Note [XRec and SrcSpans in the AST]

Methods

Instances1WrapXRec
familytype family IdP p
#

Maps the "normal" id type for a given pass

Instances1IdP
familytype family XFunBind x x'
#
Instances3XFunBind
  • type XFunBind (GhcPass pL) GhcPs = NoExtFieldDefined in ghc-9.10.3 · GHC.Hs.Binds · orphan
  • type XFunBind (GhcPass pL) GhcRn = NameSetDefined in ghc-9.10.3 · GHC.Hs.Binds · orphan

    After the renamer (but before the type-checker), the FunBind extension field contains the locally-bound free variables of this defn. See Note [Bind free vars]

  • type XFunBind (GhcPass pL) GhcTc = (HsWrapper, [CoreTickish])Defined in ghc-9.10.3 · GHC.Hs.Binds · orphan

    After the type-checker, the FunBind extension field contains the ticks to put on the rhs, if any, and a coercion from the type of the MatchGroup to the type of the Id. Example:

         f :: Int -> forall a. a -> a
         f x y = y
    

    Then the MatchGroup will have type (Int -> a' -> a') (with a free type variable a'). The coercion will take a CoreExpr of this type and convert it to a CoreExpr of type Int -> forall a'. a' -> a' Notice that the coercion captures the free a'.

familytype family XLam x
#
Instances1XLam
familytype family XDo x
#
Instances3XDo
familytype family XTick x
#
familytype family XMG x b
#
Instances3XMG
familytype family XHsQTvs x
#
Instances3XHsQTvs
familytype family XHsWC x b
#
Instances3XHsWC
familytype family NoGhcTc p
#

See Note [NoGhcTc] in GHC.Hs.Extension. It has to be in this module because it is used like an extension point (in the data definitions of types that should be parameter-agnostic.

Instances1NoGhcTc
  • type NoGhcTc (GhcPass pass) = GhcPass (NoGhcTcPass pass)Defined in ghc-9.10.3 · GHC.Hs.Extension

    Marks that a field uses the GhcRn variant even when the pass parameter is GhcTc. Useful for storing HsTypes in GHC.Hs.Exprs, say, because HsType GhcTc should never occur. See Note [NoGhcTc]