generic-lens-0.1.0.0: Generic data-structure operations exposed as lenses.

Copyright(C) 2017 Csongor Kiss
LicenseBSD3
MaintainerCsongor Kiss <kiss.csongor.kiss@gmail.com>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellSafe
LanguageHaskell2010

Data.Generics.Internal.Lens

Description

Internal lens helpers. Only exported for Haddock

Synopsis

Documentation

newtype Identity a Source #

Identity functor

Constructors

Identity 

Fields

Instances

Functor Identity Source #

Functor instance

Methods

fmap :: (a -> b) -> Identity a -> Identity b #

(<$) :: a -> Identity b -> Identity a #

type Lens' s a = forall f. Functor f => (a -> f a) -> s -> f s Source #

Type alias for lens

(^.) :: s -> ((a -> Const a a) -> s -> Const a s) -> a Source #

Getting

set :: ((a -> Identity b) -> s -> Identity t) -> b -> s -> t Source #

Setting

first :: Lens' ((a :*: b) x) (a x) Source #

Lens focusing on the first element of a product

second :: Lens' ((a :*: b) x) (b x) Source #

Lens focusing on the second element of a product

repIso :: Generic a => Lens' a (Rep a x) Source #

A type and its generic representation are isomorphic

lensM :: Lens' (M1 i c f p) (f p) Source #

M1 is just a wrapper around `f p`