generics-sop-lens-0.1.3: 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 :: k -> *) xss yss. Iso (NS (NP f) xss) (NS (NP f) yss) (SOP f xss) (SOP f yss) Source #

pop :: forall (f :: k -> *) xss yss. Iso (NP (NP f) xss) (NP (NP f) yss) (POP f xss) (POP f yss) Source #

unsop :: forall (f :: k -> *) xss yss. Iso (SOP f xss) (SOP f yss) (NS (NP f) xss) (NS (NP f) yss) Source #

unpop :: forall (f :: k -> *) 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 :: k -> *) x y. Iso (f x) (f y) (NP f '[x]) (NP f '[y]) Source #

unSingletonP :: forall (f :: k -> *) x y. Iso (NP f '[x]) (NP f '[y]) (f x) (f y) Source #

headLens :: forall (f :: k -> *) x y zs. Lens (NP f (x ': zs)) (NP f (y ': zs)) (f x) (f y) Source #

tailLens :: forall (f :: k -> *) x ys zs. Lens (NP f (x ': ys)) (NP f (x ': zs)) (NP f ys) (NP f zs) Source #

Sums

singletonS :: forall (f :: k -> *) x y. Iso (f x) (f y) (NS f '[x]) (NS f '[y]) Source #

unSingletonS :: forall (f :: k -> *) x y. Iso (NS f '[x]) (NS f '[y]) (f x) (f y) Source #

_Z :: forall (f :: k -> *) x y zs. Prism (NS f (x ': zs)) (NS f (y ': zs)) (f x) (f y) Source #

_S :: forall (f :: k -> *) x ys zs. Prism (NS f (x ': ys)) (NS f (x ': zs)) (NS f ys) (NS f zs) Source #

DatatypeInfo

constructorName :: Lens' (ConstructorInfo xs) ConstructorName Source #

Note: Infix constructor has operator as a ConstructorName. Use as setter with care.

strictnessInfo :: Traversal' (DatatypeInfo xss) (POP StrictnessInfo xss) Source #

Strictness info is only aviable for ADT data. This combinator is available only with generics-sop 0.5 or later.

Orphan instances

Wrapped (I a) Source # 
Instance details

Associated Types

type Unwrapped (I a) :: Type #

Methods

_Wrapped' :: Iso' (I a) (Unwrapped (I a)) #

t ~ I a => Rewrapped (I a) t Source # 
Instance details

Wrapped (K a b) Source # 
Instance details

Associated Types

type Unwrapped (K a b) :: Type #

Methods

_Wrapped' :: Iso' (K a b) (Unwrapped (K a b)) #

Wrapped (POP f xss) Source # 
Instance details

Associated Types

type Unwrapped (POP f xss) :: Type #

Methods

_Wrapped' :: Iso' (POP f xss) (Unwrapped (POP f xss)) #

Wrapped (SOP f xss) Source # 
Instance details

Associated Types

type Unwrapped (SOP f xss) :: Type #

Methods

_Wrapped' :: Iso' (SOP f xss) (Unwrapped (SOP f xss)) #

t ~ K a b => Rewrapped (K a b) t Source # 
Instance details

t ~ POP f xss => Rewrapped (POP f xss) t Source # 
Instance details

t ~ SOP f xss => Rewrapped (SOP f xss) t Source # 
Instance details

Field1 (NP f (x ': zs)) (NP f (y ': zs)) (f x) (f y) Source # 
Instance details

Methods

_1 :: Lens (NP f (x ': zs)) (NP f (y ': zs)) (f x) (f y) #

Field2 (NP f (a2 ': (x ': zs))) (NP f (a2 ': (y ': zs))) (f x) (f y) Source # 
Instance details

Methods

_2 :: Lens (NP f (a2 ': (x ': zs))) (NP f (a2 ': (y ': zs))) (f x) (f y) #

Field3 (NP f (a2 ': (b ': (x ': zs)))) (NP f (a2 ': (b ': (y ': zs)))) (f x) (f y) Source # 
Instance details

Methods

_3 :: Lens (NP f (a2 ': (b ': (x ': zs)))) (NP f (a2 ': (b ': (y ': zs)))) (f x) (f y) #

Field4 (NP f (a2 ': (b ': (c ': (x ': zs))))) (NP f (a2 ': (b ': (c ': (y ': zs))))) (f x) (f y) Source # 
Instance details

Methods

_4 :: Lens (NP f (a2 ': (b ': (c ': (x ': zs))))) (NP f (a2 ': (b ': (c ': (y ': zs))))) (f x) (f y) #

Field5 (NP f (a2 ': (b ': (c ': (d ': (x ': zs)))))) (NP f (a2 ': (b ': (c ': (d ': (y ': zs)))))) (f x) (f y) Source # 
Instance details

Methods

_5 :: Lens (NP f (a2 ': (b ': (c ': (d ': (x ': zs)))))) (NP f (a2 ': (b ': (c ': (d ': (y ': zs)))))) (f x) (f y) #

Field6 (NP f (a2 ': (b ': (c ': (d ': (e ': (x ': zs))))))) (NP f (a2 ': (b ': (c ': (d ': (e ': (y ': zs))))))) (f x) (f y) Source # 
Instance details

Methods

_6 :: Lens (NP f (a2 ': (b ': (c ': (d ': (e ': (x ': zs))))))) (NP f (a2 ': (b ': (c ': (d ': (e ': (y ': zs))))))) (f x) (f y) #

Field7 (NP f' (a2 ': (b ': (c ': (d ': (e ': (f ': (x ': zs)))))))) (NP f' (a2 ': (b ': (c ': (d ': (e ': (f ': (y ': zs)))))))) (f' x) (f' y) Source # 
Instance details

Methods

_7 :: Lens (NP f' (a2 ': (b ': (c ': (d ': (e ': (f ': (x ': zs)))))))) (NP f' (a2 ': (b ': (c ': (d ': (e ': (f ': (y ': zs)))))))) (f' x) (f' y) #

Field8 (NP f' (a2 ': (b ': (c ': (d ': (e ': (f ': (g ': (x ': zs))))))))) (NP f' (a2 ': (b ': (c ': (d ': (e ': (f ': (g ': (y ': zs))))))))) (f' x) (f' y) Source # 
Instance details

Methods

_8 :: Lens (NP f' (a2 ': (b ': (c ': (d ': (e ': (f ': (g ': (x ': zs))))))))) (NP f' (a2 ': (b ': (c ': (d ': (e ': (f ': (g ': (y ': zs))))))))) (f' x) (f' y) #

Field9 (NP f' (a2 ': (b ': (c ': (d ': (e ': (f ': (g ': (h ': (x ': zs)))))))))) (NP f' (a2 ': (b ': (c ': (d ': (e ': (f ': (g ': (h ': (y ': zs)))))))))) (f' x) (f' y) Source # 
Instance details

Methods

_9 :: Lens (NP f' (a2 ': (b ': (c ': (d ': (e ': (f ': (g ': (h ': (x ': zs)))))))))) (NP f' (a2 ': (b ': (c ': (d ': (e ': (f ': (g ': (h ': (y ': zs)))))))))) (f' x) (f' y) #

Field1 (POP f (x ': zs)) (POP f (y ': zs)) (NP f x) (NP f y) Source # 
Instance details

Methods

_1 :: Lens (POP f (x ': zs)) (POP f (y ': zs)) (NP f x) (NP f y) #

Field2 (POP f (a ': (x ': zs))) (POP f (a ': (y ': zs))) (NP f x) (NP f y) Source # 
Instance details

Methods

_2 :: Lens (POP f (a ': (x ': zs))) (POP f (a ': (y ': zs))) (NP f x) (NP f y) #

Field3 (POP f (a ': (b ': (x ': zs)))) (POP f (a ': (b ': (y ': zs)))) (NP f x) (NP f y) Source # 
Instance details

Methods

_3 :: Lens (POP f (a ': (b ': (x ': zs)))) (POP f (a ': (b ': (y ': zs)))) (NP f x) (NP f y) #

Field4 (POP f (a ': (b ': (c ': (x ': zs))))) (POP f (a ': (b ': (c ': (y ': zs))))) (NP f x) (NP f y) Source # 
Instance details

Methods

_4 :: Lens (POP f (a ': (b ': (c ': (x ': zs))))) (POP f (a ': (b ': (c ': (y ': zs))))) (NP f x) (NP f y) #

Field5 (POP f (a ': (b ': (c ': (d ': (x ': zs)))))) (POP f (a ': (b ': (c ': (d ': (y ': zs)))))) (NP f x) (NP f y) Source # 
Instance details

Methods

_5 :: Lens (POP f (a ': (b ': (c ': (d ': (x ': zs)))))) (POP f (a ': (b ': (c ': (d ': (y ': zs)))))) (NP f x) (NP f y) #

Field6 (POP f (a ': (b ': (c ': (d ': (e ': (x ': zs))))))) (POP f (a ': (b ': (c ': (d ': (e ': (y ': zs))))))) (NP f x) (NP f y) Source # 
Instance details

Methods

_6 :: Lens (POP f (a ': (b ': (c ': (d ': (e ': (x ': zs))))))) (POP f (a ': (b ': (c ': (d ': (e ': (y ': zs))))))) (NP f x) (NP f y) #

Field7 (POP f' (a ': (b ': (c ': (d ': (e ': (f ': (x ': zs)))))))) (POP f' (a ': (b ': (c ': (d ': (e ': (f ': (y ': zs)))))))) (NP f' x) (NP f' y) Source # 
Instance details

Methods

_7 :: Lens (POP f' (a ': (b ': (c ': (d ': (e ': (f ': (x ': zs)))))))) (POP f' (a ': (b ': (c ': (d ': (e ': (f ': (y ': zs)))))))) (NP f' x) (NP f' y) #

Field8 (POP f' (a ': (b ': (c ': (d ': (e ': (f ': (g ': (x ': zs))))))))) (POP f' (a ': (b ': (c ': (d ': (e ': (f ': (g ': (y ': zs))))))))) (NP f' x) (NP f' y) Source # 
Instance details

Methods

_8 :: Lens (POP f' (a ': (b ': (c ': (d ': (e ': (f ': (g ': (x ': zs))))))))) (POP f' (a ': (b ': (c ': (d ': (e ': (f ': (g ': (y ': zs))))))))) (NP f' x) (NP f' y) #

Field9 (POP f' (a ': (b ': (c ': (d ': (e ': (f ': (g ': (h ': (x ': zs)))))))))) (POP f' (a ': (b ': (c ': (d ': (e ': (f ': (g ': (h ': (y ': zs)))))))))) (NP f' x) (NP f' y) Source # 
Instance details

Methods

_9 :: Lens (POP f' (a ': (b ': (c ': (d ': (e ': (f ': (g ': (h ': (x ': zs)))))))))) (POP f' (a ': (b ': (c ': (d ': (e ': (f ': (g ': (h ': (y ': zs)))))))))) (NP f' x) (NP f' y) #