proton-0.0.4
Safe HaskellNone
LanguageHaskell2010

Proton.Iso

Documentation

type Iso s t a b = forall p. Profunctor p => p a b -> p s t Source #

type Iso' s a = Iso s s a a Source #

iso :: (s -> a) -> (b -> t) -> Iso s t a b Source #

from :: Iso s t a b -> Iso b a t s Source #

withIso :: Iso s t a b -> ((s -> a) -> (b -> t) -> r) -> r Source #

under :: Iso s t a b -> (t -> s) -> b -> a Source #

mapping :: (Functor f, Functor g) => Iso s t a b -> Iso (f s) (g t) (f a) (g b) Source #

involuted :: (a -> a) -> Iso' a a Source #

data Exchange a b s t Source #

Constructors

Exchange (s -> a) (b -> t) 

Instances

Instances details
Profunctor (Exchange a b) Source # 
Instance details

Defined in Proton.Iso

Methods

dimap :: (a0 -> b0) -> (c -> d) -> Exchange a b b0 c -> Exchange a b a0 d #

lmap :: (a0 -> b0) -> Exchange a b b0 c -> Exchange a b a0 c #

rmap :: (b0 -> c) -> Exchange a b a0 b0 -> Exchange a b a0 c #

(#.) :: forall a0 b0 c q. Coercible c b0 => q b0 c -> Exchange a b a0 b0 -> Exchange a b a0 c #

(.#) :: forall a0 b0 c q. Coercible b0 a0 => Exchange a b b0 c -> q a0 b0 -> Exchange a b a0 c #

Functor (Exchange a b s) Source # 
Instance details

Defined in Proton.Iso

Methods

fmap :: (a0 -> b0) -> Exchange a b s a0 -> Exchange a b s b0 #

(<$) :: a0 -> Exchange a b s b0 -> Exchange a b s a0 #