generics-sop-lens-0.1.1.0: Lenses for types in generics-sop

Safe HaskellNone
LanguageHaskell2010

Generics.SOP.Lens

Contents

Description

Lenses for Generics.SOP

Orphan instances:

Wrapped (SOP f xss) -- Also Rewrapped
Wrapped (POP f xss)
Field1 (NP f (x ': zs)) (NP f (y ': zs)) (f x) (f y) -- Field2 etc.
Field1 (POP f (x ': zs)) (NP f (y ': zs)) (NP f x) (NP f y)

Synopsis

Documentation

rep :: Generic a => Iso' a (Rep a) Source

SOP & POP

sop :: forall f xss yss. Iso (NS (NP f) xss) (NS (NP f) yss) (SOP f xss) (SOP f yss) Source

pop :: forall f xss yss. Iso (NP (NP f) xss) (NP (NP f) yss) (POP f xss) (POP f yss) Source

unsop :: forall f xss yss. Iso (SOP f xss) (SOP f yss) (NS (NP f) xss) (NS (NP f) yss) Source

unpop :: forall f xss yss. Iso (POP f xss) (POP f yss) (NP (NP f) xss) (NP (NP f) yss) Source

Functors

isoI :: Iso a b (I a) (I b) Source

isoK :: Iso a b (K a c) (K b c) Source

uni :: Iso (I a) (I b) a b Source

unk :: Iso (K a c) (K b c) a b Source

Products

singletonP :: forall f x y. Iso (f x) (f y) (NP f `[x]`) (NP f `[y]`) Source

unSingletonP :: forall f x y. Iso (NP f `[x]`) (NP f `[y]`) (f x) (f y) Source

headLens :: forall f x y zs. Lens (NP f (x : zs)) (NP f (y : zs)) (f x) (f y) Source

tailLens :: forall f x ys zs. Lens (NP f (x : ys)) (NP f (x : zs)) (NP f ys) (NP f zs) Source

Sums

singletonS :: forall f x y. Iso (f x) (f y) (NS f `[x]`) (NS f `[y]`) Source

unSingletonS :: forall f x y. Iso (NS f `[x]`) (NS f `[y]`) (f x) (f y) Source

_Z :: forall f x y zs. Prism (NS f (x : zs)) (NS f (y : zs)) (f x) (f y) Source

_S :: forall f x ys zs. Prism (NS f (x : ys)) (NS f (x : zs)) (NS f ys) (NS f zs) Source

DatatypeInfo