instance-control-0.1.1.1: Controls how the compiler searches for instances using type families.

Safe HaskellSafe
LanguageHaskell2010

Control.Instances.Morph

Synopsis

Documentation

class GenMorph db m1 m2 where Source #

A generalized version of Morph. Can work on different rulesets, so this should be used if the ruleset is to be extended.

Minimal complete definition

genMorph

Methods

genMorph :: db -> m1 a -> m2 a Source #

Lifts the first monad into the second.

class Morph m1 m2 where 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.

Minimal complete definition

morph

Methods

morph :: m1 a -> m2 a Source #

Lifts the first monad into the second.

Instances

GenMorph DB m1 m2 => Morph m1 m2 Source # 

Methods

morph :: m1 a -> m2 a Source #