\-H      !"#$%&'()*+,-./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 { | } ~  Noneportable experimentalRalf Laemmel, Joost VisserNoneAny  is a . portable experimentalRalf Laemmel, Joost VisserNone Identity type constructor. !Unwrap identity type constructor >Force success. If the argument value corresponds to failure,  a run-time error will occur. ,Sequential composition of monadic functions BSequential composition with value passing; a kind of monadic let. (Choice combinator for monadic functions 9Type guard described by the argument type of a function. +Type guard described by a type of a value. A kind of monadic conditional.        portable experimentalRalf Laemmel, Joost VisserNone2The type of names of chaseable things. Synonym of . EA generic import chasing function. The type of the final result is a E parameter, which will usually be instantiated to a list of parsed  modules. ;Read a file from a number of possible directories, given a D base name and a list of possible extensions. Returns the content  of the file it found. 9Find a file in a number of possible directories, given a 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) 9parse (function that attempt to find and parse a module) -imports (function that extracts imports from  a parse result) (on module (function that computes a new $ accumulator from a parse result) )on missing (function that computes a new * accumulator value when parsing failed) result (accumulated value) path (directories to search)  base name possible extensions contents of file path (directories to search)  base name possible extensions contents of file portable experimentalRalf Laemmel, Joost VisserNoneThe monad transformer .            portable experimentalRalf Laemmel, Joost VisserNoneJJust as a base monad can be run to remove the monad, so can a transformed N monad be unlifted to remove the transformer and obtain the original monad. The overloaded function ( for monad transformers takes as first  argument an algebra1 just like the run function for base monads. For J 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  function is defined that * executes the computation of the monad. 7The overloaded function run takes as first argument an algebra which I captures the ingredients necessary to run the particular monad at hand. E This algebra is parameterized with the domain and co-domain of run. $The algebra for the state effect of  and . initial state state transformer !.The 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. H 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 J monads are unrelated, so none of the effects of the incoming monad are $ transferred to the result monad. .AMonadic choice combinator that confines the partiality effect to . the first argument. This is a variation on  which allows K the partiality effect to spread to both arguments and to the result. /-Monadic choice combinator. Generalization of . that takes a list 1 of choice arguments rather than a single one. 0Specialization of / for MaybeT. 1GMonadic function choice combinator that confines the partiality effect 1 to the first argument. This is a variation on mchoice which G allows the partiality effect to spread to both arguments and to the  result. 26Monadic function choice combinator. Generalization of 1 that > takes a list of choice arguments rather than a single one. 3Implementation variant of / in terms of foldr. 4Implementation variant of / with . expanded: 5Implementation variant of / where the unlift is postponed  to the very end. &Unlifting the state monad transformer 'Unlifting the error monad transformer. ,Unlifting the partiality monad transformer. &Unlifting the list monad transformer.  Running the  monad.  Note: uses !  Running the  monad. Running the list monad. Running the error monad.  Running the  monad.   Running the  monad.  The algebra for the  monad is a unary function. ' !"#$%&'()*+,-./choice branches  otherwise result 012345  !"#$%&'()*+,-./012345)*+,%&'(!"#$ -./012345 !"#$%&'()*+,-./012345 None"6!7"#$89:;<=>?@ABCDEFGHIJKLMNOPQRS6789:;<=>?@ABCDEFGHIJKLMNOPQRS7689:;<=>?@BACDEFGHMNIOJPQKRSL 6!7"#$89:;<=>?@ABCDEFGHIJKLMNOPQRSportable experimentalRalf Laemmel, Joost VisserNone TDType-preserving identity. Returns the incoming term without change. UCType-preserving failure. Always fails, independent of the incoming  term. Uses % to model partiality. VAType-unifying failure. Always fails, independent of the incoming  term. Uses % to model partiality. WCType-unifying constant strategy. Always returns the argument value a, % independent of the incoming term. XFType-unifying monadic constant strategy. Always performs the argument  computation a6, independent of the incoming term. This is a monadic  variation of W. YBApply the monomorphic, type-preserving argument function, if its $ input type matches the input term's type. Otherwise, fail. Z@Apply the monomorphic, type-unifying argument function, if its $ input type matches the input term's type. Otherwise, fail. [LSequential ccomposition of monomorphic function and type-unifying strategy. 4 In other words, after the type-unifying strategy s has been applied,  the monomorphic function f$ is applied to the resulting value. \CParallel combination of two type-unifying strategies with a binary F combinator. In other words, the values resulting from applying the F type-unifying strategies are combined to a final value by applying  the combinator o. ]>Reduce a type-preserving strategy to a type-unifying one that > ignores its result term and returns void, but retains its  monadic effects. ^<Reduce a type-unifying strategy to a type-unifying one that ? ignores its result value and returns void, but retains its  monadic effects. _Test for constant term, i.e. having no subterms. `Test for compound term, i.e. having at least one subterm. TUVWXYZ[\]^_`,6789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_` TUVWXYZ[\]^_` TUVWXYZ[\]^_` portable experimentalRalf Laemmel, Joost VisserNonecType of generic maps dType of generic sets e0Pointwise modification of monomorphic functions f5Pointwise modification of type-preserving strategies g3Pointwise modification of type-unifying strategies hEmpty generic set. iCompletely filled generic set j Add an element to a generic set k%Remove an element from a generic set l;Test whether a given element is contained in a generic set mEmpty generic map n.Remove an element from a generic map (my key) oETest whether an element with given key is contained in a generic map p7Add an entry with given key and value to a generic map q4Obtain the value for a given key from a generic map abcdefghijklmnopqrstuvwxyz{|}~ abcdefghijklmnopqrstuvwxyz{|}~ efgdhijklcmnopqbrstuvwxyz{a|}~ abcdefghijklmnopqrstuvwxyz{|}~ portable experimentalRalf Laemmel, Joost VisserNone*Overload msubst combinator (Experimental) !Substitute one monad for another 3Overload basic combinators which involve MonadPlus Failure Choice Push down to a single child 8Overload basic combinators which might involve a monoid Identity (success) 'Push down to all children Combine sequentially %Overload apply and adhoc combinators Strategy application Dynamic type case 8Overload completely unconstrained strategy combinators !Sequential composition 2Sequential composition with value passing !Overloaded lifting with failure &'()*+,-./&'()*+,-./ portable experimentalRalf Laemmel, Joost VisserNoneEType guard (function type), i.e., guard that does not observe values Attempt a strategy s, but recover if it fails. #Attempt a type-preserving strategy s, but if it fails, return the  input term unchanged. !Attempt a type-unifying strategy s, but if it fails, return the  0 element of a . Test for a strategy'(s success in a type-preserving context. #Test for a type-preserving strategy's success in a  type-preserving context. !Test 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. 3Succeed if exactly one argument strategy succeeds. 3Succeed if exactly one argument strategy succeeds. 3Succeed if exactly one argument strategy succeeds.  If predicate g5 holds for the input term, return it as output term,  otherwise fail.  If predicate g6 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:  8 full_tdTU (typeTickTU (typeGuard::TypeGuard MyType)) )If type guard holds for the input term,  return 1 otherwise return 0. BIf type guard holds for the input term, return it as output term,  otherwise fail. CIf type guard holds for the input term, return it as output value,  otherwise fail.  portable experimentalRalf Laemmel, Joost VisserNone2Full type-preserving traversal in top-down order. 3Full type-preserving traversal in bottom-up order. 0Full type-unifying traversal in top-down order. >Top-down type-preserving traversal that is cut of below nodes ) where the argument strategy succeeds. <Top-down type-unifying traversal that is cut of below nodes ) where the argument strategy succeeds. >Top-down type-preserving traversal that performs its argument  strategy at most once. <Top-down type-unifying traversal that performs its argument  strategy at most once. ?Bottom-up type-preserving traversal that performs its argument  strategy at most once. =Bottom-up type-unifying traversal that performs its argument  strategy at most once. ETop-down type-unifying traversal with propagation of an environment. Use J instead. Use K instead. BRecursive completion of full type-preserving one-layer traverasal ARecursive completion of type-preserving one-layer traversal that  succeeds exactly once. ,Full top-down traversal (overloaded between 6 and 7). /One-hit top-down traversal (overloaded between 6 and 7). 0One-hit bottom-up traversal (overloaded between 6 and 7). 9One-hit top-down traversal with environment propagation  (overloaded between 6 and 7). 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 environment binary strategy combinator argument strategy result strategy binary strategy combinator argument strategy result strategy  portable experimentalRalf Laemmel, Joost VisserNone>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 8 innermost traversal strategy, implemented in a more  efficient way. portable experimentalRalf Laemmel, Joost VisserNoneASelect or transform a node below a node where a condition holds. D 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. GSelect or transform a node below or at a node where a condition holds. FApply a transformation strictly below a node where a condition holds. CApply a transformation below or at a node where a condition holds. ESelect or transform a node above a node where a condition holds. The = distance between guard and application node is minimized. GSelect or transform a node above or at a node where a condition holds. FApply a transformation strictly above a node where a condition holds. CApply a transformation above or at a node where a condition holds. portable experimentalRalf Laemmel, Joost VisserNoneSelect the identified focus. ( Fails if no subterm can be selected. Replace the identified focus. ( Fails if no subterm can be replaced. 7Delete the focus assuming it is an element in a list. * Fails if no deletion can be performed. =Find 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 , into a list. This is a type-specialization  of . EApply the argument function to the unique subterm of the input term. H Fail if the input term has more subterms or if the subterm is not of D the appropriate type. This is a keyhole version of the traversal  combinator L Identify focus  Input term  Focused term Identify focus  Input term #Output term without focused entity  Get focus  Get host  Input term  Located host  Test focus  Wrap host  Input term  Output term portable experimentalRalf Laemmel, Joost VisserNone The type of metric names The type of metrics Create + with given initial value for all metrics. Create * with 0 as initial value for all metrics. Create  with /initTypeMetrics :: MetricName -> a -> Metrics 8initTypeMetrics 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 guard 7Strategy that additionally collects type-based metrics Recognize relevant contructs ,Count nesting depth of relevant constructs. 1 1portable experimentalRalf Laemmel, Joost VisserNone5Generic free name analysis algorithm (without types) 0Generic free name analysis algorithm with types #Accumulate declarations for focus Identify declarations Identify references  Input term  Free names Identify declarations Identify references Derived declarations  Input term Free names with types portable experimentalRalf Laemmel, Joost VisserNoneClass of abstractions Remove an unused abstraction Insert a new abstraction Extract an abstraction Identify declarations Identify references Unwrap abstraction Input program Output program Identify declarations Identify references Unwrap scope with abstractions Abstraction to be inserted Input program Output program Identify declarations Identify references  Unwrap focus  Wrap host  Unwrap host  Check focus Name for abstraction Input program Output program portable experimentalRalf Laemmel, Joost VisserNoneSequential composition *Sequential composition with value passing ;Sequential composition, ignoring value from first strategy Dynamic type-case portable experimentalRalf Laemmel, Joost VisserNone ?Replace the monad in a type-preserving strategy, given a monad  algebra (see +) for the monad that is replaced. The two E monads are unrelated, so none of the effects in the monad that is 4 replaced carry over to the one that replaces it. =Replace the monad in a type-unifying strategy, given a monad  algebra (see +) for the monad that is replaced. The two E monads are unrelated, so none of the effects in the monad that is 4 replaced carry over to the one that replaces it. ;Add an effect to the monad in a type-preserving strategy. H The monads are related by a monad transformer, so the effects of the @ incoming monad are preserved in the result monad. We use the 2 & function of the monad transformer. 9Add an effect to the monad in a type-unifying strategy. H The monads are related by a monad transformer, so the effects of the @ incoming monad are preserved in the result monad. We use the 2 & function of the monad transformer. ?remove an effect from the monad of a type-preserving strategy. 8 The monads are related by a monad untransformer (see ), D so the effects of the incoming monad are preserved in the result G monad, except for the effect for which a monad algebra is supplied. =remove an effect from the monad of a type-unifying strategy. 8 The monads are related by a monad untransformer (see ), D so the effects of the incoming monad are preserved in the result G 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 D failure. Since this default parameter is universally quantified,  only 3 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 3 K to recover from failure. For the type-preserving case, this is the only  possible default value. 4Unsafe version of . This version uses uses 3  to recover from failure. Use  instead. ELocalize the state of a type-preserving strategy. The first argument # represents the initial state. CLocalize 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 4 4portable experimentalRalf Laemmel, Joost VisserNone!56789:;<=>?%@ABC0DEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz2{|6789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdfghijklmnopqrstuvwxyz{|}~} !"#$%&'()*+,,-./0122345567889:;;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopq r s t u v w x y z { | } ~              !"#$%&'()*+,-./0123456789:;<=>?@A-B C D E F G H I J K LMNOPQRSTUVWXYZ-[-\]^Y_`abcdeffghhijjkllmnnoppqrrstt-u-v-w-x-y-z-{-|-}-~--------------------OStrafunski-StrategyLib-5.0.0.30Data.Generics.Strafunski.StrategyLib.StrategyLib>>>>>=>>>--+mrunTPmrunTUliftTPliftTUunliftTPunliftTUguaranteeSuccessTPguaranteeSuccessTUunsafeGuaranteeSuccessTP localStateTP localStateTU$fTermx $fMonoidabaseGHC.NumNum Data.MonoidMonoid $fMonadIdGHC.BaseStringerrLn$fMonadContMaybeT$fMonadStatesMaybeT$fMonadWriterwMaybeT$fMonadReaderrMaybeT$fMonadIOMaybeT$fMonadTransMaybeT$fMonadFixMaybeT$fMonadPlusMaybeT $fMonadMaybeT$fFunctorMaybeTControl.Monad.Trans.ListListT Data.EitherEitherControl.Monad.Trans.ErrorErrorT Data.MaybeMaybe Control.Monadmplus$fMonadUnTransStateAlgStateT$fMonadUnTransErrorAlgErrorT$fMonadUnTransMaybeAlgMaybeT$fMonadUnTransListAlgListT$fMonadRun(->)IOghc-prim GHC.TypesIOGHC.IOunsafePerformIO$fMonadRunStateAlgStateT$fMonadRunListAlg[]$fMonadRunErrorAlgEither$fMonadRunMaybeAlgMaybe$fMonadRun(->)IdentityMkTUMkTPunTPunTU MonadPlus$fStrategyMSubstTU$fStrategyMSubstTP$fStrategyPlusTUm$fStrategyPlusTPm$fStrategyMonoidTUm$fStrategyMonoidTPm$fStrategyApplyTUmta$fStrategyApplyTPmtt $fStrategyTUm $fStrategyTPmmempty $fMonoid(->)Control.Monad.Trans.ClassliftGHC.Err undefinedunsafeGuaranteeSuccessTUfail>>=>>fmapreturnControl.Monad.FixmfixguardliftMMonadFunctorMonadFix Data.Functionfix<>mconcatmappendgetDualDualappEndoEndogetAllAllgetAnyAnygetSumSum getProductProductgetFirstFirstgetLastLastmfilterapliftM5liftM4liftM3liftM2unlesswhen replicateM_ replicateMfoldM_foldM zipWithM_zipWithM mapAndUnzipMjoinvoidforever<=<>=>msumforM_forMfilterMmapM_mapM sequence_sequence=<<mzero MonadTransControl.Monad.IO.ClassMonadIOliftIO