Moduleghc-9.14.1GHC2021
Language.Haskell.Syntax.Type
- 38 types
- 7 values
- Packageghc-9.14.1
- Exports62
- LanguageGHC2021
- LicenceBSD-3-Clause
- SourceType.hs
Denotes multiplicity annotations in the surface language.
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
HsUnannotated !(XUnannotated mult pass)a -> b or a → b or { nm :: a }
HsLinearAnn !(XLinearAnn mult pass)a %1 -> b or a %1 → b, or a ⊸ b, or { nm %1 :: a }
HsExplicitMult !(XExplicitMult mult pass) !multa %m -> b or a %m → b or { nm %m :: a } (very much including `a %Many -> b`! This is how the programmer wrote it). It is stored as an HsType so as to preserve the syntax as written in the program.
XMultAnnOf !(XXMultAnnOf mult pass)
Instances7Data, Outputable, …
Data (HsMultAnnOf (LocatedA (HsExpr GhcPs)) GhcPs)Defined in ghc-9.14.1 · GHC.Hs.Instances · orphanData (HsMultAnnOf (LocatedA (HsExpr GhcRn)) GhcRn)Defined in ghc-9.14.1 · GHC.Hs.Instances · orphanData (HsMultAnnOf (LocatedA (HsExpr GhcTc)) GhcTc)Defined in ghc-9.14.1 · GHC.Hs.Instances · orphanData (HsMultAnnOf (LocatedA (HsType GhcPs)) GhcPs)Defined in ghc-9.14.1 · GHC.Hs.Instances · orphanData (HsMultAnnOf (LocatedA (HsType GhcRn)) GhcRn)Defined in ghc-9.14.1 · GHC.Hs.Instances · orphanData (HsMultAnnOf (LocatedA (HsType GhcRn)) GhcTc)Defined in ghc-9.14.1 · GHC.Hs.Instances · orphan(Outputable mult, OutputableBndrId pass) => Outputable (HsMultAnnOf mult (GhcPass pass))Defined in ghc-9.14.1 · GHC.Hs.Type · orphan
Instances3XUnannotated
type XUnannotated _1 GhcPs = EpArrowOrColonDefined in ghc-9.14.1 · GHC.Hs.Type · orphantype XUnannotated _1 GhcRn = NoExtFieldDefined in ghc-9.14.1 · GHC.Hs.Type · orphantype XUnannotated _1 GhcTc = MultDefined in ghc-9.14.1 · GHC.Hs.Type · orphan
Instances3XLinearAnn
type XLinearAnn _1 GhcPs = EpLinearDefined in ghc-9.14.1 · GHC.Hs.Type · orphantype XLinearAnn _1 GhcRn = NoExtFieldDefined in ghc-9.14.1 · GHC.Hs.Type · orphantype XLinearAnn _1 GhcTc = MultDefined in ghc-9.14.1 · GHC.Hs.Type · orphan
Instances3XExplicitMult
type XExplicitMult _1 GhcPs = (EpTokenDefined in ghc-9.14.1 · GHC.Hs.Type · orphan"%"
, EpArrowOrColon)type XExplicitMult _1 GhcRn = NoExtFieldDefined in ghc-9.14.1 · GHC.Hs.Type · orphantype XExplicitMult _1 GhcTc = MultDefined in ghc-9.14.1 · GHC.Hs.Type · orphan
Instances1XXMultAnnOf
type XXMultAnnOf _1 (GhcPass _2) = DataConCantHappenDefined in ghc-9.14.1 · GHC.Hs.Type · orphan
Haskell Type
Constructors
HsForAllTyhst_xforall :: XForAllTy passhst_tele :: HsForAllTelescope passhst_body :: LHsType pass
HsQualTyHsTyVar (XTyVar pass) PromotionFlag (LIdOccP pass)HsAppTy (XAppTy pass) (LHsType pass) (LHsType pass)HsAppKindTy (XAppKindTy pass) (LHsType pass) (LHsKind pass)HsFunTy (XFunTy pass) (HsMultAnn pass) (LHsType pass) (LHsType pass)HsListTy (XListTy pass) (LHsType pass)HsTupleTy (XTupleTy pass) HsTupleSort [LHsType pass]HsSumTy (XSumTy pass) [LHsType pass]HsOpTy (XOpTy pass) PromotionFlag (LHsType pass) (LIdOccP pass) (LHsType pass)HsParTy (XParTy pass) (LHsType pass)HsIParamTy (XIParamTy pass) (XRec pass HsIPName) (LHsType pass)(?x :: ty)HsStarTy (XStarTy pass) BoolHsKindSig (XKindSig pass) (LHsType pass) (LHsKind pass)(ty :: kind)HsSpliceTy (XSpliceTy pass) (HsUntypedSplice pass)HsDocTy (XDocTy pass) (LHsType pass) (LHsDoc pass)HsExplicitListTy (XExplicitListTy pass) PromotionFlag [LHsType pass]HsExplicitTupleTy (XExplicitTupleTy pass) PromotionFlag [LHsType pass]HsTyLit (XTyLit pass) (HsTyLit pass)HsWildCardTy (XWildCardTy pass)XHsType !(XXType pass)
Instances17Outputable, ToHie, DisambTD, HasHaddock, Data, Anno, …
Data (HsType GhcPs)Defined in ghc-9.14.1 · GHC.Hs.Instances · orphanData (HsType GhcRn)Defined in ghc-9.14.1 · GHC.Hs.Instances · orphanData (HsType GhcTc)Defined in ghc-9.14.1 · GHC.Hs.Instances · orphanOutputableBndrId p => Outputable (HsType (GhcPass p))Defined in ghc-9.14.1 · GHC.Hs.Type · orphanToHie (TScoped (FamEqn GhcRn (LocatedA (HsType GhcRn))))Defined in ghc-9.14.1 · GHC.Iface.Ext.AstToHie (TScoped (HsWildCardBndrs GhcRn (LocatedA (HsType GhcRn))))Defined in ghc-9.14.1 · GHC.Iface.Ext.AstToHie (LocatedA (HsType GhcRn))Defined in ghc-9.14.1 · GHC.Iface.Ext.AstToHie (LocatedC [LocatedA (HsType GhcRn)])Defined in ghc-9.14.1 · GHC.Iface.Ext.AstDisambTD (HsType GhcPs)Defined in ghc-9.14.1 · GHC.Parser.PostProcessHasHaddock (LocatedA (HsType GhcPs))Defined in ghc-9.14.1 · GHC.Parser.PostProcess.HaddockData (HsMultAnnOf (LocatedA (HsType GhcPs)) GhcPs)Defined in ghc-9.14.1 · GHC.Hs.Instances · orphanData (HsMultAnnOf (LocatedA (HsType GhcRn)) GhcRn)Defined in ghc-9.14.1 · GHC.Hs.Instances · orphanData (HsMultAnnOf (LocatedA (HsType GhcRn)) GhcTc)Defined in ghc-9.14.1 · GHC.Hs.Instances · orphantype Anno (FamEqn p (LocatedA (HsType p))) = SrcSpanAnnADefined in ghc-9.14.1 · GHC.Hs.Decls · orphantype Anno (HsKind (GhcPass p)) = SrcSpanAnnADefined in ghc-9.14.1 · GHC.Hs.Type · orphantype Anno (HsType (GhcPass p)) = SrcSpanAnnADefined in ghc-9.14.1 · GHC.Hs.Type · orphantype Anno [LocatedA (HsType (GhcPass p))] = SrcSpanAnnCDefined in ghc-9.14.1 · GHC.Hs.Type · orphan
Located Haskell Type
Haskell Kind
Located Haskell Kind
Constructors
HsBndrRequired !(XBndrRequired pass)HsBndrInvisible !(XBndrInvisible pass)XBndrVis !(XXBndrVis pass)
Instances6CvtFlag, Data, OutputableBndrFlag, RepTV
CvtFlag BndrVis (HsBndrVis GhcPs)Defined in ghc-9.14.1 · GHC.ThToHsData (HsBndrVis GhcPs)Defined in ghc-9.14.1 · GHC.Hs.Instances · orphanData (HsBndrVis GhcRn)Defined in ghc-9.14.1 · GHC.Hs.Instances · orphanData (HsBndrVis GhcTc)Defined in ghc-9.14.1 · GHC.Hs.Instances · orphanOutputableBndrFlag (HsBndrVis (GhcPass p')) pDefined in ghc-9.14.1 · GHC.Hs.TypeRepTV (HsBndrVis GhcRn) BndrVisDefined in ghc-9.14.1 · GHC.HsToCore.Quote
Instances1XBndrRequired
type XBndrRequired (GhcPass _1) = NoExtFieldDefined in ghc-9.14.1 · GHC.Hs.Type · orphan
Instances3XBndrInvisible
type XBndrInvisible GhcPs = EpTokenDefined in ghc-9.14.1 · GHC.Hs.Type · orphan"@"
type XBndrInvisible GhcRn = NoExtFieldDefined in ghc-9.14.1 · GHC.Hs.Type · orphantype XBndrInvisible GhcTc = NoExtFieldDefined in ghc-9.14.1 · GHC.Hs.Type · orphan
Instances1XXBndrVis
type XXBndrVis (GhcPass _1) = DataConCantHappenDefined in ghc-9.14.1 · GHC.Hs.Type · orphan
Constructors
HsBndrVar !(XBndrVar pass) !(LIdP pass)HsBndrWildCard !(XBndrWildCard pass)XBndrVar !(XXBndrVar pass)
Instances4Data, Outputable
Data (HsBndrVar GhcPs)Defined in ghc-9.14.1 · GHC.Hs.Instances · orphanData (HsBndrVar GhcRn)Defined in ghc-9.14.1 · GHC.Hs.Instances · orphanData (HsBndrVar GhcTc)Defined in ghc-9.14.1 · GHC.Hs.Instances · orphanOutputableBndrId p => Outputable (HsBndrVar (GhcPass p))Defined in ghc-9.14.1 · GHC.Hs.Type · orphan
Instances1XBndrVar
type XBndrVar (GhcPass p) = NoExtFieldDefined in ghc-9.14.1 · GHC.Hs.Type · orphan
Instances3XBndrWildCard
type XBndrWildCard GhcPs = EpTokenDefined in ghc-9.14.1 · GHC.Hs.Type · orphan"_"
type XBndrWildCard GhcRn = NoExtFieldDefined in ghc-9.14.1 · GHC.Hs.Type · orphantype XBndrWildCard GhcTc = NoExtFieldDefined in ghc-9.14.1 · GHC.Hs.Type · orphan
Instances1XXBndrVar
type XXBndrVar (GhcPass p) = DataConCantHappenDefined in ghc-9.14.1 · GHC.Hs.Type · orphan
Constructors
HsBndrKind !(XBndrKind pass) (LHsKind pass)HsBndrNoKind !(XBndrNoKind pass)XBndrKind !(XXBndrKind pass)
Instances3Data
Data (HsBndrKind GhcPs)Defined in ghc-9.14.1 · GHC.Hs.Instances · orphanData (HsBndrKind GhcRn)Defined in ghc-9.14.1 · GHC.Hs.Instances · orphanData (HsBndrKind GhcTc)Defined in ghc-9.14.1 · GHC.Hs.Instances · orphan
Instances1XBndrKind
type XBndrKind (GhcPass p) = NoExtFieldDefined in ghc-9.14.1 · GHC.Hs.Type · orphan
Instances1XBndrNoKind
type XBndrNoKind (GhcPass p) = NoExtFieldDefined in ghc-9.14.1 · GHC.Hs.Type · orphan
Instances1XXBndrKind
type XXBndrKind (GhcPass p) = DataConCantHappenDefined in ghc-9.14.1 · GHC.Hs.Type · orphan
The type variable binders in an HsForAllTy.
See also Note [Variable Specificity and Forall Visibility] in
GHC.Tc.Gen.HsType.
Constructors
HsForAllVisA visible
forall(e.g.,forall a -> {...}). These do not have any notion of specificity, so we use()as a placeholder value.hsf_xvis :: XHsForAllVis passhsf_vis_bndrs :: [LHsTyVarBndr () pass]
HsForAllInvisAn invisible
forall(e.g.,forall a {b} c. {...}), where each binder has a Specificity.hsf_xinvis :: XHsForAllInvis passhsf_invis_bndrs :: [LHsTyVarBndr Specificity pass]
XHsForAllTelescope !(XXHsForAllTelescope pass)
Instances4Data, Outputable
Data (HsForAllTelescope GhcPs)Defined in ghc-9.14.1 · GHC.Hs.Instances · orphanData (HsForAllTelescope GhcRn)Defined in ghc-9.14.1 · GHC.Hs.Instances · orphanData (HsForAllTelescope GhcTc)Defined in ghc-9.14.1 · GHC.Hs.Instances · orphanOutputableBndrId p => Outputable (HsForAllTelescope (GhcPass p))Defined in ghc-9.14.1 · GHC.Hs.Type · orphan
Haskell Type Variable Binder See Note [Type variable binders]
Constructors
HsTvbtvb_ext :: XTyVarBndr passtvb_flag :: flagtvb_var :: HsBndrVar passtvb_kind :: HsBndrKind pass
XTyVarBndr !(XXTyVarBndr pass)
Instances9ToHie, Data, Outputable, Anno, …
Data flag => ToHie (TVScoped (LocatedA (HsTyVarBndr flag GhcRn)))Defined in ghc-9.14.1 · GHC.Iface.Ext.AstData flag => Data (HsTyVarBndr flag GhcPs)Defined in ghc-9.14.1 · GHC.Hs.Instances · orphanData flag => Data (HsTyVarBndr flag GhcRn)Defined in ghc-9.14.1 · GHC.Hs.Instances · orphanData flag => Data (HsTyVarBndr flag GhcTc)Defined in ghc-9.14.1 · GHC.Hs.Instances · orphan(OutputableBndrId p, OutputableBndrFlag flag p) => Outputable (HsTyVarBndr flag (GhcPass p))Defined in ghc-9.14.1 · GHC.Hs.Type · orphantype Anno (HsTyVarBndr _flag GhcPs) = SrcSpanAnnADefined in ghc-9.14.1 · GHC.Hs.Type · orphantype Anno (HsTyVarBndr _flag GhcRn) = SrcSpanAnnADefined in ghc-9.14.1 · GHC.Hs.Type · orphantype Anno (HsTyVarBndr _flag GhcTc) = SrcSpanAnnADefined in ghc-9.14.1 · GHC.Hs.Type · orphantype Anno (HsTyVarBndr _flag (GhcPass _1)) = SrcSpanAnnADefined in ghc-9.14.1 · GHC.Hs.Type · orphan
Located Haskell Type Variable Binder
Located Haskell Quantified Type Variables
Constructors
HsQTvshsq_ext :: XHsQTvs passhsq_explicit :: [LHsTyVarBndr (HsBndrVis pass) pass]
XLHsQTyVars !(XXLHsQTyVars pass)
Instances5Data, Outputable, ToHie
Data (LHsQTyVars GhcPs)Defined in ghc-9.14.1 · GHC.Hs.Instances · orphanData (LHsQTyVars GhcRn)Defined in ghc-9.14.1 · GHC.Hs.Instances · orphanData (LHsQTyVars GhcTc)Defined in ghc-9.14.1 · GHC.Hs.Instances · orphanOutputableBndrId p => Outputable (LHsQTyVars (GhcPass p))Defined in ghc-9.14.1 · GHC.Hs.Type · orphanToHie (TScoped (LHsQTyVars GhcRn))Defined in ghc-9.14.1 · GHC.Iface.Ext.Ast
The outermost type variables in a type that obeys the forall-or-nothing
rule. See Note [forall-or-nothing rule].
Constructors
HsOuterImplicitImplicit forall, e.g.,
f :: a -> b -> bhso_ximplicit :: XHsOuterImplicit pass
HsOuterExplicitExplicit forall, e.g.,
f :: forall a b. a -> b -> bhso_xexplicit :: XHsOuterExplicit pass flaghso_bndrs :: [LHsTyVarBndr flag (NoGhcTc pass)]
XHsOuterTyVarBndrs !(XXHsOuterTyVarBndrs pass)
Instances6ToHie, Data, Outputable, Anno
Data flag => ToHie (TVScoped (HsOuterTyVarBndrs flag GhcRn))Defined in ghc-9.14.1 · GHC.Iface.Ext.AstData flag => Data (HsOuterTyVarBndrs flag GhcPs)Defined in ghc-9.14.1 · GHC.Hs.Instances · orphanData flag => Data (HsOuterTyVarBndrs flag GhcRn)Defined in ghc-9.14.1 · GHC.Hs.Instances · orphanData flag => Data (HsOuterTyVarBndrs flag GhcTc)Defined in ghc-9.14.1 · GHC.Hs.Instances · orphan(OutputableBndrFlag flag p, OutputableBndrFlag flag (NoGhcTcPass p), OutputableBndrId p) => Outputable (HsOuterTyVarBndrs flag (GhcPass p))Defined in ghc-9.14.1 · GHC.Hs.Type · orphantype Anno (HsOuterTyVarBndrs _1 (GhcPass _2)) = SrcSpanAnnADefined in ghc-9.14.1 · GHC.Hs.Type · orphan
Used for type-family instance equations, e.g.,
type instance forall a. F [a] = Tree a
The notion of specificity is irrelevant in type family equations, so we use
() for the HsOuterTyVarBndrs flag.
Used for signatures, e.g.,
f :: forall a {b}. blah
We use Specificity for the HsOuterTyVarBndrs flag to allow
distinguishing between specified and inferred type variables.
Haskell Wildcard Binders
Constructors
HsWCXHsWildCardBndrs !(XXHsWildCardBndrs pass thing)
Instances7ToHie, Data, Outputable, HasHaddock, …
ToHie (TScoped (HsWildCardBndrs GhcRn (LocatedA (HsSigType GhcRn))))Defined in ghc-9.14.1 · GHC.Iface.Ext.AstToHie (TScoped (HsWildCardBndrs GhcRn (LocatedA (HsType GhcRn))))Defined in ghc-9.14.1 · GHC.Iface.Ext.AstData thing => Data (HsWildCardBndrs GhcPs thing)Defined in ghc-9.14.1 · GHC.Hs.Instances · orphanData thing => Data (HsWildCardBndrs GhcRn thing)Defined in ghc-9.14.1 · GHC.Hs.Instances · orphanData thing => Data (HsWildCardBndrs GhcTc thing)Defined in ghc-9.14.1 · GHC.Hs.Instances · orphanOutputable thing => Outputable (HsWildCardBndrs (GhcPass p) thing)Defined in ghc-9.14.1 · GHC.Hs.Type · orphanHasHaddock a => HasHaddock (HsWildCardBndrs GhcPs a)Defined in ghc-9.14.1 · GHC.Parser.PostProcess.Haddock
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
HsPSXHsPatSigType !(XXHsPatSigType pass)
Instances5Data, Outputable, ToHie
Data (HsPatSigType GhcPs)Defined in ghc-9.14.1 · GHC.Hs.Instances · orphanData (HsPatSigType GhcRn)Defined in ghc-9.14.1 · GHC.Hs.Instances · orphanData (HsPatSigType GhcTc)Defined in ghc-9.14.1 · GHC.Hs.Instances · orphanOutputableBndrId p => Outputable (HsPatSigType (GhcPass p))Defined in ghc-9.14.1 · GHC.Hs.Type · orphanToHie (TScoped (HsPatSigType GhcRn))Defined in ghc-9.14.1 · GHC.Iface.Ext.Ast
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].
Constructors
HsSigXHsSigType !(XXHsSigType pass)
Instances8Data, Outputable, ToHie, HasHaddock, Anno, …
Data (HsSigType GhcPs)Defined in ghc-9.14.1 · GHC.Hs.Instances · orphanData (HsSigType GhcRn)Defined in ghc-9.14.1 · GHC.Hs.Instances · orphanData (HsSigType GhcTc)Defined in ghc-9.14.1 · GHC.Hs.Instances · orphanOutputableBndrId p => Outputable (HsSigType (GhcPass p))Defined in ghc-9.14.1 · GHC.Hs.Type · orphanToHie (TScoped (LocatedA (HsSigType GhcRn)))Defined in ghc-9.14.1 · GHC.Iface.Ext.AstToHie (TScoped (HsWildCardBndrs GhcRn (LocatedA (HsSigType GhcRn))))Defined in ghc-9.14.1 · GHC.Iface.Ext.AstHasHaddock (LocatedA (HsSigType GhcPs))Defined in ghc-9.14.1 · GHC.Parser.PostProcess.Haddocktype Anno (HsSigType (GhcPass p)) = SrcSpanAnnADefined in ghc-9.14.1 · GHC.Hs.Type · orphan
Located Haskell Signature Type
Located Haskell Signature Wildcard Type
Located Haskell Wildcard Type
Instances5Data, Outputable, ToHie
Data (HsTyPat GhcPs)Defined in ghc-9.14.1 · GHC.Hs.Instances · orphanData (HsTyPat GhcRn)Defined in ghc-9.14.1 · GHC.Hs.Instances · orphanData (HsTyPat GhcTc)Defined in ghc-9.14.1 · GHC.Hs.Instances · orphanOutputableBndrId p => Outputable (HsTyPat (GhcPass p))Defined in ghc-9.14.1 · GHC.Hs.Type · orphanToHie (TScoped (HsTyPat GhcRn))Defined in ghc-9.14.1 · GHC.Iface.Ext.Ast
Haskell Tuple Sort
Instances1Data
Data HsTupleSortDefined in ghc-9.14.1 · Language.Haskell.Syntax.Type
Haskell Context
Located Haskell Context
Haskell Type Literal
Instances4Data, Outputable
Data (HsTyLit GhcPs)Defined in ghc-9.14.1 · GHC.Hs.Instances · orphanData (HsTyLit GhcRn)Defined in ghc-9.14.1 · GHC.Hs.Instances · orphanData (HsTyLit GhcTc)Defined in ghc-9.14.1 · GHC.Hs.Instances · orphanOutputableBndrId p => Outputable (HsTyLit (GhcPass p))Defined in ghc-9.14.1 · GHC.Hs.Type · orphan
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
Eq HsIPNameDefined in ghc-9.14.1 · Language.Haskell.Syntax.TypeData HsIPNameDefined in ghc-9.14.1 · Language.Haskell.Syntax.TypeOutputable HsIPNameDefined in ghc-9.14.1 · GHC.Hs.Type · orphanOutputableBndr HsIPNameDefined in ghc-9.14.1 · GHC.Hs.Type · orphanToHie (LocatedAn NoEpAnns HsIPName)Defined in ghc-9.14.1 · GHC.Iface.Ext.Asttype Anno HsIPName = EpAnnCODefined in ghc-9.14.1 · GHC.Hs.Type · orphan
Arguments in an expression/type after splitting
Instances6Data, HasLoc, Outputable, ToHie
(Data a, Data b) => Data (HsArg GhcPs a b)Defined in ghc-9.14.1 · GHC.Hs.Instances · orphan(Data a, Data b) => Data (HsArg GhcRn a b)Defined in ghc-9.14.1 · GHC.Hs.Instances · orphan(Data a, Data b) => Data (HsArg GhcTc a b)Defined in ghc-9.14.1 · GHC.Hs.Instances · orphan(HasLoc tm, HasLoc ty) => HasLoc (HsArg (GhcPass p) tm ty)Defined in ghc-9.14.1 · GHC.Iface.Ext.Ast · orphan(Outputable tm, Outputable ty) => Outputable (HsArg (GhcPass p) tm ty)Defined in ghc-9.14.1 · GHC.Hs.Type · orphanThis instance is meant for debug-printing purposes. If you wish to pretty-print an application of HsArgs, use pprHsArgsApp instead.
(ToHie tm, ToHie ty) => ToHie (HsArg (GhcPass p) tm ty)Defined in ghc-9.14.1 · GHC.Iface.Ext.Ast
Instances1XValArg
type XValArg (GhcPass _1) = NoExtFieldDefined in ghc-9.14.1 · GHC.Hs.Type · orphan
Instances3XTypeArg
type XTypeArg GhcPs = EpTokenDefined in ghc-9.14.1 · GHC.Hs.Type · orphan"@"
type XTypeArg GhcRn = NoExtFieldDefined in ghc-9.14.1 · GHC.Hs.Type · orphantype XTypeArg GhcTc = NoExtFieldDefined in ghc-9.14.1 · GHC.Hs.Type · orphan
Instances1XXArg
type XXArg (GhcPass _1) = DataConCantHappenDefined in ghc-9.14.1 · GHC.Hs.Type · orphan
Is a TyCon a promoted data constructor or just a normal type constructor?
Instances6Eq, Data, Ord, NFData, Outputable, Binary
Eq PromotionFlagDefined in ghc-9.14.1 · Language.Haskell.Syntax.TypeData PromotionFlagDefined in ghc-9.14.1 · Language.Haskell.Syntax.TypeOrd PromotionFlagDefined in ghc-9.14.1 · Language.Haskell.Syntax.TypeNFData PromotionFlagDefined in ghc-9.14.1 · Language.Haskell.Syntax.TypeOutputable PromotionFlagDefined in ghc-9.14.1 · GHC.Types.Basic · orphanBinary PromotionFlagDefined in ghc-9.14.1 · GHC.Types.Basic · orphan
Constructor Declaration Record Field
Constructors
HsConDeclRecFieldcdrf_ext :: XConDeclRecField passcdrf_names :: [LFieldOcc pass]See Note [FieldOcc pass]
cdrf_spec :: HsConDeclField pass
XConDeclRecField !(XXConDeclRecField pass)
Instances9Data, Outputable, ToHie, HasHaddock, Anno, …
Data (HsConDeclRecField GhcPs)Defined in ghc-9.14.1 · GHC.Hs.Instances · orphanData (HsConDeclRecField GhcRn)Defined in ghc-9.14.1 · GHC.Hs.Instances · orphanData (HsConDeclRecField GhcTc)Defined in ghc-9.14.1 · GHC.Hs.Instances · orphanOutputableBndrId p => Outputable (HsConDeclRecField (GhcPass p))Defined in ghc-9.14.1 · GHC.Hs.Type · orphanToHie (LocatedA (HsConDeclRecField GhcRn))Defined in ghc-9.14.1 · GHC.Iface.Ext.AstToHie (LocatedL [LocatedA (HsConDeclRecField GhcRn)])Defined in ghc-9.14.1 · GHC.Iface.Ext.AstHasHaddock (LocatedA (HsConDeclRecField GhcPs))Defined in ghc-9.14.1 · GHC.Parser.PostProcess.Haddocktype Anno (HsConDeclRecField (GhcPass p)) = SrcSpanAnnADefined in ghc-9.14.1 · GHC.Hs.Type · orphantype Anno [LocatedA (HsConDeclRecField (GhcPass _1))] = SrcSpanAnnLDefined in ghc-9.14.1 · GHC.Hs.Decls · orphan
Located Constructor Declaration Record Field
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
HsConDeclH98Detailsin GHC.Hs.Decls).The arguments in constructor patterns in
case/function definitions (seeHsConPatDetailsin GHC.Hs.Pat).The left-hand side arguments in a pattern synonym binding (see
HsPatSynDetailsin 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).
Instances3Data, Outputable, ToHie
(Data rec, Data arg) => Data (HsConDetails arg rec)Defined in ghc-9.14.1 · Language.Haskell.Syntax.Type(Outputable arg, Outputable rec) => Outputable (HsConDetails arg rec)Defined in ghc-9.14.1 · GHC.Hs.Type · orphan(ToHie arg, ToHie rec) => ToHie (HsConDetails arg rec)Defined in ghc-9.14.1 · GHC.Iface.Ext.Ast
Constructor declaration field specification, see Note [HsConDeclField on pass]
Constructors
CDFcdf_ext :: XConDeclField passExtension point
cdf_unpack :: SrcUnpackednessUNPACK pragma if any E.g. data T = MkT {-# UNPACK #-} Int or data T where MtT :: {-# UNPACK #-} Int -> T
cdf_bang :: SrcStrictnessUser-specified strictness, if any E.g. data T a = MkT !a or data T a where MtT :: !a -> T a
cdf_multiplicity :: HsMultAnn passUser-specified multiplicity, if any E.g. data T a = MkT { t %Many :: a } or data T a where MtT :: a %1 -> T a
cdf_type :: LHsType passThe type of the field
cdf_doc :: Maybe (LHsDoc pass)Documentation for the field F.e. this very piece of documentation
Instances5Data, ToHie, HasHaddock
Data (HsConDeclField GhcPs)Defined in ghc-9.14.1 · GHC.Hs.Instances · orphanData (HsConDeclField GhcRn)Defined in ghc-9.14.1 · GHC.Hs.Instances · orphanData (HsConDeclField GhcTc)Defined in ghc-9.14.1 · GHC.Hs.Instances · orphanToHie (HsConDeclField GhcRn)Defined in ghc-9.14.1 · GHC.Iface.Ext.AstHasHaddock (HsConDeclField GhcPs)Defined in ghc-9.14.1 · GHC.Parser.PostProcess.Haddock
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
FieldOccfoExt :: XCFieldOcc passfoLabel :: LIdP pass
XFieldOcc !(XXFieldOcc pass)
Instances10Eq, Data, Outputable, ToHie, OutputableBndr, Anno, …
(Eq (LIdP pass), Eq (XCFieldOcc pass), Eq (XXFieldOcc pass)) => Eq (FieldOcc pass)Defined in ghc-9.14.1 · Language.Haskell.Syntax.TypeData (FieldOcc GhcPs)Defined in ghc-9.14.1 · GHC.Hs.Instances · orphanData (FieldOcc GhcRn)Defined in ghc-9.14.1 · GHC.Hs.Instances · orphanData (FieldOcc GhcTc)Defined in ghc-9.14.1 · GHC.Hs.Instances · orphanOutputable (XRecGhc (IdGhcP p)) => Outputable (FieldOcc (GhcPass p))Defined in ghc-9.14.1 · GHC.Hs.Type · orphanOutputableBndrId pass => OutputableBndr (FieldOcc (GhcPass pass))Defined in ghc-9.14.1 · GHC.Hs.Type · orphanHiePass p => ToHie (Context (FieldOcc (GhcPass p)))Defined in ghc-9.14.1 · GHC.Iface.Ext.AstHiePass p => ToHie (RFContext (LocatedA (FieldOcc (GhcPass p))))Defined in ghc-9.14.1 · GHC.Iface.Ext.AstOutputableBndrId pass => OutputableBndr (GenLocated SrcSpan (FieldOcc (GhcPass pass)))Defined in ghc-9.14.1 · GHC.Hs.Type · orphantype Anno (FieldOcc (GhcPass p)) = SrcSpanAnnADefined in ghc-9.14.1 · GHC.Hs.Type · orphan
Located Field Occurrence
Does this HsTyVarBndr come with an explicit kind annotation?