lens-4.14: Lenses, Folds and Traversals

Copyright(C) 2012-2016 Edward Kmett
LicenseBSD-style (see the file LICENSE)
MaintainerEdward Kmett <ekmett@gmail.com>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellTrustworthy
LanguageHaskell98

Control.Lens.Internal.Iso

Description

 

Synopsis

Documentation

data Exchange a b s t Source #

This is used internally by the Iso code to provide efficient access to the two functions that make up an isomorphism.

Constructors

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

Instances

Profunctor (Exchange a b) Source # 

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 #

Functor (Exchange a b s) Source # 

Methods

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

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

class Reversing t where Source #

This class provides a generalized notion of list reversal extended to other containers.

Minimal complete definition

reversing

Methods

reversing :: t -> t Source #