Moduleth-abstraction-0.7.2.0Haskell2010
Language.Haskell.TH.Datatype.TyVarBndr
This module provides a backwards-compatible API for constructing and
manipulating TyVarBndrs across multiple versions of the template-haskell
package.
Contents
Synopsis
- type TyVarBndr_
- type TyVarBndrUnit
- type TyVarBndrSpec
- type TyVarBndrVis
- data Specificity
- data BndrVis
- class DefaultBndrFlag
- value plainTVFlag
- value kindedTVFlag
- value plainTV
- value kindedTV
- value plainTVInferred
- value plainTVSpecified
- value kindedTVInferred
- value kindedTVSpecified
- value plainTVReq
- value plainTVInvis
- value kindedTVReq
- value kindedTVInvis
- value inferredSpec
- value specifiedSpec
- value bndrReq
- value bndrInvis
- value elimTV
- value elimTVFlag
- value mapTV
- value mapTVName
- value mapTVFlag
- value mapTVKind
- value traverseTV
- value traverseTVName
- value traverseTVFlag
- value traverseTVKind
- value mapMTV
- value mapMTVName
- value mapMTVFlag
- value mapMTVKind
- value changeTVFlags
- value tvName
- value tvKind
- value tvFlag
- Packageth-abstraction-0.7.2.0
- Exports41
- LanguageHaskell2010
- LicenceISC
- SourceTyVarBndr.hs
TyVarBndr-related types
The specificity of a type variable in a forall ....
Constructors
Instances9Eq, Data, Ord, Show, Generic, PprFlag, …
Eq SpecificityDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxData SpecificityDefined in ghc-internal-10.0.0 · GHC.Internal.Data.DataOrd SpecificityDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxShow SpecificityDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxGeneric SpecificityDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxPprFlag SpecificityDefined in ghc-boot-th-10.0.0.20260917 · GHC.Boot.TH.PprDefaultBndrFlag SpecificityDefined in template-haskell-2.25.0.0 · Language.Haskell.TH.LibLift SpecificityDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Lifttype Rep Specificity = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Syntax"Specificity"
"GHC.Internal.TH.Syntax"
"ghc-internal"
'False) (C1 ('MetaCons"SpecifiedSpec"
'PrefixI 'False) U1 :+: C1 ('MetaCons"InferredSpec"
'PrefixI 'False) U1)
Visibility of a type variable. See Inferred vs. specified type variables.
Instances9Eq, Data, Ord, Show, Generic, PprFlag, …
Eq BndrVisDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxData BndrVisDefined in ghc-internal-10.0.0 · GHC.Internal.Data.DataOrd BndrVisDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxShow BndrVisDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxGeneric BndrVisDefined in ghc-internal-10.0.0 · GHC.Internal.TH.SyntaxPprFlag BndrVisDefined in ghc-boot-th-10.0.0.20260917 · GHC.Boot.TH.PprDefaultBndrFlag BndrVisDefined in template-haskell-2.25.0.0 · Language.Haskell.TH.LibLift BndrVisDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Lifttype Rep BndrVis = D1 ('MetaDataDefined in ghc-internal-10.0.0 · GHC.Internal.TH.Syntax"BndrVis"
"GHC.Internal.TH.Syntax"
"ghc-internal"
'False) (C1 ('MetaCons"BndrReq"
'PrefixI 'False) U1 :+: C1 ('MetaCons"BndrInvis"
'PrefixI 'False) U1)
Methods
defaultBndrFlag :: flag
Instances3DefaultBndrFlag
DefaultBndrFlag BndrVisDefined in template-haskell-2.25.0.0 · Language.Haskell.TH.LibDefaultBndrFlag SpecificityDefined in template-haskell-2.25.0.0 · Language.Haskell.TH.LibDefaultBndrFlag ()Defined in template-haskell-2.25.0.0 · Language.Haskell.TH.Lib
Constructing TyVarBndrs
flag-polymorphic
Construct a PlainTV with the given flag.
Construct a KindedTV with the given flag.
TyVarBndrUnit
TyVarBndrSpec
Construct a PlainTV with an InferredSpec.
Construct a PlainTV with a SpecifiedSpec.
Construct a KindedTV with an InferredSpec.
Construct a KindedTV with a SpecifiedSpec.
TyVarBndrVis
Constructing Specificity
Constructing BndrVis
Modifying TyVarBndrs
Map over the components of a TyVarBndr.
Map over the flag of a TyVarBndr.
Traverse the components of a TyVarBndr.
Traverse the flag of a TyVarBndr.
Map over the components of a TyVarBndr in a monadic fashion.
This is the same as traverseTV, but with a Monad constraint. This is
mainly useful for use with old versions of base where Applicative was
not a superclass of Monad.
Map over the Name of a TyVarBndr in a monadic fashion.
This is the same as traverseTVName, but with a Monad constraint. This is
mainly useful for use with old versions of base where Applicative was
not a superclass of Monad.
Map over the flag of a TyVarBndr in a monadic fashion.
This is the same as traverseTVFlag, but with a Monad constraint. This is
mainly useful for use with old versions of base where Applicative was
not a superclass of Monad.
Map over the Kind of a TyVarBndr in a monadic fashion.
This is the same as traverseTVKind, but with a Monad constraint. This is
mainly useful for use with old versions of base where Applicative was
not a superclass of Monad.
Set the flag in a list of TyVarBndrs. This is often useful in contexts where one needs to re-use a list of TyVarBndrs from one flag setting to another flag setting. For example, in order to re-use the TyVarBndrs bound by a DataD in a ForallT, one can do the following:
case x of
DataD _ _ tvbs _ _ _ ->
ForallT (changeTVFlags SpecifiedSpec tvbs) ...
Properties of TyVarBndrs
Extract the type variable name from a TyVarBndr, ignoring the kind signature if one exists.