mirror of
https://github.com/circuithub/rel8.git
synced 2024-09-17 19:59:38 +03:00
Document Rewrite
This commit is contained in:
parent
76241eb96d
commit
658b4e7d6e
@ -18,6 +18,10 @@ import Rel8.HigherKinded
|
||||
import Rel8.Top
|
||||
|
||||
|
||||
-- | @Rewrite f g a b@ says that @a@ can be rewritten into @b@ by changing the
|
||||
-- underlying data functor from @f@ to @g@. For higher-kinded data types, this
|
||||
-- is akin to a map operation @t f -> t g@, but this class specifically doesn't
|
||||
-- talk about higher-kinded data in order to be more general.
|
||||
class Rewrite f g a b | f g a -> b, a -> f, b -> g, f g b -> a where
|
||||
rewrite :: ( forall x. C f x -> C g x ) -> a -> b
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user