F      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~  #(c) 2008--2009 Universiteit UtrechtBSD3generics@haskell.org experimental non-portableSafe%&9:;<=CDOQRToIt is in general not necessary to use the generic navigation functions directly. The functions listed in the ` Interface'' section below are more user-friendly.WAbstract type of context frames. Not required for the high-level navigation functions. Abstract type of locations. A location contains the current focus and its context. A location is parameterized over the family of datatypes and over the type of the complete value. mStart navigating a datastructure. Returns a location that focuses the entire value and has an empty context._Operate on the current focus. This function can be used to extract the current point of focus.3Update the current focus without changing its type.+       Safe%&OT  A navigation step in a fixpoint.A location within a fixpoint.)Move down to the leftmost child. Returns ! if the current focus is a leaf.*Move down to the rightmost child. Returns ! if the current focus is a leaf.Move up to the parent. Returns # if the current focus is the root.#Move to the right sibling. Returns 0 if the current focus is the rightmost sibling. "Move to the left sibling. Returns / if the current focus is the leftmost sibling.!>Move through all positions in depth-first left-to-right order.">Move through all positions in depth-first right-to-left order.#:Return the entire value, independent of the current focus.  !"#  !"#  !"#  !"#Safe%:Given a witness, convert the value of that type to String.$%$%$%$%Safe%&OT&$A value of some type in data family s wrapped in an f, together with its witness.($A value of some type in data family s, together with its witness.*Helper constructor.+ Unify an ( with an a.,Helper constructor.- Unify an & with an f a.. Unwrap an & and pass it to a function./#Removes the value from its functor f. &'()*+,-./0 &'()*+,-./ ()*+&',-/. &'()*+,-./0Safe16Captures hints for the exploration of annotated trees.3"Whether the current focus matches.4 Whether to explore the children.5(Whether to explore further to the right.12345123451234512345Safe %&:DOQRT 7A fixpoint of a data family s annotated with an xL at every recursive position, with existentially quantified top-level index.8(A functor with fully annotated children.9A fully annotated tree.:2Supply a tree with an annotation at the top level.;>Removes all annotations from a recursively annotated fixpoint.<4Collects the direct children of a functor in a list.=OFlatten 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.A,Extract the annotation of the current focus.BExplore an annotated tree. Starting with the root of the tree, at each position the annotation at that position is matched against the 1) predicates and all the selections where 3# was positive are collected. The 5 and 4I allow pruning of the tree, preventing entire parts from being visited.CLFind 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.6789:;<=>?@ABC6789:;<=>?@ABC98:7;<=>?@6ABC6789:;<=>?@ABCNone %&:DIRDYield over the identity monad.E@The Yield transformer. Allows yielding generic values in family fam with annotations of type x.F8Monads that allow yielding recursively annotated values.G2Yielded values have types in this datatype family.HThe type of the annotation.I#Yields a value with its annotation.DEFGHIJKLMNO DEFGHIJKLM FGHIEDMLKJ DEFGHIJKLMNOSafeSExcept is like Eithers but is meant to be used only in applicative computations. When two exceptions are sequenced, their sum (using ) is computed.STUVWSTUSTUWVSTUVW Safe/:OTZ!Algebras for error catamorphisms.[Coalgebras for anamorphisms.\Algebras for catamorphisms.]Fixpoint of functors.`3Reduces a tree to a value according to the algebra.a:Constructs a tree from a value according to the coalgebra.b3Apply a transformation to a tree's direct children.cQReduces a tree to a value according to the algebra, propagating potential errors. Z[\]^_`abcd Z[\]^_`abc ]^_b\`[aZc Z[\]^_`abcd SafeOT fCaptures navigation steps in a i. Its ' instance specifies the identity step () and step composition ().ijA quasi-zipper, meant for O(1), fixed-memory stepping through a tree structure, but not meant for updates.k!The current focus of this zipper.lMove up to the parent.mMove to the left sibling.nMove to the right sibling.o"Move down into the leftmost child.pMove into the root of the fixed point. The returned zipper builds a data structure with optimal sharing and fixed memory usage. For example, zLeft >=> zRight4 (if successful) returns to the same node in memory.qKWalk back up to the root of the fixed point and leave the zipper structure.r Move down into a specific child.sFTraverses the tree in preorder, yielding all possible tree selections.fghijklmnopqrstfghijklmnopqrsijklmnopqrsfgh fghijklmnopqrst Safe u(A functor with fully annotated children.vA fully annotated tree.wLifted annotation of functors.y2Supply a tree with an annotation at the top level.z.Yields the annotation at the root of the tree.{ Recursively discard annotations.|Reduces a tree to a value according to the algebra, collecting potential errors. The errors are combined with the annotations in the tree at the positions at which the errors occurred.}Explore an annotated tree. Starting with the root of the tree, at each position the annotation at that position is matched against the 1) predicates and all the selections where 3# was positive are collected. The 5 and 4I allow pruning of the tree, preventing entire parts from being visited.~LFind 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.uvwxyz{|}~ uvwxyz{|}~ wxvzuy{|}~ uvwxyz{|}~ Safe %&9;DOQRTVConverts convenient algebras to algebras that are able to work with pattern functors.GType family that converts pattern functors to convenient algebra types.'An error algebra over pattern functors.Reduces a tree to a value according to the algebra, collecting potential errors. The errors are combined with the annotations in the tree at the positions at which the errors occurred.For constructing algebras that are made of nested pairs rather than n-ary tuples, it is helpful to use this pairing combinator.  5 Safe A structural selection expressed as a textual selection. The margins indicate the whitespace directly around the selected structure.bA simple textual selection: starting offset and ending offset, respectively. Offsets are 0-based.A BoundsL' inner range does not include the whitespace around the selected structure.A BoundsD' outer range includes the whitespace around the selected structure.6Tells whether the offset falls within the given range.>Tells whether the first range is enclosed by the second range.A range is within certain bounds if its left offset is within the bounds' left margin and its right offset is within the bounds' right margin.rangesInBounds b yields all those ranges r for which rangeInBounds r b.3A measure for the dissimilarity between two ranges. 3distRange (l1, r1) (l2, r2) = |l1 - l2| + |r1 - r2| SafeA parser that works on symbols coupled with token information. The state maintains the current position in the stream. This position is the range of whitespace between two tokens.=Symbols form input for parsers. Minimal complete definition: ..Unparses a symbol, converting it back to text.7Yields the size of a symbol. Default implementation is length . unparse.Given a predicate that tells what tokens to discard, keeps only the meaningful tokens and couples them with position information.(Yield the current position in the input.(Recognise a symbol matching a predicate.Recognise a specific symbol. SafeGiven the left margin of a structure, asks the parser for the right margin and wraps the position information around the root of the tree.FWrap an unnotated tree with position information from the parse state.!Parse right-recursive structures. Parse left-recursive structures.Safe>Find the deepest node whose bounds match the given range. See .>Find the deepest node whose bounds contain the given position.Find all selections in the tree and return their bounds. The tree is traversed in preorder. Consequently, the bounds are returned in lexicographical order.repairBy cost tree range/ finds the the closest valid text selection to range , where 'closest'. is determined by the specified cost function. Defined as  .'Move around in a tree according to the f+, expressed in tree selections. Although a  is required as input, a s is returned, providing information about all the valid text selections that would select the particular tree node.None:4A parser that yields its components, annotated with .FWrap an unnotated tree with position information from the parse state.Given the left margin of a structure, asks the parser for the right margin and wraps the position information around the root of the tree.!Parse right-recursive structures. Parse left-recursive structures.Safe:OQRT>Find the deepest node whose bounds match the given range. See . Defined as  .'Move around in a tree according to the +, expressed in tree selections. Although a  is required as input, a s is returned, providing information about all the valid text selections that would select the particular tree node. !"#$%&'()*+,-./012345678899:;<=>?@AABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefgh i j k l m n o p q r s t , , u   v w x y z  5 { | } G H ~ ~ I  J Q R       T  (Annotations-0.2.2-HMYRPjC7EOIHTvyLsfbq8LAnnotations.MultiRec.ZipperAnnotations.MultiRec.ZipperFixAnnotations.MultiRec.ShowFamAnnotations.MultiRec.AnyAnnotations.ExploreHintsAnnotations.MultiRec.AnnotatedAnnotations.MultiRec.YieldAnnotations.ExceptAnnotations.F.FixpointsAnnotations.F.ZipperAnnotations.F.AnnotatedAnnotations.MultiRec.ErrorAlgAnnotations.BoundsAnnotations.BoundsParserAnnotations.F.ParserCombinatorsAnnotations.F.Positional&Annotations.MultiRec.ParserCombinatorsAnnotations.MultiRec.PositionalZippercmapAfillfirstlastnextprevCtxCtxsEmptyPushLocenteronupdate $fZipperphiC$fZipperphi:>:$fZipperphi:*:$fZipperphi:+: $fZipperphiU $fZipperphiK $fZipperphiI$fHFunctorphiLoc$fHFunctorphiCtxs$fHFunctorphiCtxNav FixZipperdowndown'uprightleftdfnextdfprevleaveShowFamshowFamAnyFAnymkAnymatchAnymkAnyF matchAnyF$? unwrapAnyF $fShowAny ExploreHints matchHere exploreDown exploreRight AnnZipper AnyAnnFixAnnFix1AnnFixmkAnnFix unannotatechildrenflatten filterAnnFix debugFlattenallAnnotationsfocusAnnexplorefindLeftmostDeepestYieldYieldT MonadYieldYieldFamAnnTypeyield runYieldTG runYieldT runYieldGrunYield$fMonadYieldYieldT$fMonadTransYieldT$fFunctorYieldT$fApplicativeYieldT $fMonadYieldTExceptFailedOK$fApplicativeExcept$fFunctorExcept $fEqExcept $fShowExcept ErrorAlgebra CoalgebraAlgebraFixInoutcataanacomposcascade$fEqFix $fShowFixnavzFocuszUpzLeftzRightzDownchildallFoci $fMonoidNavAnnrootAnn errorCata$fTraversableAnn $fFoldableAnn $fFunctorAnn$fEqAnn $fShowAnn MkErrorAlg mkErrorAlgErrorAlg ErrorAlg_PF&$fMkErrorAlg:+:$fMkErrorAlg:>:$fMkErrorAlg:*:$fMkErrorAlg:*:0 $fMkErrorAlgUBounds leftMargin rightMarginRange innerRange outerRange posInRange rangeInRange rangeInBoundsrangesInBounds distRange $fEqBounds $fShowBoundsPSymbolunparse symbolSizecollapsegetPossatisfypToken $fSymbol[] mkBoundedunitchainrchainl selectByRange selectByPos validBoundsrepairByrepair moveSelectionYPsortOnCCCTagCIdC1C2CLCR impossiblecastIdcastTag D:R:CtxCbrix0D:R:Ctx:>:brix0 D:R:CtxIbrix0D:R:Ctx:*:brix0D:R:Ctx:+:brix0 D:R:CtxUbrix0 D:R:CtxKbrix0baseGHC.BaseNothingdfshowAnysnd'explore'doYield distributemappendmapFixMonoidmemptyenter'allFoci' collapse'