multivariant-0.1.0.1: Multivariant assignments generation language

Safe HaskellSafe
LanguageHaskell2010

Data.Invertible.Profunctor

Synopsis

Documentation

class IsoProfunctor p where Source #

Class IsoProfunctor represents a profunctor from Iso -> Hask (?)

dimap id idid
 lmap idid
 rmap idid
dimap f g ≡ lmap f . rmap g
dimap (f . g) (h . i) ≡ dimap g h . dimap f i
lmap (f . g) ≡ lmap g . lmap f
rmap (f . g) ≡ rmap f . rmap g

Methods

dimap :: (a <-> b) -> (c <-> d) -> p b c -> p a d Source #

lmap :: (a <-> b) -> p b c -> p a c Source #

rmap :: (b <-> c) -> p a b -> p a c Source #

Instances

IsoProfunctor (Bijection (->)) Source # 

Methods

dimap :: (a <-> b) -> (c <-> d) -> Bijection (->) b c -> Bijection (->) a d Source #

lmap :: (a <-> b) -> Bijection (->) b c -> Bijection (->) a c Source #

rmap :: (b <-> c) -> Bijection (->) a b -> Bijection (->) a c Source #

IsoProfunctor b => IsoProfunctor (FreeA b) Source # 

Methods

dimap :: (a <-> b) -> (c <-> d) -> FreeA b b c -> FreeA b a d Source #

lmap :: (a <-> b) -> FreeA b b c -> FreeA b a c Source #

rmap :: (b <-> c) -> FreeA b a b -> FreeA b a c Source #