lens-4.2: Lenses, Folds and Traversals

Copyright(C) 2012-14 Edward Kmett
LicenseBSD-style (see the file LICENSE)
MaintainerEdward Kmett <ekmett@gmail.com>
Stabilityexperimental
PortabilityGHC
Safe HaskellSafe-Inferred
LanguageHaskell98

GHC.Generics.Lens

Description

Note: GHC.Generics exports a number of names that collide with Control.Lens.

You can use hiding or imports to mitigate this to an extent, and the following imports, represent a fair compromise for user code:

import Control.Lens hiding (Rep)
import GHC.Generics hiding (from, to)

You can use generic to replace from and to from GHC.Generics, and probably won't be explicitly referencing Rep from Control.Lens in code that uses generics.

This module provides compatibility with older GHC versions by using the generic-deriving package.

Documentation

_V1 :: Over p f (V1 s) (V1 t) a b Source

_U1 :: Iso (U1 p) (U1 q) () () Source

_Par1 :: Iso (Par1 p) (Par1 q) p q Source

_Rec1 :: Iso (Rec1 f p) (Rec1 g q) (f p) (g q) Source

_K1 :: Iso (K1 i c p) (K1 j d q) c d Source

_M1 :: Iso (M1 i c f p) (M1 j d g q) (f p) (g q) Source

_L1 :: Prism' ((f :+: g) a) (f a) Source

_R1 :: Prism' ((f :+: g) a) (g a) Source