HORIZON HASKELLDocslts/ghc-10.0.x2b276322026-10-31Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 2b27632 · 2026-10-31

datadata HsLocalBindsLR idL idR

Haskell Local Bindings with separate Left and Right identifier types

Bindings in a let expression or a where clause

Constructors

Instances7CollectBinders, CollectFldBinders, Data, Outputable, …
datadata HsValBindsLR idL idR

Haskell Value bindings with separate Left and Right identifier types (not implicit parameters) Used for both top level and nested bindings May contain pattern synonym bindings

Constructors

  • ValBinds (XValBinds idL idR) (LHsBindsLR idL idR) [LSig idR]

    Value Bindings In

    Before renaming RHS; idR is always RdrName Not dependency analysed Recursive by default

  • XValBindsLR !(XXValBindsLR idL idR)

    Value Bindings Out

    After renaming RHS; idR can be Name or Id Dependency analysed, later bindings in the list may depend on earlier ones.

Instances6CollectFldBinders, Data, Outputable
typetype LHsBindsLR idL idR = [LHsBindLR idL idR]

Located Haskell Bindings with separate Left and Right identifier types

datadata HsBindLR idL idR

Haskell Binding with separate Left and Right id's

Constructors

  • FunBind

    Function-like Binding

    FunBind is used for both functions f x = e and variables f = x -> e and strict variables !x = x + 1

    Reason 1: Special case for type inference: see GHC.Tc.Gen.Bind.tcMonoBinds.

    Reason 2: Instance decls can only have FunBinds, which is convenient. If you change this, you'll need to change e.g. rnMethodBinds

    But note that the form f :: a->a = ... parses as a pattern binding, just like (f :: a -> a) = ...

    Strict bindings have their strictness recorded in the SrcStrictness of their MatchContext. See Note [FunBind vs PatBind] for details about the relationship between FunBind and PatBind.

  • PatBind

    Pattern Binding

    The pattern is never a simple variable; That case is done by FunBind. See Note [FunBind vs PatBind] for details about the relationship between FunBind and PatBind.

  • VarBind

    Variable Binding

    Dictionary binding and suchlike. All VarBinds are introduced by the type checker

  • PatSynBind (XPatSynBind idL idR) (PatSynBind idL idR)

    Patterns Synonym Binding

  • XHsBindsLR !(XXHsBindsLR idL idR)
Instances7CollectFldBinders, Data, Outputable, Anno, …
datadata PatSynBind idL idR

Pattern Synonym binding

Constructors

Instances5Data, Outputable
datadata HsIPBinds id

Haskell Implicit Parameter Bindings

Constructors

Instances4Data, Outputable
datadata IPBind id

Implicit parameter bindings.

Constructors

Instances5Data, Outputable, Anno
datadata Sig pass

Signatures and pragmas

Constructors

  • TypeSig (XTypeSig pass) [LIdP pass] (LHsSigWcType pass)

    An ordinary type signature

    f :: Num a => a -> a

    After renaming, this list of Names contains the named wildcards brought into scope by this signature. For a signature _ -> _a -> Bool, the renamer will leave the unnamed wildcard _ untouched, and the named wildcard _a is then replaced with fresh meta vars in the type. Their names are stored in the type signature that brought them into scope, in this third field to be more specific.

  • PatSynSig (XPatSynSig pass) [LIdP pass] (LHsSigType pass)

    A pattern synonym type signature

    pattern Single :: () => (Show a) => a -> [a]
  • ClassOpSig (XClassOpSig pass) Bool [LIdP pass] (LHsSigType pass)

    A signature for a class method False: ordinary class-method signature True: generic-default class method signature e.g. class C a where op :: a -> a -- Ordinary default op :: Eq a => a -> a -- Generic default No wildcards allowed here

  • FixSig (XFixSig pass) (FixitySig pass)

    An ordinary fixity declaration

        infixl 8 ***
  • InlineSig (XInlineSig pass) (LIdP pass) InlinePragma

    An inline pragma

    {#- INLINE f #-}
  • SpecSig (XSpecSig pass) (LIdP pass) [LHsSigType pass] InlinePragma

    An old-form specialisation pragma

    {-# SPECIALISE f :: Int -> Int #-}

    NB: this constructor is deprecated and will be removed in GHC 9.18 (#25540)

  • SpecSigE (XSpecSigE pass) (RuleBndrs pass) (LHsExpr pass) InlinePragma

    A new-form specialisation pragma (see GHC Proposal #493) e.g. {-# SPECIALISE f @Int 1 :: Int -> Int #-} See Note [Overview of SPECIALISE pragmas]

  • SpecInstSig (XSpecInstSig pass) (LHsSigType pass)

    A specialisation pragma for instance declarations only

    {-# SPECIALISE instance Eq [Int] #-}

    (Class tys); should be a specialisation of the current instance declaration

  • MinimalSig (XMinimalSig pass) (LBooleanFormula pass)

    A minimal complete definition pragma

    {-# MINIMAL a | (b, c | (d | e)) #-}
  • SCCFunSig (XSCCFunSig pass) (LIdP pass) (Maybe (XRec pass StringLiteral))

    A "set cost centre" pragma for declarations

    {-# SCC funName #-}

    or

    {-# SCC funName "cost_centre_name" #-}
  • CompleteMatchSig (XCompleteMatchSig pass) [LIdP pass] (Maybe (LIdP pass))

    A complete match pragma

    {-# COMPLETE C, D [:: T] #-}

    Used to inform the pattern match checker about additional complete matchings which, for example, arise from pattern synonym definitions.

  • XSig !(XXSig pass)
Instances5Data, Outputable, Anno
  • Data (Sig GhcPs)Defined in ghc-lib-parser-9.14.1.20251220 · GHC.Hs.Instances · orphan
  • Data (Sig GhcRn)Defined in ghc-lib-parser-9.14.1.20251220 · GHC.Hs.Instances · orphan
  • Data (Sig GhcTc)Defined in ghc-lib-parser-9.14.1.20251220 · GHC.Hs.Instances · orphan
  • OutputableBndrId p => Outputable (Sig (GhcPass p))Defined in ghc-lib-parser-9.14.1.20251220 · GHC.Hs.Binds · orphan
  • type Anno (Sig (GhcPass p)) = SrcSpanAnnADefined in ghc-lib-parser-9.14.1.20251220 · GHC.Hs.Binds · orphan
datadata FixitySig pass

Fixity Signature

Constructors

Instances5Data, Outputable, Anno

  • * Rule binders

  • *

  • ********************************************************************

datadata RuleBndrs pass
#

Constructors

Instances4Data, Outputable
datadata RuleBndr pass

Rule Binder

Constructors

Instances5Data, Outputable, Anno
datadata RecordPatSynField pass

Record Pattern Synonym Field

Constructors

Instances4Data, Outputable