ral-optics-0.2: Length-indexed random access lists: optics utilities.
Safe HaskellNone
LanguageHaskell2010

Data.RAVec.Tree.DF.Optics

Synopsis

Indexing

ix :: Wrd n -> Lens' (Tree n a) a Source #

Index lens.

>>> let tree = Node (Node (Leaf 'a') (Leaf 'b')) (Node (Leaf 'c') (Leaf 'd'))
>>> tree & ix (W1 $ W0 WE) .~ 'z'
Node (Node (Leaf 'a') (Leaf 'b')) (Node (Leaf 'z') (Leaf 'd'))

Orphan instances

SNatI n => Each (Wrd n) (Tree n a) (Tree n b) a b Source # 
Instance details

Methods

each :: IxTraversal (Wrd n) (Tree n a) (Tree n b) a b #

Ixed (Tree n a) Source # 
Instance details

Associated Types

type IxKind (Tree n a) #

Methods

ix :: Index (Tree n a) -> Optic' (IxKind (Tree n a)) NoIx (Tree n a) (IxValue (Tree n a)) #