License | BSD-style (see the file LICENSE) |
---|---|
Maintainer | sjoerd@w3future.com |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Synopsis
- fromIdentity :: Square '[] '[] '[Identity] '[]
- toIdentity :: Square '[] '[] '[] '[Identity]
- fromCompose :: (Functor f, Functor g) => Square '[] '[] '[Compose g f] '[f, g]
- fromComposeStar :: (Functor f, Functor g) => Square '[Star (Compose f g)] '[Star f, Star g] '[] '[]
- fromComposeCostar :: (Functor f, Functor g) => Square '[Costar f, Costar g] '[Costar (Compose g f)] '[] '[]
- toCompose :: (Functor f, Functor g) => Square '[] '[] '[f, g] '[Compose g f]
- toComposeStar :: (Functor f, Functor g) => Square '[Star f, Star g] '[Star (Compose f g)] '[] '[]
- toComposeCostar :: (Functor f, Functor g) => Square '[Costar (Compose g f)] '[Costar f, Costar g] '[] '[]
Squares for Identity
fromIdentity :: Square '[] '[] '[Identity] '[] Source #
+--I--+ | v | | @ | | | +-----+
toIdentity :: Square '[] '[] '[] '[Identity] Source #
+-----+ | | | @ | | v | +--I--+
Squares for Compose
fromCompose :: (Functor f, Functor g) => Square '[] '[] '[Compose g f] '[f, g] Source #
+-g.f-+ | v | | /@\ | | v v | +-f-g-+
fromComposeStar :: (Functor f, Functor g) => Square '[Star (Compose f g)] '[Star f, Star g] '[] '[] Source #
+-----+ f /->f .>-@ | g \->g +-----+
fromComposeStar = fromLeft === fromCompose === toRight2
fromComposeCostar :: (Functor f, Functor g) => Square '[Costar f, Costar g] '[Costar (Compose g f)] '[] '[] Source #
+-----+ f<-\ g | @-<. g<-/ f +-----+
fromComposeCostar = fromRight === fromCompose === toLeft2
toCompose :: (Functor f, Functor g) => Square '[] '[] '[f, g] '[Compose g f] Source #
+-f-g-+ | v v | | \@/ | | v | +-g.f-+