lens-4.15.4: Lenses, Folds and Traversals

Copyright | (C) 2012-2016 Edward Kmett
License | BSD-style (see the file LICENSE)
Maintainer | Edward Kmett <ekmett@gmail.com>
Stability | experimental
Portability | non-portable
Safe Haskell | Trustworthy
Language | Haskell98

Control.Lens.Internal.Iso

Description

Synopsis

- data Exchange a b s t = Exchange (s -> a) (b -> t)
- class Reversing t where

# 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 #

Instances

Reversing ByteString Source # |
Methods reversing :: ByteString -> ByteString Source #
Reversing ByteString Source # |
Methods reversing :: ByteString -> ByteString Source #
Reversing Text Source # |
Methods reversing :: Text -> Text Source #
Reversing Text Source # |
Methods reversing :: Text -> Text Source #
Reversing [a] Source # |
Methods reversing :: [a] -> [a] Source #
Reversing (NonEmpty a) Source # |
Methods reversing :: NonEmpty a -> NonEmpty a Source #
Reversing (Seq a) Source # |
Methods reversing :: Seq a -> Seq a Source #
Reversing (Vector a) Source # |
Methods reversing :: Vector a -> Vector a Source #
Storable a => Reversing (Vector a) Source # |
Methods reversing :: Vector a -> Vector a Source #
Unbox a => Reversing (Vector a) Source # |
Methods reversing :: Vector a -> Vector a Source #
Prim a => Reversing (Vector a) Source # |
Methods reversing :: Vector a -> Vector a Source #
Reversing (Deque a) Source # |
Methods reversing :: Deque a -> Deque a Source #