-- 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.1.3 module Language.Haskell.TH.TypeInterpreter -- | Type atom data TypeAtom Integer :: Integer -> TypeAtom String :: String -> TypeAtom Name :: Name -> TypeAtom PromotedName :: Name -> TypeAtom -- | Type equation data TypeEquation TypeEquation :: [TypeExp] -> TypeExp -> TypeEquation -- | Type expression data TypeExp Atom :: TypeAtom -> TypeExp Apply :: TypeExp -> TypeExp -> TypeExp Variable :: Name -> TypeExp Synonym :: Name -> TypeExp -> TypeExp Family :: [TypeEquation] -> TypeExp -- | Get the type expression for a Type. Attempts to reduce the -- resulting type expression. fromType :: Type -> Q TypeExp -- | Get the type expression for a Name. Attempts to reduce the -- resulting type expression. 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 pat input pattern matches input against the -- given pat. match :: TypeExp -> TypeExp -> Maybe (Map Name TypeExp)