-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Interpreter for Template Haskell types -- -- Interpreter for Template Haskell types @package type-interpreter @version 0.0.0 module Language.Haskell.TH.TypeInterpreter -- | Type atom data TypeAtom Integer :: Integer -> TypeAtom String :: String -> TypeAtom Name :: Name -> TypeAtom PromotedName :: Name -> TypeAtom -- | Type expression data TypeExp Atom :: TypeAtom -> TypeExp Apply :: TypeExp -> TypeExp -> TypeExp Variable :: Name -> TypeExp Synonym :: Name -> TypeExp -> TypeExp Family :: (TypeExp -> TypeExp) -> TypeExp -- | Get the type expression for a Type. fromType :: Type -> Q TypeExp -- | Get the type expression for a Name. fromName :: Name -> Q TypeExp -- | substitute name typ exp replaces all occurences of -- name in exp with typ. substitute :: Name -> TypeExp -> TypeExp -> TypeExp -- | Just like substitute but for more variables. substituteAll :: Map Name TypeExp -> TypeExp -> TypeExp -- | Try to reduce the given type expression as much as possible. reduce :: TypeExp -> TypeExp -- | match pattern input pattern matches input against -- the given pattern. match :: TypeExp -> TypeExp -> Maybe (Map Name TypeExp) -- | familyExp n impl creates a type family expression with -- n parameters and the implementation impl. familyExp :: Int -> ([TypeExp] -> TypeExp) -> TypeExp