type-interpreter-0.0.0: Interpreter for Template Haskell types

Safe HaskellNone
LanguageHaskell2010

Language.Haskell.TH.TypeInterpreter

Synopsis

Documentation

fromType :: Type -> Q TypeExp Source #

Get the type expression for a Type.

fromName :: Name -> Q TypeExp Source #

Get the type expression for a Name.

substitute :: Name -> TypeExp -> TypeExp -> TypeExp Source #

substitute name typ exp replaces all occurences of name in exp with typ.

substituteAll :: Map Name TypeExp -> TypeExp -> TypeExp Source #

Just like substitute but for more variables.

reduce :: TypeExp -> TypeExp Source #

Try to reduce the given type expression as much as possible.

match :: TypeExp -> TypeExp -> Maybe (Map Name TypeExp) Source #

match pattern input pattern matches input against the given pattern.

familyExp :: Int -> ([TypeExp] -> TypeExp) -> TypeExp Source #

familyExp n impl creates a type family expression with n parameters and the implementation impl.