th-extras-0.0.0.4: A grab bag of functions for use with Template Haskell

Safe Haskell | None
Language | Haskell98

Language.Haskell.TH.Extras

Synopsis

- intIs64 :: Bool
- replace :: (a -> Maybe a) -> a -> a
- composeExprs :: [ExpQ] -> ExpQ
- nameOfCon :: Con -> Name
- argTypesOfCon :: Con -> [Type]
- nameOfBinder :: TyVarBndr -> Name
- varsBoundInCon :: Con -> [TyVarBndr]
- namesBoundInPat :: Pat -> [Name]
- namesBoundInDec :: Dec -> [Name]
- genericalizeName :: Name -> Name
- genericalizeDecs :: [Dec] -> [Dec]
- headOfType :: Type -> Name
- occursInType :: Name -> Type -> Bool

# Documentation

intIs64 :: Bool Source #

replace :: (a -> Maybe a) -> a -> a Source #

composeExprs :: [ExpQ] -> ExpQ Source #

nameOfCon :: Con -> Name Source #

argTypesOfCon :: Con -> [Type] Source #

WARNING: discards binders in GADTs and existentially-quantified constructors

nameOfBinder :: TyVarBndr -> Name Source #

varsBoundInCon :: Con -> [TyVarBndr] Source #

namesBoundInPat :: Pat -> [Name] Source #

namesBoundInDec :: Dec -> [Name] Source #

genericalizeName :: Name -> Name Source #

genericalizeDecs :: [Dec] -> [Dec] Source #

headOfType :: Type -> Name Source #

occursInType :: Name -> Type -> Bool Source #