Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- unappliedName :: Type -> Maybe Name
- tvName :: TyVarBndr -> Name
- bindVar :: Name -> TyVarBndr
- substTypeVar :: Name -> Type -> Type -> Type
- substTypeVars :: [(Name, Type)] -> Type -> Type
- splitType :: Type -> ([Name], Cxt, [Type])
- freeTypeVars :: Type -> [Name]
- relevantContext :: Type -> ([Name], Cxt) -> ([Name], Cxt)
- constrainVars :: [TypeQ] -> [Name] -> CxtQ
- unifyTypes :: Type -> Type -> Q (Maybe [(Name, Type)])
- removeModNames :: Data a => a -> a
- hasPolyType :: Type -> Bool
- hasNestedPolyType :: Type -> Bool
- resolveInstance :: Name -> Type -> Q (Maybe Cxt)
- simplifyContext :: Cxt -> Q (Maybe Cxt)
- localizeMember :: Type -> Name -> Type -> Q Type
Documentation
freeTypeVars :: Type -> [Name] Source #
removeModNames :: Data a => a -> a Source #
hasPolyType :: Type -> Bool Source #
hasNestedPolyType :: Type -> Bool Source #
localizeMember :: Type -> Name -> Type -> Q Type Source #
Remove instance context from a method.
Some GHC versions report class members including the instance context (for
example, show :: Show a => a -> String
, instead of show :: a -> String
).
This looks for the instance context, and substitutes if needed to eliminate
it.