- type AnnFix x s = HFix (K x :*: PF s)
- type AnnFix1 x s = PF s (AnnFix x s)
- mkAnnFix :: x -> AnnFix1 x s ix -> AnnFix x s ix
- type AnyAnnFix x s = AnyF s (AnnFix x s)
- unannotate :: HFunctor s (PF s) => s ix -> AnnFix x s ix -> HFix (PF s) ix
- children :: HFunctor s f => s ix -> f r ix -> [AnyF s r]
- flatten :: forall s x ix. (HFunctor s (PF s), Fam s) => s ix -> AnnFix x s ix -> [(x, Any s)]
- filterAnnFix :: (Fam s, HFunctor s (PF s)) => s ix -> (x -> Bool) -> AnnFix x s ix -> [(x, Any s)]
- debugFlatten :: (HFunctor s (PF s), ShowFam s, Show x, Fam s) => s ix -> AnnFix x s ix -> IO ()
- allAnnotations :: HFunctor phi (PF phi) => phi ix -> AnnFix x phi ix -> [x]
- type AnnZipper phi x = FixZipper phi (K x :*: PF phi)
- focusAnn :: Loc phi f (HFix (K x :*: g)) ix -> x
- explore :: Zipper phi (PF phi) => phi ix -> (x -> ExploreHints) -> AnnFix x phi ix -> [AnnZipper phi x ix]
- findLeftmostDeepest :: Zipper phi (PF phi) => phi ix -> (x -> Bool) -> AnnFix x phi ix -> Maybe (AnnZipper phi x ix)
Supply a tree with an annotation at the top level.
A fixpoint of a data family
s annotated with an
x at every recursive position, with existentially quantified top-level index.
Removes all annotations from a recursively annotated fixpoint.
Collects the direct children of a functor in a list.
Flatten an annotated tree to a list of subtrees coupled with their annotations.
Yield all subtrees whose annotation matches the predicate.
Flatten an annotated tree and print all subtrees to stdout.
Recursively yield all annotations in the tree in preorder.
Explore an annotated tree. Starting with the root of the tree, at each
position the annotation at that position is matched against the
ExploreHints predicates and all the selections where
positive are collected. The
exploreDown allow pruning
of the tree, preventing entire parts from being visited.
Find the deepest node in an annotated tree that matches the predicate. Starting with the root, the predicate tells whether a node's annotation matches. If so, the search continues at the node's children and the node's siblings to the right are excluded from further exploration. If no child matches, the node itself is returned.