-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Controls how the compiler searches for instances using type families. -- -- GHC has no capability to perform graph searches on instance -- definition. Because of that, transitive rules for type classes cannot -- be defined. This package solves the issue with type functions -- performing a search on the graph where nodes are types and edges are -- rules from a given rule database. After constructing the type-level -- representation of the wanted path, the system constructs the needed -- functions from the value-level representation of the database. @package instance-control @version 0.1.2.0 module Control.Instances.Morph -- | A generalized version of Morph. Can work on different rulesets, -- so this should be used if the ruleset is to be extended. type GenMorph db m1 m2 = (CorrectPath m1 m2 (Path db m1 m2), GeneratableMorph db (Path db m1 m2), Morph' (Path db m1 m2) m1 m2) type DB = ConnectMorph_2m Maybe MaybeT :+: (ConnectMorph_mt MaybeT :+: (ConnectMorph Maybe [] :+: (ConnectMorph_2m [] ListT :+: (ConnectMorph (MaybeT IO) (ListT IO) :+: NoMorph)))) db :: DB -- | States that m1 can be represented with m2. That is -- because m2 contains more infromation than m1. -- -- The MMorph relation defines a natural transformation from -- m1 to m2 that keeps the following laws: -- --
--   morph (return x)  =  return x
--   morph (m >>= f)   =  morph m >>= morph . f
--   
-- -- It is a reflexive and transitive relation. type Morph m1 m2 = GenMorph DB m1 m2 -- | Lifts the first monad into the second. morph :: Morph m1 m2 => m1 a -> m2 a instance forall k r (y :: k -> *) (z :: k -> *) (x :: k -> *). Control.Instances.Morph.Morph' r y z => Control.Instances.Morph.Morph' (Control.Instances.Morph.ConnectMorph x y Control.Instances.Morph.:+: r) x z instance (Control.Instances.Morph.Morph' r m x, GHC.Base.Monad m) => Control.Instances.Morph.Morph' (Control.Instances.Morph.IdentityMorph m Control.Instances.Morph.:+: r) Data.Functor.Identity.Identity x instance forall k (m :: k -> *) r. Control.Instances.Morph.Morph' (Control.Instances.Morph.MUMorph m Control.Instances.Morph.:+: r) m Data.Proxy.Proxy instance forall k (x :: k -> *). Control.Instances.Morph.Morph' Control.Instances.Morph.NoMorph x x instance Control.Instances.Morph.GeneratableMorph db Control.Instances.Morph.NoMorph instance Control.Instances.Morph.GeneratableMorph db r => Control.Instances.Morph.GeneratableMorph db (Control.Instances.Morph.IdentityMorph m Control.Instances.Morph.:+: r) instance forall k db r (m :: k). Control.Instances.Morph.GeneratableMorph db r => Control.Instances.Morph.GeneratableMorph db (Control.Instances.Morph.MUMorph m Control.Instances.Morph.:+: r) instance forall k db (a :: k -> *) (b :: k -> *) r. (Control.Instances.Morph.HasMorph db (Control.Instances.Morph.ConnectMorph a b), Control.Instances.Morph.GeneratableMorph db r) => Control.Instances.Morph.GeneratableMorph db (Control.Instances.Morph.ConnectMorph a b Control.Instances.Morph.:+: r) instance forall k (k1 :: * -> *) (a :: k -> *) (b :: (* -> *) -> k -> *) r. GHC.Base.Monad k1 => Control.Instances.Morph.HasMorph (Control.Instances.Morph.ConnectMorph_2m a b Control.Instances.Morph.:+: r) (Control.Instances.Morph.ConnectMorph a (b k1)) instance GHC.Base.Monad k => Control.Instances.Morph.HasMorph (Control.Instances.Morph.ConnectMorph_mt t Control.Instances.Morph.:+: r) (Control.Instances.Morph.ConnectMorph k (t k)) instance Control.Instances.Morph.HasMorph r m => Control.Instances.Morph.HasMorph (c Control.Instances.Morph.:+: r) m instance Control.Instances.Morph.HasMorph (m Control.Instances.Morph.:+: r) m instance forall k k1 (from :: k1) (to :: k) a b. Control.Instances.Morph.CorrectPath from to (a Control.Instances.Morph.:+: b) instance forall k k1 (from :: k1) (to :: k). Control.Instances.Morph.CorrectPath from to Control.Instances.Morph.NoMorph