Annotations-0.2.2: Constructing, analyzing and destructing annotated trees

Safe HaskellSafe
LanguageHaskell98

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 :: Nav Source #

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

down' :: Nav Source #

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

up :: Nav Source #

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

right :: Nav Source #

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

left :: Nav Source #

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

dfnext :: Nav Source #

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

dfprev :: Nav Source #

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

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

Return the entire value, independent of the current focus.