Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
- 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
- type Morph m1 m2 = GenMorph DB m1 m2
- morph :: Morph m1 m2 => m1 a -> m2 a
Documentation
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) Source #
A generalized version of Morph
. Can work on different
rulesets, so this should be used if the ruleset is to be extended.
type DB = ConnectMorph_2m Maybe MaybeT :+: (ConnectMorph_mt MaybeT :+: (ConnectMorph Maybe [] :+: (ConnectMorph_2m [] ListT :+: (ConnectMorph (MaybeT IO) (ListT IO) :+: NoMorph)))) Source #
type Morph m1 m2 = GenMorph DB m1 m2 Source #
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.