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

  • 24 types
  • 9 values
  • Packageghc-9.10.3
  • Exports37
  • LanguageGHC2021
  • LicenceBSD-3-Clause
  • SourceBinds.hs
datadata HsLocalBindsLR idL idR
#

Haskell Local Bindings with separate Left and Right identifier types

Bindings in a let expression or a where clause

Constructors

Instances6ToHie, 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.

Instances6ToHie, Data, Outputable
typetype LHsBindsLR idL idR = Bag (LHsBindLR idL idR)
#

Located Haskell Bindings with separate Left and Right identifier types

typetype LHsBindLR idL idR = XRec idL (HsBindLR idL idR)
#

Located Haskell Binding 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.

    AnnKeywordIds

  • 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)
Instances8HasType, ToHie, Data, Outputable, Anno, …
datadata PatSynBind idL idR
#

Pattern Synonym binding

Constructors

Instances6ToHie, Data, Outputable
datadata HsMultAnn pass
#

Multiplicity annotations, on binders, are always resolved (to a unification variable if there is no annotation) during type-checking. The resolved multiplicity is stored in the extension fields.

Constructors

Instances3Data
datadata IPBind id
#

Implicit parameter bindings.

Constructors

Instances6Data, Outputable, ToHie, Anno
typetype LSig pass = XRec pass (Sig pass)
#

Located Signature

datadata Sig pass
#

Signatures and pragmas

Constructors

Instances6Data, Outputable, ToHie, Anno
datadata FixitySig pass
#

Fixity Signature

Constructors

Instances6Data, Outputable, ToHie, Anno
datadata RecordPatSynField pass
#

Record Pattern Synonym Field

Constructors

Instances5Data, Outputable, ToHie