\/Ij      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefg h i j k l m n o p q r s t u v w x y z { | } ~       None 9:;<=?OTRalf Laemmel, Joost Visser experimentalportableSafe 9:;<=?OT Any  is a .   Ralf Laemmel, Joost Visser experimentalportableSafe 9:;<=?OT ]Force success. If the argument value corresponds to failure, a run-time error will occur. +Sequential composition of monadic functions ASequential composition with value passing; a kind of monadic let. 'Choice combinator for monadic functions8Type guard described by the argument type of a function.*Type guard described by a type of a value.A kind of monadic conditional.    Ralf Laemmel, Joost Visser experimentalportableSafe 9:;<=?OT2The type of names of chaseable things. Synonym of .A generic import chasing function. The type of the final result is a parameter, which will usually be instantiated to a list of parsed modules.Read a file from a number of possible directories, given a base name and a list of possible extensions. Returns the content of the file it found.Find a file in a number of possible directories, given a base name and a list of possible extensions. Returns the full name of the file it found.;Helper function for reporting errors and progress to stderr $path (list of directories to search)$todo (list of modules still to find)$done (list of modules already found)$initial (start value of accumulator)8parse (function that attempt to find and parse a module)?imports (function that extracts imports from a parse result)Kon module (function that computes a new accumulator from a parse result)Ron missing (function that computes a new accumulator value when parsing failed)result (accumulated value)path (directories to search) base namepossible extensionscontents of filepath (directories to search) base namepossible extensionscontents of fileRalf Laemmel, Joost Visser experimentalportableNone 9:;<=?OTJust as a base monad can be run to remove the monad, so can a transformed monad be unlifted to remove the transformer and obtain the original monad.The overloaded function  for monad transformers takes as first argument an "algebra" just like the run function for base monads. For each monad transformer, the same algebra is used as for the base monad of which the transformer is the parameterized variant. The class of monads for which a C function is defined that executes the computation of the monad.The overloaded function run takes as first argument an "algebra" which captures the ingredients necessary to run the particular monad at hand. This algebra is parameterized with the domain and co-domain of run.$The algebra for the state effect of  and . initial statestate transformer7The algebra for the non-determinacy effect of '[]' and .!$The algebra for the error effect of  and .%)The algebra for the partiality effect of  and .)Exchange one monad by another. This function runs one monad, and puts its value in another. This is basically a monadic version of the  function itself. Note that the two monads are unrelated, so none of the effects of the incoming monad are transferred to the result monad.*oMonadic choice combinator that confines the partiality effect to the first argument. This is a variation on X which allows the partiality effect to spread to both arguments and to the result. +-Monadic choice combinator. Generalization of *C that takes a list of choice arguments rather than a single one.,Specialization of + for MaybeT.-xMonadic function choice combinator that confines the partiality effect to the first argument. This is a variation on mchoiceX which allows the partiality effect to spread to both arguments and to the result..6Monadic function choice combinator. Generalization of -C that takes a list of choice arguments rather than a single one./Implementation variant of + in terms of foldr.0Implementation variant of + with * expanded:1Implementation variant of +2 where the unlift is postponed to the very end.2%Unlifting the state monad transformer3&Unlifting the error monad transformer.4+Unlifting the partiality monad transformer.5%Unlifting the list monad transformer.6 Running the  monad. Note: uses !7 Running the  monad.8Running the list monad.9Running the error monad.: Running the  monad.; Running the  monad. The algebra for the  monad is a unary function.' !"#$%&'()*+choice branches otherwiseresult,-./0123456789:; !"#$%&'()*+,-./01'%&'(!"#$ ;:9876)5432*+,-./01 !"#$%&'()*+,-./0123456789:;None 9:;<=?OT"<=>?@ABCDEFGHIJKLMNOPQRSTUVWXY<=>?@ABCDEFGHIJKLMNOPQRSTUVWXY=<>?@ABCDEFHGIJKLMNSTOUPVWQXYR <=>?@ABCDEFGHIJKLMNOPQRSTUVWXYRalf Laemmel, Joost Visser experimentalportableNone 9:;<=?OT ZCType-preserving identity. Returns the incoming term without change.[QType-preserving failure. Always fails, independent of the incoming term. Uses   to model partiality.\OType-unifying failure. Always fails, independent of the incoming term. Uses   to model partiality.]CType-unifying constant strategy. Always returns the argument value a&, independent of the incoming term.^UType-unifying monadic constant strategy. Always performs the argument computation aF, independent of the incoming term. This is a monadic variation of ]._Apply the monomorphic, type-preserving argument function, if its input type matches the input term's type. Otherwise, fail.`}Apply the monomorphic, type-unifying argument function, if its input type matches the input term's type. Otherwise, fail.aSequential ccomposition of monomorphic function and type-unifying strategy. In other words, after the type-unifying strategy s0 has been applied, the monomorphic function f# is applied to the resulting value.bParallel combination of two type-unifying strategies with a binary combinator. In other words, the values resulting from applying the type-unifying strategies are combined to a final value by applying the combinator o.cReduce a type-preserving strategy to a type-unifying one that ignores its result term and returns void, but retains its monadic effects.dReduce a type-unifying strategy to a type-unifying one that ignores its result value and returns void, but retains its monadic effects.e0Test for constant term, i.e. having no subterms.f9Test for compound term, i.e. having at least one subterm. Z[\]^_`abcdef,<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdef Z[\]^_`abcdef Z[\]^_`abcdef Ralf Laemmel, Joost Visser experimentalportableNone 9:;<=?OTiType of generic mapsjType of generic setsk/Pointwise modification of monomorphic functionsl4Pointwise modification of type-preserving strategiesm2Pointwise modification of type-unifying strategiesnEmpty generic set.oCompletely filled generic setpAdd an element to a generic setq$Remove an element from a generic setr:Test whether a given element is contained in a generic setsEmpty generic mapt-Remove an element from a generic map (my key)uDTest whether an element with given key is contained in a generic mapv6Add an entry with given key and value to a generic mapw3Obtain the value for a given key from a generic map ghijklmnopqrstuvwxyz{|}~ ghijklmnopqrstuvwxyz{|}~ klmjnopqristuvwhxyz{|}~g ghijklmnopqrstuvwxyz{|}~ Ralf Laemmel, Joost Visser experimentalportableNone 9:;<=?OT)Overload msubst combinator (Experimental) Substitute one monad for another2Overload basic combinators which involve MonadPlusFailureChoice Push down to a single child7Overload basic combinators which might involve a monoidIdentity (success)&Push down to all children Combine sequentially $Overload apply and adhoc combinatorsStrategy applicationDynamic type case7Overload completely unconstrained strategy combinators  Sequential composition 1Sequential composition with value passing  Overloaded lifting with failure  Ralf Laemmel, Joost Visser experimentalportableNone 9:;<=?OTDType guard (function type), i.e., guard that does not observe valuesAttempt a strategy s, but recover if it fails.#Attempt a type-preserving strategy s6, but if it fails, return the input term unchanged.!Attempt a type-unifying strategy s!, but if it fails, return the ! element of a .;Test for a strategy's success in a type-preserving context.NTest for a type-preserving strategy's success in a type-preserving context.MTest for a type-unifying strategy's success in a type-preserving context.If c- succeeds, pass its value to the then-clause t*, otherwise revert to the else-clause e.If c- succeeds, pass its value to the then-clause t*, otherwise revert to the else-clause e.If c- succeeds, pass its value to the then-clause t*, otherwise revert to the else-clause e.Guard then-clause t/ by the void-valued type-unifying condition c."Guard type-preserving then-clause t/ by the void-valued type-unifying condition c. Guard type-unifying then-clause t/ by the void-valued type-unifying condition c.%Invert the success-value of strategy s.5Invert the success-value of type-preserving strategy s:. Its output term (in case of success) will be ignored.3Invert the success-value of type-unifying strategy s;. Its output value (in case of success) will be ignored.2Succeed if exactly one argument strategy succeeds.2Succeed if exactly one argument strategy succeeds.2Succeed if exactly one argument strategy succeeds. If predicate gG holds for the input term, return it as output term, otherwise fail. If predicate gH holds for the input term, return it as output value, otherwise fail. If predicate g; holds for the input term, return 1 otherwise return 0.)Type guard (function). Typical usage: 7 full_tdTU (typeTickTU (typeGuard::TypeGuard MyType)) HIf type guard holds for the input term, return 1 otherwise return 0.UIf type guard holds for the input term, return it as output term, otherwise fail. VIf type guard holds for the input term, return it as output value, otherwise fail.  Ralf Laemmel, Joost Visser experimentalportableNone 9:;<=?OT1Full type-preserving traversal in top-down order.2Full type-preserving traversal in bottom-up order./Full type-unifying traversal in top-down order.fTop-down type-preserving traversal that is cut of below nodes where the argument strategy succeeds.dTop-down type-unifying traversal that is cut of below nodes where the argument strategy succeeds.WTop-down type-preserving traversal that performs its argument strategy at most once.UTop-down type-unifying traversal that performs its argument strategy at most once.XBottom-up type-preserving traversal that performs its argument strategy at most once.VBottom-up type-unifying traversal that performs its argument strategy at most once.DTop-down type-unifying traversal with propagation of an environment.Use P instead.Use Q instead.ARecursive completion of full type-preserving one-layer traverasalZRecursive completion of type-preserving one-layer traversal that succeeds exactly once.,Full top-down traversal (overloaded between < and =)./One-hit top-down traversal (overloaded between < and =).0One-hit bottom-up traversal (overloaded between < and =).POne-hit top-down traversal with environment propagation (overloaded between < and =).See .See .Type-specialised version of <, which works with lists instead of any arbitrary monoid.See .See .initial environment)environment modification at downward step-extraction of value, dependent on environmentbinary strategy combinatorargument strategyresult strategybinary strategy combinatorargument strategyresult strategy Ralf Laemmel, Joost Visser experimentalportableNone 9:;<=?OT=Exhaustive repeated application at the root of the input term:Exhaustive repeated application throughout the input term.[Exhaustive repeated application according to the left-most outermost traversal strategy.Exhaustive repeated application according to the left-most innermost traversal strategy, implemented in a naive way. Use  instead.Exhaustive repeated application according to the left-most innermost traversal strategy, implemented in a more efficient way.Ralf Laemmel, Joost Visser experimentalportableNone 9:;<=?OTSelect or transform a node below a node where a condition holds. We find the top-most node which admits selection or transformation below the top-most node which meets the condition. Thus, the distance between guard and application node is minimized.FSelect or transform a node below or at a node where a condition holds.EApply a transformation strictly below a node where a condition holds.BApply a transformation below or at a node where a condition holds.Select or transform a node above a node where a condition holds. The distance between guard and application node is minimized.FSelect or transform a node above or at a node where a condition holds.EApply a transformation strictly above a node where a condition holds.BApply a transformation above or at a node where a condition holds.Ralf Laemmel, Joost Visser experimentalportableNone 9:;<=?OTDSelect the identified focus. Fails if no subterm can be selected.EReplace the identified focus. Fails if no subterm can be replaced.`Delete the focus assuming it is an element in a list. Fails if no deletion can be performed.QFind the host of the focused entity, i.e. a superterm of the focussed subterm.,Put all nodes of a certain type into a list.Put all nodes of type 2 into a list. This is a type-specialization of .Apply the argument function to the unique subterm of the input term. Fail if the input term has more subterms or if the subterm is not of the appropriate type. This is a keyhole version of the traversal combinator RIdentify focus Input term Focused termIdentify focus Input term"Output term without focused entity Get focusGet host Input term Located host Test focus Wrap host Input term Output termRalf Laemmel, Joost Visser experimentalportableNone 9:;<=?OT The type of metric namesThe type of metricsCreate * with given initial value for all metrics.Create ) with 0 as initial value for all metrics.Create l with initTypeMetrics :: MetricName -> a -> Metrics initTypeMetrics key _ = incMetrics1 key initMetrics0:Increment metric with the given name with the given value.*Increment metric with the given name by 1.*Print value of metric with the given name.(Additionally collect type-based metrics.-Generic algorithm for computing nesting depth Metric collecting strategy!Name of the metric and type guard6Strategy that additionally collects type-based metricsRecognize relevant contructs+Count nesting depth of relevant constructs. Ralf Laemmel, Joost Visser experimentalportableNone 9:;<=?OT4Generic free name analysis algorithm (without types)/Generic free name analysis algorithm with types"Accumulate declarations for focus Identify declarationsIdentify references Input term Free namesIdentify declarationsIdentify referencesDerived declarations Input termFree names with typesRalf Laemmel, Joost Visser experimentalportableNone 9:;<=?OTClass of abstractionsRemove an unused abstractionInsert a new abstractionExtract an abstraction Identify declarationsIdentify referencesUnwrap abstraction Input programOutput programIdentify declarationsIdentify referencesUnwrap scope with abstractionsAbstraction to be inserted Input programOutput program Identify declarationsIdentify references Unwrap focus Wrap host Unwrap host Check focusName for abstraction Input programOutput program  Ralf Laemmel, Joost Visser experimentalportableNone 9:;<=?OTSequential composition)Sequential composition with value passing:Sequential composition, ignoring value from first strategyDynamic type-case1112Ralf Laemmel, Joost Visser experimentalportableNone 9:;<=?OT OReplace the monad in a type-preserving strategy, given a monad algebra (see ) for the monad that is replaced. The two monads are unrelated, so none of the effects in the monad that is replaced carry over to the one that replaces it.MReplace the monad in a type-unifying strategy, given a monad algebra (see ) for the monad that is replaced. The two monads are unrelated, so none of the effects in the monad that is replaced carry over to the one that replaces it.Add an effect to the monad in a type-preserving strategy. The monads are related by a monad transformer, so the effects of the incoming monad are preserved in the result monad. We use the "& function of the monad transformer.Add an effect to the monad in a type-unifying strategy. The monads are related by a monad transformer, so the effects of the incoming monad are preserved in the result monad. We use the "& function of the monad transformer. wremove an effect from the monad of a type-preserving strategy. The monads are related by a monad untransformer (see ), so the effects of the incoming monad are preserved in the result monad, except for the effect for which a monad algebra is supplied. uremove an effect from the monad of a type-unifying strategy. The monads are related by a monad untransformer (see ), so the effects of the incoming monad are preserved in the result monad, except for the effect for which a monad algebra is supplied. Localize the partiality effect in a type-preserving strategy. A default value must be supplied to be used to recover from failure. Since this default parameter is universally quantified, only #V and 'error ...' can be used to instantiate it. See also 'unsafeGuaranteeSuccessTP. Localize the partiality effect in a type-unifying strategy. A default value must be supplied to be used to recover from failure.  Unsafe version of  . This version uses uses #f to recover from failure. For the type-preserving case, this is the only possible default value.$Unsafe version of  . This version uses uses #! to recover from failure. Use   instead.gLocalize the state of a type-preserving strategy. The first argument represents the initial state. eLocalize the state of a type-unifying strategy. The first argument represents the initial state.    -default value (Note: universally quantified!) type-preserving partial strategy+type-preserving strategy without partiality  default value type-preserving partial strategy+type-preserving strategy without partiality $                  $Ralf Laemmel, Joost Visser experimentalportableNone 9:;<=?OT%%&'()*+,-./01!23456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmn op"<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijlmnopqrstuvwxyz{|}~     q !"#$%&'()*+,-./00123345667899:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxy z { | } ~              !"#$%&%'()*+,-.%/01%23456789:;%<%=>?@ABCD%E%F%G%H%I%J%K%LMNMOPQPR%S%TUVUWCXCYCZC[C\C]C^C_C`CaCbCcCdCePfghgigjgklmlnlnlolplplqlrlrlsltltlulvlvlwlxlxlylzlzl{l|l|l}l~l~l%%%%%%%%%>4Strafunski-StrategyLib-5.0.0.9-SUr09EmiZRDwW20onh9Hp0Data.Generics.Strafunski.StrategyLib.StrategyLib)IO$fMonadRunStateAlgStateT$fMonadRunListAlg[]$fMonadRunErrorAlgEither$fMonadRunMaybeAlgMaybe$fMonadRun(->)IdentityTUTPparaTPparaTUapplyTPapplyTUadhocTPadhocTUmsubstTPmsubstTUseqTPpassTPseqTUpassTUchoiceTPchoiceTU mchoicesTP mchoicesTUallTPoneTPanyTPsomeTPinjTPallTUallTU'oneTUanyTUanyTU'someTUsomeTU'idTPfailTPfailTUconstTUcompTUmonoTPmonoTUdotTUop2TUvoidTPvoidTUconcomCoderGListGMapGSetmodifymodifyTPmodifyTU emptyGSetfullGSetaddGSet removeGSet containsGSet emptyGMap removeGMap containsGMapputGMapgetGMap sizeGList indxGList emptyGListaddGListputGListgetGList mapGListTP mapGListTU elemsGListnthnoCodegetCodesetCodenextCodeenCodeStrategyMSubstmsubstS StrategyPlusfailSchoiceSoneSStrategyMonoidskipSallScombS StrategyApplyapplySadhocSStrategyvoidSseqSpassSmonoS$fStrategyMSubstTU$fStrategyMSubstTP$fStrategyPlusTUm$fStrategyPlusTPm$fStrategyMonoidTUm$fStrategyMonoidTPm$fStrategyApplyTUmta$fStrategyApplyTPmtt $fStrategyTUm $fStrategyTPm TypeGuardtryStryTPtryTUtestStestTPtestTUifSifTPifTUifthenSifthenTPifthenTUnotSnotTPnotTUxchoiceS xchoiceTP xchoiceTUfilterTPfilterTUtickTU typeGuard typeTickTU typeFilterTP typeFilterTU full_tdTP full_buTP full_tdTU stop_tdTP stop_tdTU once_tdTP once_tdTU once_buTP once_buTU once_peTUanyTP'someTP' all_recTU one_recTUfull_tdonce_tdonce_buonce_petopdowncrushcollectselect selectenvrepeatTPreduce outermost innermost' innermostbelowSbeloweqSbelowTP beloweqTPaboveSaboveeqSaboveTP aboveeqTP selectFocus replaceFocus deleteFocus selectHostmarkHostlistifystringsinj MetricNameMetrics initMetrics initMetrics0 incMetrics incMetrics1 putMetricLn typeMetric depthWith $fMonoid(->) freeNamesfreeTypedNamesboundTypedNames Abstraction getAbstrName getAbstrParas getAbstrBody getApplyName getApplyParas constrAbstr constrApply eliminate introduceextract>>>>>>=>>>--+mrunTPmrunTUliftTPliftTUunliftTPunliftTUguaranteeSuccessTPguaranteeSuccessTUunsafeGuaranteeSuccessTP localStateTP localStateTUGHC.NumNumGHC.BaseMonoidStringerrLnControl.Monad.Trans.ListListT Data.EitherEitherControl.Monad.Trans.ErrorErrorTMaybeControl.Monad.Trans.MaybeMaybeTmplusghc-prim GHC.TypesIO GHC.IO.UnsafeunsafePerformIOMkTUMkTPunTPunTU MonadPlusmemptyControl.Monad.Trans.ClassliftGHC.Err undefinedunsafeGuaranteeSuccessTU Control.MonadguardjoinMonad>>=>>returnfailFunctorfmapControl.Monad.FixMonadFixmfixData.TraversablemapMsequencemappendmconcatControl.Monad.IO.ClassMonadIOliftIOmfilter<$!>unless replicateM_ replicateMfoldM_foldM zipWithM_zipWithM mapAndUnzipMforever<=<>=>filterMforM Data.Foldablemsum sequence_forM_mapM_ Data.Monoid<>DualgetDualEndoappEndoAllgetAllAnygetAnySumgetSumProduct getProductFirstgetFirstLastgetLastAltgetAlt Data.Functionfix Data.FunctorvoidapliftM5liftM4liftM3liftM2liftMwhen=<<mzero MonadTrans