unbound-generics-0.3.3: Support for programming with names and binders using GHC Generics
Unbound.Generics.LocallyNameless.Internal.Iso
data Exchange a b s t Source #
Constructors
Instances
Methods
dimap :: (a -> b) -> (c -> d) -> Exchange a b b c -> Exchange a b a d #
lmap :: (a -> b) -> Exchange a b b c -> Exchange a b a c #
rmap :: (b -> c) -> Exchange a b a b -> Exchange a b a c #
(#.) :: Coercible * c b => (b -> c) -> Exchange a b a b -> Exchange a b a c #
(.#) :: Coercible * b a => Exchange a b b c -> (a -> b) -> Exchange a b a 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 #