data-diverse-lens-1.0.0.0: Isos & Lens for Data.Diverse.Many and Prisms for Data.Diverse.Which

Safe HaskellNone
LanguageHaskell2010

Data.Diverse.Lens.Many

Contents

Synopsis

Isomorphism

_Many :: IsMany t xs a => Iso' (Many xs) (t xs a) Source #

_Many = iso fromMany toMany

_Many' :: IsMany Tagged xs a => Iso' (Many xs) a Source #

_Many' = iso fromMany' toMany'

Single field

Lens for a single field

class HasItem a b s t | s a b -> t, t a b -> s where Source #

Polymorphic version of item'

Minimal complete definition

item

Methods

item :: Lens s t a b Source #

Instances

(UniqueMember * x xs, (~) [*] ys (Replace * x y xs)) => HasItem x y (Many xs) (Many ys) Source # 

Methods

item :: Lens (Many xs) (Many ys) x y Source #

item' :: HasItem' a s => Lens' s a Source #

Make it easy to create an instance of item using Typed

itemL :: HasItemL l a b s t => Lens s t a b Source #

itemL' :: HasItemL' l a s => Lens' s a Source #

itemTag :: HasItemTag l a b s t => Lens s t a b Source #

itemTag' :: HasItemTag' l a s => Lens' s a Source #

genericItemTag :: forall l a b s t. HasField l s t a b => Lens s t a b Source #

Make it easy to create an instance of itemTag using Fields NB. This is not a default signature for HasItemTag, as this makes GHC think that l must be type Symbol

itemN :: HasItemN n a b s t => Lens s t a b Source #

Make it easy to create an instance of itemN using Positions

itemN' :: HasItemN' n a s => Lens' s a Source #

Multiple fields

Lens for multiple fields

project :: HasProject as bs ss ts a b s t => Lens s t a b Source #

project' :: HasProject' as ss a s => Lens' s a Source #

Make it easy to create an instance of project using Subtype

projectL :: HasProjectL ls as bs ss ts a b s t => Lens s t a b Source #

projectL' :: HasProjectL' ls as ss a s => Lens' s a Source #

projectN :: HasProjectN ns as bs ss ts a b s t => Lens s t a b Source #

projectN' :: HasProjectN' ns as ss a s => Lens' s a Source #