Moduleth-abstraction-0.7.1.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.
- 6 types
- 1 class
- 34 values
- Packageth-abstraction-0.7.1.0
- Exports41
- LanguageHaskell2010
- LicenceISC
- SourceTyVarBndr.hs
TyVarBndr-related types
7 declarationsConstructors
Instances8Eq, Data, Ord, Show, Generic, DefaultBndrFlag, …
Eq SpecificityDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.SyntaxData SpecificityDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.SyntaxOrd SpecificityDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.SyntaxShow SpecificityDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.SyntaxGeneric SpecificityDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.SyntaxDefaultBndrFlag SpecificityDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.LibPprFlag SpecificityDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Pprtype Rep Specificity = D1 ('MetaDataDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax"Specificity"
"Language.Haskell.TH.Syntax"
"template-haskell"
'False) (C1 ('MetaCons"SpecifiedSpec"
'PrefixI 'False) U1 :+: C1 ('MetaCons"InferredSpec"
'PrefixI 'False) U1)
Instances8Eq, Data, Ord, Show, Generic, DefaultBndrFlag, …
Eq BndrVisDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.SyntaxData BndrVisDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.SyntaxOrd BndrVisDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.SyntaxShow BndrVisDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.SyntaxGeneric BndrVisDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.SyntaxDefaultBndrFlag BndrVisDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.LibPprFlag BndrVisDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Pprtype Rep BndrVis = D1 ('MetaDataDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax"BndrVis"
"Language.Haskell.TH.Syntax"
"template-haskell"
'False) (C1 ('MetaCons"BndrReq"
'PrefixI 'False) U1 :+: C1 ('MetaCons"BndrInvis"
'PrefixI 'False) U1)
Methods
defaultBndrFlag :: flag
Instances3DefaultBndrFlag
DefaultBndrFlag BndrVisDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.LibDefaultBndrFlag SpecificityDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.LibDefaultBndrFlag ()Defined in template-haskell-2.22.0.0 · Language.Haskell.TH.Lib
Constructing TyVarBndrs
0 declarationsflag-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
2 declarationsConstructing BndrVis
2 declarationsModifying TyVarBndrs
15 declarationsMap 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
3 declarationsExtract the type variable name from a TyVarBndr, ignoring the kind signature if one exists.