ral-optics-0.2.1: Length-indexed random access lists: optics utilities.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.RAVec.Tree.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'))
>>> set (ix (W1 $ W0 WE)) 'z' tree
Node (Node (Leaf 'a') (Leaf 'b')) (Node (Leaf 'z') (Leaf 'd'))

Orphan instances

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)) #