-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Solve type equalities using custom type-level rewrite rules
--
-- A typechecker plugin which allows the user to specify a set of
-- domain-specific rewrite rules. These get applied whenever the compiler
-- is unable to solve a type equality constraint, in the hope that the
-- rewritten equality constraint will be easier to solve.
@package typelevel-rewrite-rules
@version 0.1
module TypeLevel.Append
type family (++) as bs
type RightIdentity as = (as ++ '[]) ~ as
type RightAssociative as bs cs = ((as ++ bs) ++ cs) ~ (as ++ (bs ++ cs))
module TypeLevel.Rewrite.Internal.Lookup
lookupModule :: String -> TcPluginM Module
lookupTyCon :: String -> String -> TcPluginM TyCon
lookupDataCon :: String -> String -> TcPluginM DataCon
splitFirstDot :: String -> Maybe (String, String)
splitLastDot :: String -> Maybe (String, String)
lookupFQN :: String -> TcPluginM TyCon
module TypeLevel.Rewrite.Internal.Term
-- | an expression like (as ++ '[]) ++ bs would be represented as
-- Fun appendTyCon [Var "as", Fun nilTyCon [] or rather Fun
-- appendTyCon [Fun starTyCon [], Var "as", Fun nilTyCon [Fun starTyCon
-- []] because those polymorphic TyCons need to be specialized to
-- the * kind
atomTerm :: f -> Term f v
module TypeLevel.Rewrite.Internal.TypeEq
-- | A newtype around Type which has an Eq instance.
newtype TypeEq
TypeEq :: Type -> TypeEq
[unTypeEq] :: TypeEq -> Type
instance GHC.Classes.Eq TypeLevel.Rewrite.Internal.TypeEq.TypeEq
module TypeLevel.Rewrite.Internal.TypeTemplate
type TypeTemplate = Term TyCon TyVar
toTypeTemplate_maybe :: Type -> Maybe TypeTemplate
module TypeLevel.Rewrite.Internal.TypeTerm
type TypeTerm = Term TyCon TypeEq
toTypeTerm :: Type -> TypeTerm
fromTypeTerm :: TypeTerm -> Type
module TypeLevel.Rewrite.Internal.TypeRule
type TypeRule = Rule TyCon TyVar
toTypeRule_maybe :: Type -> Maybe TypeRule
applyRules :: [TypeRule] -> TypeTerm -> TypeTerm
module TypeLevel.Rewrite.Internal.PrettyPrint
pprMaybe :: (a -> String) -> Maybe a -> String
pprList :: (a -> String) -> [a] -> String
pprTyCon :: TyCon -> String
pprType :: Type -> String
pprTyVar :: TyVar -> String
pprTypeEq :: TypeEq -> String
pprTerm :: (f -> String) -> (v -> String) -> Term f v -> String
pprRule :: (f -> String) -> (v -> String) -> Rule f v -> String
pprReduct :: (f -> String) -> (v -> String) -> (v' -> String) -> Reduct f v v' -> String
pprTypeTemplate :: TypeTemplate -> String
pprTypeTerm :: TypeTerm -> String
pprTypeRule :: TypeRule -> String
pprTypeReduct :: Reduct TyCon TypeEq TyVar -> String
module TypeLevel.Rewrite
plugin :: Plugin