úÎ BA<õ"      ! non-portable experimentalgenerics@haskell.org "HSame monad to that in the SYB3 paper. It is used as follows: the first I argument contains the original value, and the second arguments contain  the transformed values. LApplies a function to the first subtree (possibly the tree itself) on which * it succeeds, using a preorder traversal. QApplies a function to the first immediate child of a value on which it succeeds. ?Applies a monadic function exhaustively in a top-down fashion. 6Applies a function exhaustively in a top-down fashion @Applies a monadic function exhaustively in a bottom-up fashion. 7Applies a function exhaustively in a bottom-up fashion EApplies a monadic function to all the immediate children of a value. =Applies a function to all the immediate children of a value.  non-portable experimentalgenerics@haskell.orgThe type class Builder- captures the functions, that are defined by < induction on the type argument, that construct appropriate left and  rightA values. These values are used to transform a rule specification  to a rule. ;A view on schemes to easily distinguish metavariables from  pattern functor values. /Allows metavariables on either side of a rule. (Extends the pattern functor of a value. #;Recursively extends a type with a case for a metavariable. $:Extends a pattern functor with a case for a metavariable. +Specifies a rule as a value of a datatype. &Returns the left-hand side of a rule. 'Returns the right-hand side of a rule. Constructs a metavariable. $Constructs a pattern functor value. 'Returns the value corresponding to the  SchemeView. "Recursively converts a value to a SchemeOf value. Folds a Scheme8 value given a function to apply to metavariables and a / function to apply to a pattern functor value. HTransforms a rule specification to a rule and throws a runtime error if D an unbound metavariable occurs in the right-hand side of the rule. 6Transforms a rule specification to a rule and returns Nothing if D an unbound metavariable occurs in the right-hand side of the rule. %HMerges two schemes by preferring the metavariables that occur in either  of the two arguments. &FInserts a metavariable in the right place by zipping two instances of H the function that are applied to different values. These values ensure J that the zipping process fails exactly at the point where a metavariable  is required to be inserted.        non-portable experimentalgenerics@haskell.org 'BA substitution maps a metavariable to a pair of the original term F and the converted term. Both are stored to improve efficiency, since H the right-hand side of a term may caontain multiple occurrences of the  same metavariable. The Rewrite< is a type class synonym, hiding some of the implementation  details. KTo be able to use the rewriting functions, the user is required to provide ! an instance of this type class. CApplies a rule specification to a term, obtaining a monadic value. EApplies a rule specification to a term, obtaining the original term  when rewriting fails. ,Rewrites a term, obtaining a monadic value. !CRewrites a term, obtaining the original term when rewriting fails. (0Matches a term to the left-hand side of a rule. )"Applies a substitution to a term. *IInstantiates all the metavariables in a term, assuming that there are no $ unbound metavariables in the term.  ! ! ! non-portable experimentalgenerics@haskell.org +,-./0123456789:;<=>?@ABCDEFGHIJ non-portable experimentalgenerics@haskell.orgKLMNOPQRSTUVWXYZ[\]^_`abcdefg non-portable experimentalgenerics@haskell.org_KLMNOPQRSTUVWXYZ[\]^_`abcdefg+,-./0123456789:;<=>?@ABCDEFGHIJ  !h      !"#$%&'()*+,-./012312412412512612612712712812912:12;12;12<12=12=12>12?1212@12A12B1CD1CE1CF1CG1CH1CI1CJ1CK1CL1CMNONP1QR1QS1QT1QU1QV1QW1QX1QY1QZ1Q[1Q\1Q]1Q^1Q_1Q`1Qa1Qb1Qc1Qd1Qe1Qf1Qg1Qh1Qi1Qj1Qk1Qlm rewriting-0.2%Generics.Regular.Rewriting.Strategies Generics.Regular.Rewriting.Rules$Generics.Regular.Rewriting.Machinery*Generics.Regular.Rewriting.RepresentationsGenerics.Regular.Rewriting.BaseGenerics.Regular.RewritingonceonetopdownMtopdown bottomupMbottomupcomposMcomposBuilderTargetbasediag SchemeViewPFMetavarRuleSchemeOfRuleSpec:~>lhsRrhsRmetavarpf schemeViewtoScheme foldSchemeruleruleMRewrite applyRuleM applyRulerewriteMrewriteSSchemeExt mergeSchemes insertMetavarSubstmatchapplyinst regular-0.1Generics.Regular.BaseunKKunIIULR:+::*:unCCInFixtofromRegularGenerics.Regular.Constructor conFixityconName ConstructorPrefixInfixFixityLeftAssociativeRightAssociativeNotAssociative AssociativityGHC.BaseFunctorfmapGenerics.Regular.Functions&foldrightleftgshowgeqfzip'fzipflattenfmapMGMapcrushrCrushRfzipMZipgshowfGShowrightbleftbLRBaserightfleftfLRAlgAlgebraalgFold