ú΂zā/      !"#$%&'()*+,-. Safe-Inferred is a data structure that can efficiently insert elements (preserving their order) and check whether an element with the given / key is already in the queue.Get the list of all elementsThe empty state queueZInsert an element in the state queue, unless there is already an element with the same key3Insert an element in the state queue without a key.Since ) doesn't take a key, it won't affect any . 012key30123 Safe-Inferred!";Type of regular expressions that recognize symbols of type s and produce a result of type a.'Regular expressions can be built using 4, 5 and 6( instances in the following natural way:f 7 ra matches iff ra: matches, and its return value is the result of applying f to the return value of ra.8 x[ matches the empty string (i.e. it does not consume any symbols), and its return value is xrf 9 raL matches a string iff it is a concatenation of two strings: one matched by rf and the other matched by ra. The return value is f a, where f and a are the return values of rf and ra respectively.ra : rb. matches a string which is accepted by either ra or rb:. It is left-biased, so if both can match, the result of ra is used.;9 is a regular expression which does not match any string.< ra: matches concatenation of zero or more strings matched by ra and returns the list of ra"'s return values on those strings.= ra9 matches concatenation of one or more strings matched by ra and returns the list of ra"'s return values on those strings. tA thread either is a result or corresponds to a symbol in the regular expression, which is expected by that thread. (Returns thread identifier. This will be > for ordinary threads and ? for results.@ABCDEFG HIJK L @ABCDEFG HIJK L GFEDCBA@ IHJK L  Safe-Inferred!"MNOPQRSTUVWXYZ[T MNPOQSRTUVWXYZ[(c) Roman CheplyakaMIT"Roman Cheplyaka <roma@ro-che.info> experimental Safe-Inferred!" DThe state of the engine is represented as a "regex object" of type   s r, where s is the type of symbols and r is the result type (as in the  type). Think of   as a collection of  Cs ordered by priority. E.g. threads generated by the left part of :5 come before the threads generated by the right part. IList of all threads of an object. Each non-result thread has a unique id.`Create an object from a list of threads. It is recommended that all threads come from the same  d, unless you know what you're doing. However, it should be safe to filter out or rearrange threads.)Check whether a thread is a result thread)Return the result of a result thread, or ? if it's not a result threadgCheck if the object has no threads. In that case it never will produce any new threads as a result of .Empty object (with no threads)BExtract the result values from all the result threads of an object!Feed a symbol into a regex object?Feed a symbol into a non-result thread. It is an error to call  on a result thread.uAdd a thread to an object. The new thread will have lower priority than the threads which are already in the object.cIf a (non-result) thread with the same id already exists in the object, the object is not changed.=Compile a regular expression into a regular expression object \ ]^     \ ]^ Safe-Inferred!"=EK0 is a profunctor. This is its contravariant map.(A dependency on the  profunctors! package doesn't seem justified.)>Match and return a single symbol which satisfies the predicateLike G, but allows to return a computed value instead of the original symbol!Match and return the given symbol"Match and return any single symbol/Match and return the given sequence of symbols.Note that there is an _8 instance for regular expression, so if you enable the OverloadedStrings$ language extension, you can write  string "foo" simply as "foo".Example: {-# LANGUAGE OverloadedStrings #-} import Text.Regex.Applicative number = "one" *> pure 1 <|> "two" *> pure 2 main = print $ "two" =~ numberkMatch zero or more instances of the given expression, which are combined using the given folding function.V argument controls whether this regular expression should match as many as possible () or as few as possible (*) instances of the underlying expression.\Match zero or more instances of the given expression, but as few of them as possible (i.e.  non-greedily). A greedy equivalent of  is <. Examples: °Text.Regex.Applicative> findFirstPrefix (few anySym <* "b") "ababab" Just ("a","abab") Text.Regex.Applicative> findFirstPrefix (many anySym <* "b") "ababab" Just ("ababa","") 2Return matched symbols as part of the return value! s =~ a = match a s"ŽAttempt to match a string of symbols against the regular expression. Note that the whole string (not just some part of it) should be matched. Examples: Text.Regex.Applicative> match (sym 'a' <|> sym 'b') "a" Just 'a' Text.Regex.Applicative> match (sym 'a' <|> sym 'b') "ab" Nothing#@Find a string prefix which is matched by the regular expression.MOf all matching prefixes, pick one using left bias (prefer the left part of :# to the right part) and greediness.UThis is the match which a backtracking engine (such as Perl's one) would find first.:If match is found, the rest of the input is also returned. Examples: ÔText.Regex.Applicative> findFirstPrefix ("a" <|> "ab") "abc" Just ("a","bc") Text.Regex.Applicative> findFirstPrefix ("ab" <|> "a") "abc" Just ("ab","c") Text.Regex.Applicative> findFirstPrefix "bc" "abc" Nothing$JFind the longest string prefix which is matched by the regular expression.kSubmatches are still determined using left bias and greediness, so this is different from POSIX semantics.:If match is found, the rest of the input is also returned. Examples: ĸText.Regex.Applicative Data.Char> let keyword = "if" Text.Regex.Applicative Data.Char> let identifier = many $ psym isAlpha Text.Regex.Applicative Data.Char> let lexeme = (Left <$> keyword) <|> (Right <$> identifier) Text.Regex.Applicative Data.Char> findLongestPrefix lexeme "if foo" Just (Left "if"," foo") Text.Regex.Applicative Data.Char> findLongestPrefix lexeme "iffoo" Just (Right "iffoo","")%'Find the shortest prefix (analogous to $)&_Find the leftmost substring that is matched by the regular expression. Otherwise behaves like #^. Returns the result together with the prefix and suffix of the string surrounding the match.'_Find the leftmost substring that is matched by the regular expression. Otherwise behaves like $^. Returns the result together with the prefix and suffix of the string surrounding the match.(_Find the leftmost substring that is matched by the regular expression. Otherwise behaves like %^. Returns the result together with the prefix and suffix of the string surrounding the match.!`abcdef !"#$%&ghijk'(lmno`abcdef !"#$%&ghijk'(`bacdef !"#$%&ghijk'(lmno!(c) Roman CheplyakaMIT"Roman Cheplyaka <roma@ro-che.info> experimental Safe-Inferred!")) r s! should give the same results as s =~ r.`However, this is not very efficient implementation and is supposed to be used for testing only. pqrstu)vwxy)) pqrstu)vwxy(c) Roman CheplyakaMIT"Roman Cheplyaka <roma@ro-che.info> experimental Safe-Inferred29865z{|}~€<=:;‚ƒ„…†‡ˆ‰Š‹Œ7 !"#$%&'( "!#$%&'( Safe-Inferred*Decimal digit, i.e. '0'..'9'+Hexadecimal digit i.e. '0'..'9', 'a'..'f', 'A'..'F'.,Add optional sign-"Parse decimal number without sign.."Parse decimal number without sign.*+,-.*+,-.*+,-.*+,-.Ž      !"#$%&'()*+,-./0123456789: ;<=>?@>AB>AC>DE>AF>AG>AH>A >AI>AJ>KL>KMNOPQRSTUVWXYZ[\]^_ `abcdefgh>ijklmnopqrstuvwxyz{{|}~€‚ƒ>A„>A…>A†>A‡>Aˆ>A‰>AŠ>A‹>AŒ>AŒ>A>AŽ>A>A>A‘>A’>A“>A”>A”>?•–regex-applicative-0.3.2!Text.Regex.Applicative.StateQueueText.Regex.ApplicativeText.Regex.Applicative.Object Text.Regex.Applicative.ReferenceText.Regex.Applicative.CommonText.Regex.Applicative.TypesText.Regex.Applicative.Compile Text.Regex.Applicative.Interface StateQueue getElementsempty insertUniqueinsertRE Greediness NonGreedyGreedyThreadThreadIdthreadIdReObjectthreads fromThreadsisResult getResultfailed emptyObjectresultsstep stepThread addThreadcompilecomappsymmsymsymanySymstringreFoldlfew withMatched=~matchfindFirstPrefixfindLongestPrefixfindShortestPrefixfindFirstInfixfindLongestInfixfindShortestInfix referencedigithexDigitsigneddecimal hexadecimalghc-prim GHC.TypesIntelementsids$fFoldableStateQueuebaseGHC.BaseFunctorControl.Applicative Applicative Alternative Data.Functor<$>pure<*><|>manysome Data.MaybeJustNothingVoidRepFailFmapAppAltSymbolEpsAccept threadId_ _threadContFSMMapFSMState STransitionSAcceptCont EmptyNonEmpty SingleCont emptyCont nonEmptyContcompile2mkNFA compile2_combine $fFunctorContrenumberfresh Data.StringIsStringInfixMatchingStateNoResult GotResult prefixLen prefixStrresult postfixStr prefixCounter preferOvermkInfixMatchingState gotResultfindExtremalInfix $fIsStringRE$fAlternativeRE$fApplicativeRE $fFunctorREPunPgetCharre2monadrunP$fAlternativeP$fApplicativeP $fFunctorP$fMonadPoptionalliftA3liftA2liftA<**><**>getConstConst unwrapMonad WrapMonad WrappedMonad unwrapArrow WrapArrow WrappedArrow getZipListZipList<$