h$a[      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                                                                                      '(c) 2012--2021 The University of KansasBSD3+Neil Sculthorpe betaghc Safe-Inferred kure0Apply a pure function to the result of an arrow.kure2Apply a pure function to the argument to an arrow.kureApply an arrow to the first element of a pair, discarding the second element.kureApply an arrow to the second element of a pair, discarding the first element.kure/A pure arrow that swaps the elements of a pair.kure*A pure arrow that duplicates its argument.kure-Tag the result of an arrow with its argument.kure-Tag the result of an arrow with its argument.kure An arrow with a constant result. kure.Sequence (from left to right) a collection of s. kureApply a collection of arrows to the same input, combining their results in a monoid.   '(c) 2012--2021 The University of KansasBSD3+Neil Sculthorpe betaghc Safe-Inferred : kure Similar to guard, but invokes  rather than mzero. kureAs  #, but with a default error message. kureAs  , but with an m Bool as argument.kure-if-then-else lifted over a monadic predicate.kureIf the monadic predicate holds then perform the monadic action, else fail.kureIf the monadic predicate holds then fail, else perform the monadic action.  '(c) 2012--2021 The University of KansasBSD3+Neil Sculthorpe betaghc Safe-Inferred0]kure5 is the minimal structure that can be an instance of ). The KURE user is free to either use  or provide their own monad.  is essentially the same as  , except that it supports a  instance which   does not (because its  method calls ) A major advantage of this is that monadic pattern match failures are caught safely.kures with a catch for -. The following laws are expected to hold: betaghc Safe-Inferred.0+kure=A transformation that shares the same source and target type.,kureA deprecated synonym for -.-kureAn abstract representation of a transformation from a value of type a in a context c to a monadic value of type m b . The -. type is the basis of the entire KURE library..kure2Apply a transformation to a value and its context./kure/The primitive way of building a transformation.0kureA deprecated synonym for /.1kure(The primitive way of building a rewrite.2kure+Apply a rewrite to a value and its context.3kureA deprecated synonym for ..4kureBuild a -$ that doesn't depend on the context.5kureBuild a -" that doesn't depend on the value.6kureBuild a constant - from a monadic computation.7kureBuild a -* that doesn't perform any monadic effects.8kureLifting through the  and a Reader transformer, where (c,a) is the read-only environment.9kureLifting through the  and a Reader transformer, where (c,a) is the read-only environment.:kureThe   induced by m., lifting through a Reader transformer, where c is the read-only environment.;kureThe   induced by m., lifting through a Reader transformer, where c is the read-only environment.<kureThe   induced by m., lifting through a Reader transformer, where c is the read-only environment.=kureThe   induced by m., lifting through a Reader transformer, where c is the read-only environment.>kureThe   induced by m., lifting through a Reader transformer, where c is the read-only environment.?kureLifting through a Reader transformer, where (c,a) is the read-only environment.@kureLifting through a Reader transformer, where (c,a) is the read-only environment.AkureLifting through a Reader transformer, where (c,a) is the read-only environment.BkureLifting through a Reader transformer, where (c,a) is the read-only environment.CkureLifting through a Reader transformer, where (c,a) is the read-only environment.DkureLifting through a Reader transformer, where (c,a) is the read-only environment.EkureLifting through a Reader transformer, where (c,a) is the read-only environment.FkureLifting through a Reader transformer, where (c,a) is the read-only environment. +,-./01234567 -,+.23/014567'(c) 2012--2021 The University of KansasBSD3+Neil Sculthorpe betaghc Safe-Inferred0>"Gkure$A class of injective functions from a to b, and their projections. The following law is expected to hold: project (inject a) == Just aJkure$Injects a value and lifts it into a .KkureAs L>, but takes a custom error message to use if projection fails.Lkure%Projects a value and lifts it into a ", with the possibility of failure.MkureLifted H.OkureLifted I3, the transformation fails if the projection fails.PkureConvert a transformation over an injected value into a transformation over a non-injected value.QkureAs R=, but takes a custom error message to use if promotion fails.RkurePromote a transformation over a value into a transformation over an injection of that value, (failing if that injected value cannot be projected).SkureAs T>, but takes a custom error message to use if extraction fails.TkureConvert a rewrite over an injected value into a rewrite over a projection of that value, (failing if that injected value cannot be projected).UkureAs V=, but takes a custom error message to use if promotion fails.VkurePromote a rewrite over a value into a rewrite over an injection of that value, (failing if that injected value cannot be projected).Xkure-There is an identity injection for all types.GHIJKLMNOPQRSTUVGHIJLKMOPRNQTVSU'(c) 2012--2021 The University of KansasBSD3+Neil Sculthorpe betaghc Safe-Inferred0,YkureThe Y" transformer, in combination with s and t, causes a sequence of rewrites to only apply the first success, converting the remainder (and failures) to identity rewrites.ZkureThe Z" transformer, in combination with q and r, causes a sequence of rewrites to succeed if at least one succeeds, converting failures to identity rewrites.[kureThe identity rewrite.\kure$An always successful transformation.]kureExtract the current context.^kure%Expose the current context and value._kure6Lift a transformation to operate on a derived context.`kure!Map a transformation over a list.akure&An identity rewrite with side-effects.bkureLook at the argument to the transformation before choosing which - to use.ckureConvert the monadic result of a transformation into a result in another monad.dkurePerform a collection of rewrites in sequence, requiring all to succeed.ekurePerform two rewrites in sequence, succeeding if one or both succeed.fkurePerform a collection of rewrites in sequence, succeeding if any succeed.gkureAs h%, but takes a custom failure message.hkure;Look at the argument to a rewrite, and choose to be either [ or a failure.ikureA generalisation of h where the predicate is a -.jkure4Catch a failing rewrite, making it into an identity.kkureMakes a rewrite fail if the result value and the argument value satisfy the equality predicate. This is a generalisation of l. changedR = changedByR ()lkureMakes an rewrite fail if the result value equals the argument value.mkureRepeat a rewrite until it fails, then return the result before the failure. Requires at least the first attempt to succeed.nkureAttempt each transformation until one succeeds, then return that result and discard the rest of the transformations.okure4An identity transformation that resembles a monadic .pkure=Fail if the Boolean is False, succeed if the Boolean is True.qkureWrap a + using the Z monad transformer.rkure Unwrap a + from the Z monad transformer.skureWrap a + using the Y monad transformer.tkure Unwrap a + from the Y monad transformer.YZ[\]^_`abcdefghijklmnopqrst[\]^_bcn`opjdfemhgilkaZqrYst'(c) 2012--2021 The University of KansasBSD3+Neil Sculthorpe betaghc Safe-Inferred0>2)kure,A class for contexts that store the current -, allowing transformations to depend upon it.kureRead the current absolute path.kureA  from a local origin.kureA  from the root.kureA class of things that can be extended by crumbs. Typically, c7 is a context type. The typical use is to extend an  stored in the context (during tree traversal). Note however, that if an  is not stored in the context, an instance can still be declared with ('' crumb) as an identity operation.kureExtend the current  by one crumb.kureA # is a list stored in reverse order.kureA  is just a list. The intent is that a path represents a route through the tree from an arbitrary node.kure Convert a  to a . O(n).kure Convert a  to a . O(n).kureGet the last crumb from a . O(1).kureLifted version of .kureLifted version of .kureAny  can be extended.kureThe simplest instance of  is  itself.'(c) 2012--2021 The University of KansasBSD3+Neil Sculthorpe betaghc Safe-Inferred0>4OkureA context transformer, for augmenting a context with additional information.kure:Retrieve the base context (without the extra information).kure*Retrieve the extra contextual information.kure2Extend a context with some additional information.kure:Both components of the context are updated with the crumb. '(c) 2012--2021 The University of KansasBSD3+Neil Sculthorpe betaghcNone5-kureTrace output of the value being rewritten; use for debugging only.'(c) 2012--2021 The University of KansasBSD3+Neil Sculthorpe betaghc Safe-Inferred5- YZ[\]^_`abcdefghijklmnopqrst '(c) 2012--2021 The University of KansasBSD3+Neil Sculthorpe betaghc Safe-Inferred0=kureA - that shares the same source and target type.kureA deprecated synonym for .kureAn undirected -.kureExtract the forward - from a .kureExtract the backward - from a .kure Construct a  from two opposite -s.kureTry the  forwards, then backwards if that fails. Useful when you know which rule you want to apply, but not which direction to apply it in.kure2Invert the forwards and backwards directions of a .kure+Perform the argument transformation before either( direction of the bidirectional rewrite.kure,Apply the argument rewrite to the result of either( direction of the bidirectional rewrite.kureAs >, but takes a custom error message to use if extraction fails.kureConvert a bidirectional transformation over an injected value into a bidirectional transformation over non-injected values, (failing if an injected value cannot be projected).kureAs =, but takes a custom error message to use if promotion fails.kurePromote a bidirectional transformation from value to value into a transformation over an injection of those values, (failing if an injected value cannot be projected).kureAs >, but takes a custom error message to use if extraction fails.kureConvert a bidirectional rewrite over an injected value into a bidirectional rewrite over a projection of that value, (failing if an injected value cannot be projected).kureAs =, but takes a custom error message to use if promotion fails.kurePromote a bidirectional rewrite over a value into a bidirectional rewrite over an injection of that value, (failing if an injected value cannot be projected). '(c) 2012--2021 The University of KansasBSD3+Neil Sculthorpe betaghc Safe-Inferred0C kureA . is a way to focus on a sub-structure of type b from a structure of type a.kure Convert a  into a - that produces a sub-structure (and its context) and an unfocussing function.kure The primitive way of building a . If the unfocussing function is applied to the value focussed on then it should succeed, and produce the same value as the original argument (of type a).kure*Apply a rewrite at a point specified by a .kure1Apply a transformation at a point specified by a .kureCheck if the focusing succeeds, and additionally whether unfocussing from an unchanged value would succeed.kure The failing .kureA  is deemed to have failed (and thus can be caught) if either it fails on the way down, or, crucially, if it would fail on the way up for an unmodified value. However, actual failure on the way up is not caught (as by then it is too late to use an alternative )). This means that, in theory, a use of  could cause a succeeding & application to fail. But provided - is used correctly, this should never happen.kure Construct a  from a .kure Construct a  from two pure functions.kureA  to the injection of a value.kureA  to the projection of a value.   '(c) 2012--2021 The University of KansasBSD3+Neil Sculthorpe betaghc Safe-Inferred02?U,,kure captures the ability to walk over a tree containing nodes of type u, using a specific context c.Minimal complete definition: .%Default definitions are provided for , , , , and /, but they may be overridden for efficiency.kureApply a rewrite to all immediate children, succeeding if they all succeed.kureApply a transformation to all immediate children, succeeding if they all succeed. The results are combined in a .kureApply a transformation to the first immediate child for which it can succeed.kureApply a rewrite to all immediate children, suceeding if any succeed.kureApply a rewrite to the first immediate child for which it can succeed.kure Construct a  to the n-th child node.kure&List the children of the current node.kure,Apply a transformation to a specified child.kure%Apply a rewrite to a specified child.kure1Fold a tree in a top-down manner, using a single - for each node.kure2Fold a tree in a bottom-up manner, using a single - for each node.kureApply a transformation to the first node for which it can succeed, in a top-down traversal.kureApply a transformation to the first node for which it can succeed, in a bottom-up traversal.kureAttempt to apply a -, in a top-down manner, pruning at successes.kure is never inspected, it is merely a proxy for a type argument.,, '(c) 2012--2021 The University of KansasBSD3+Neil Sculthorpe betaghc Safe-Inferred?Zb kure"A context transformer that adds a ( (from the current node) to the context.kure%Apply a transformation that stores a / in the context (starting at the current node).kureExtract the current  from the context.kureReturn the current * if the predicate transformation succeeds.kure Find the -s to every node that satisfies the predicate.kure Find the s to every node that satisfies the predicate, ignoring nodes below successes.kure Find the  to the first node that satisfies the predicate (in a pre-order traversal).kure Find the  to the first descendent node that satisfies the predicate (in a pre-order traversal).kure Find the  to the node that satisfies the predicate, failing if that does not uniquely identify a node.kureBuild a  to the node that satisfies the predicate, failing if that does not uniquely identify a node (ignoring nodes below successes).  '(c) 2012--2021 The University of KansasBSD3+Neil Sculthorpe betaghc Safe-Inferred[  !"+,-./01234567GHIJKLMNOPQRSTUVYZ[\]^_`abcdefghijklmnopqrst !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                                                                                      "kure-2.18.6-1r3QEdsEXHOJqEOAITmsB3Language.KURE.Combinators.ArrowLanguage.KURE.Combinators.MonadLanguage.KURE.MonadCatchLanguage.KURE.TransformLanguage.KURE.Injection#Language.KURE.Combinators.TransformLanguage.KURE.PathLanguage.KURE.ExtendableContextLanguage.KURE.DebugLanguage.KURE.BiTransformLanguage.KURE.LensLanguage.KURE.WalkerLanguage.KURE.Pathfinder Control.MonadjoinLanguage.KURE.Combinators Language.KUREresultargumenttoFsttoSndswapfork forkFirst forkSecondconstant serialise paralleliseguardMsgguardM guardMsgMifMwhenMunlessMKureM MonadCatchcatchMrunKureM fromKureM liftKureM<+catchesMtryMmtryMattemptMtestMnotM modFailMsg setFailMsg prefixFailMsgwithPatFailMsgliftAndCatchIO$fMonadCatchIO$fApplicativeKureM$fFunctorKureM$fMonadCatchKureM$fMonadFailKureM $fMonadKureM $fEqKureM $fShowKureMRewrite Translate TransformapplyT transform translaterewriteapplyRapply contextfreeT contextonlyTconstT effectfreeT$fMonoidTransform$fSemigroupTransform$fArrowApplyTransform$fArrowPlusTransform$fArrowZeroTransform$fArrowTransform$fCategoryTYPETransform$fMonadIOTransform$fMonadPlusTransform$fMonadCatchTransform$fMonadFailTransform$fMonadTransform$fAlternativeTransform$fApplicativeTransform$fFunctorTransform InjectioninjectprojectinjectMprojectWithFailMsgMprojectMinjectTprojectWithFailMsgTprojectTextractTpromoteWithFailMsgTpromoteTextractWithFailMsgRextractRpromoteWithFailMsgRpromoteR$fInjectionaMaybe $fInjectionaaOneRAnyRidRsuccessTcontextTexposeT liftContextmapT sideEffectRreaderTresultTandR>+>orRacceptWithFailMsgRacceptR accepterRtryR changedByRchangedRrepeatRcatchesTjoinTguardTwrapAnyR unwrapAnyRwrapOneR unwrapOneR$fFunctorPBool$fMonadCatchAnyR$fMonadFailAnyR $fMonadAnyR$fApplicativeAnyR $fFunctorAnyR$fMonadCatchOneR$fMonadFailOneR $fMonadOneR$fApplicativeOneR $fFunctorOneRReadPathabsPath LocalPath AbsolutePath ExtendPath@@SnocPathPathpathToSnocPathsnocPathToPathsingletonSnocPath lastCrumbabsPathT lastCrumbT$fShowSnocPath$fFunctorSnocPath$fMonoidSnocPath$fSemigroupSnocPath$fExtendPathSnocPathcrumb$fReadPathSnocPathcrumb $fEqSnocPath ExtendContext baseContext extraContext extendContext$fExtendPathExtendContextcrumbdebugR BiRewrite BiTranslate BiTransformforwardT backwardT bidirectional whicheverR invertBiT beforeBiRafterBiRextractWithFailMsgBiT extractBiTpromoteWithFailMsgBiT promoteBiTextractWithFailMsgBiR extractBiRpromoteWithFailMsgBiR promoteBiR$fCategoryTYPEBiTransformLenslensTlensfocusRfocusT testLensTfailLcatchLbidirectionalLpureLinjectLprojectL$fCategoryTYPELensWalkerallRallToneTanyRoneRchildL childrenTchildTchildRfoldtdTfoldbuTonetdTonebuTprunetdTcrushtdTcrushbuTcollectT collectPruneTalltdRallbuRallduRanytdRanybuRanyduRonetdRonebuRprunetdR innermostRpathL localPathL exhaustPathL repeatPathLpathRpathT localPathR localPathT testPathT allLargestR anyLargestR oneLargestR allLargestT oneLargestTsummandIsTypeT$fMonadCatchAllT$fMonadFailAllT $fMonadAllT$fApplicativeAllT $fFunctorAllT$fMonadCatchOneT$fMonadFailOneT $fMonadOneT$fApplicativeOneT $fFunctorOneT$fMonadCatchGetChild$fMonadFailGetChild$fMonadGetChild$fApplicativeGetChild$fFunctorGetChild WithLocalPathwithLocalPathTexposeLocalPathTacceptLocalPathTpathsToT prunePathsToT onePathToToneNonEmptyPathToT uniquePathToTuniquePrunePathToTbaseControl.CategoryCategoryControl.Monad.Failfail Data.EitherEitherGHC.BaseStringGHC.ErrerrorMonadmemptyghc-prim GHC.TypesIOGHC.Showshow Control.ArrowKleisliArrow GHC.Classes==Monoid