Portability | TemplateHaskell |
---|---|
Stability | experimental |
Maintainer | Edward Kmett <ekmett@gmail.com> |
Safe Haskell | Trustworthy |
Lenses and Traversals for working with Template Haskell
- class HasName t where
- class HasTypeVars t where
- typeVarsEx :: Set Name -> Traversal' t Name
- class SubstType t where
- typeVars :: HasTypeVars t => Traversal' t Name
- substTypeVars :: HasTypeVars t => Map Name Name -> t -> t
- conFields :: Traversal' Con StrictType
- conNamedFields :: Traversal' Con VarStrictType
Documentation
Has a Name
class HasTypeVars t whereSource
Provides for the extraction of free type variables, and alpha renaming.
typeVarsEx :: Set Name -> Traversal' t NameSource
Provides substitution for types
typeVars :: HasTypeVars t => Traversal' t NameSource
Traverse free type variables
substTypeVars :: HasTypeVars t => Map Name Name -> t -> tSource
Substitute using a map of names in for free type variables
conFields :: Traversal' Con StrictTypeSource
Provides a Traversal
of the types of each field of a constructor.
conNamedFields :: Traversal' Con VarStrictTypeSource
Traversal
of the types of the named fields of a constructor.