Annotations-0.1.3: Constructing, analyzing and destructing annotated trees

Annotations.MultiRec.ZipperFix

Description

Zipper functions specialised to work on fixpoints of pattern functors.

Synopsis

Documentation

type Nav = forall phi f ix. Zipper phi f => FixZipper phi f ix -> Maybe (FixZipper phi f ix)Source

A navigation step in a fixpoint.

type FixZipper phi f = Loc phi f (HFix f)Source

A location within a fixpoint.

down :: NavSource

Move down to the leftmost child. Returns Nothing if the current focus is a leaf.

down' :: NavSource

Move down to the rightmost child. Returns Nothing if the current focus is a leaf.

up :: NavSource

Move up to the parent. Returns Nothing if the current focus is the root.

right :: NavSource

Move to the right sibling. Returns Nothing if the current focus is the rightmost sibling.

left :: NavSource

Move to the left sibling. Returns Nothing if the current focus is the leftmost sibling.

dfnext :: NavSource

Move through all positions in depth-first left-to-right order.

dfprev :: NavSource

Move through all positions in depth-first right-to-left order.

leave :: Zipper phi f => Loc phi f (HFix f) ix -> HFix f ixSource

Return the entire value, independent of the current focus.