unbound-generics-0.4.0: Support for programming with names and binders using GHC Generics

Safe HaskellSafe
LanguageHaskell2010

Unbound.Generics.LocallyNameless.Internal.Iso

Documentation

data Exchange a b s t Source #

Constructors

Exchange (s -> a) (b -> t) 
Instances
Profunctor (Exchange a b) Source # 
Instance details

Defined in Unbound.Generics.LocallyNameless.Internal.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 #

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

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

type Iso s t a b = forall p f. (Profunctor p, Functor f) => p a (f b) -> p s (f t) Source #

type AnIso s t a b = Exchange a b a (Identity b) -> Exchange a b s (Identity t) Source #

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

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

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