úÎsplè'      !"#$%& Safe-Inferred '()*+,-./'+,-./'()*+,-./ 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 0, 1 and  2) instances in the following natural way:  f 3 ra matches iff ra- matches, and its return value is the result  of applying f to the return value of ra.  4 xB matches the empty string (i.e. it does not consume any symbols),  and its return value is x  rf 5 ra3 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 6 rb. matches a string which is accepted by either ra or rb. 8 It is left-biased, so if both can match, the result of ra is used.  7: is a regular expression which does not match any string.  8 ra: matches concatenation of zero or more strings matched by ra  and returns the list of ra'"s return values on those strings.  9 ra9 matches concatenation of one or more strings matched by ra  and returns the list of ra'"s return values on those strings. FA 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. <=>?@ABCDEFGH<=>?@ABCDEFGHCBA@?>=<EDFGH Safe-InferredIJKLMNOPQRSTUVWP IJLKMONPQRSTUVW experimental"Roman Cheplyaka <roma@ro-che.info> Safe-Inferred ,The 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  Bs ordered by priority. E.g. threads generated by the left part of  66 come before the threads generated by the right part. JList of all threads of an object. Each non-result thread has a unique id. DCreate an object from a list of threads. It is recommended that all  threads come from the same , 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  thread ?Check 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) CExtract 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. LAdd a thread to an object. The new thread will have lower priority than the * threads which are already in the object. LIf 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 X YZ    X YZ Safe-Inferred?Match and return a single symbol which satisfies the predicate "Match and return the given symbol #Match and return any single symbol 0Match and return the given sequence of symbols. Note that there is an [% 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" =~ number OMatch zero or more instances of the given expression, which are combined using  the given folding function. @ 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 8.  Examples: FText.Regex.Applicative> findFirstPrefix (few anySym <* "b") "ababab" Just ("a","abab") GText.Regex.Applicative> findFirstPrefix (many anySym <* "b") "ababab" Just ("ababa","") 3Return matched symbols as part of the return value  s =~ a = match a sEAttempt to match a string of symbols against the regular expression. J Note that the whole string (not just some part of it) should be matched.  Examples: 8Text.Regex.Applicative> match (sym 'a' <|> sym 'b') "a"  Just 'a' 9Text.Regex.Applicative> match (sym 'a' <|> sym 'b') "ab" Nothing AFind a string prefix which is matched by the regular expression. LOf all matching prefixes, pick one using left bias (prefer the left part of  6$ to the right part) and greediness. ;This 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") 3Text.Regex.Applicative> findFirstPrefix "bc" "abc" Nothing KFind 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: 5Text.Regex.Applicative Data.Char> let keyword = "if" GText.Regex.Applicative Data.Char> let identifier = many $ psym isAlpha ]Text.Regex.Applicative Data.Char> let lexeme = (Left <$> keyword) <|> (Right <$> identifier) DText.Regex.Applicative Data.Char> findLongestPrefix lexeme "if foo" Just (Left "if"," foo") CText.Regex.Applicative Data.Char> findLongestPrefix lexeme "iffoo" Just (Right "iffoo","") 'Find the shortest prefix (analogous to ) GFind 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. GFind 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. !GFind 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. \]^_`abcdefg !hijk\]^_`abcdefg !\^]_`abcdefg !hijk experimental"Roman Cheplyaka <roma@ro-che.info> Safe-Inferred01lmnopqr5489672stuvwxyz{|}~3 ! ! 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. "#$%&"#$%&"#$%&"#$%&€      !"#$%&'()*+,-.//01234567897:;7:<7=>7:?7:@7:A7:37:B7:C7DE7DFGHIJKLMNO PQ RSTUVWXYZ[\]^_`a7bcdefghijklmnopqrs7:t7:u7:v7:w7:x7:y7:z7:{7:|7:|7:}7:~7:7:€7:7:‚7:ƒ7:„7:„78…†regex-applicative-0.3Text.Regex.ApplicativeText.Regex.Applicative.ObjectText.Regex.Applicative.Common!Text.Regex.Applicative.StateQueueText.Regex.Applicative.TypesText.Regex.Applicative.Compile Text.Regex.Applicative.InterfaceRE Greediness NonGreedyGreedyThreadThreadIdthreadIdReObjectthreads fromThreadsisResult getResultfailed emptyObjectresultsstep stepThread addThreadcompilepsymsymanySymstringreFoldlfew withMatched=~matchfindFirstPrefixfindLongestPrefixfindShortestPrefixfindFirstInfixfindLongestInfixfindShortestInfixdigithexDigitsigneddecimal hexadecimal StateQueueelementsids getElementsempty insertUniqueinsertfoldbaseGHC.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 $fFunctorREoptionalliftA3liftA2liftA<**><**>getConstConst unwrapMonad WrapMonad WrappedMonad unwrapArrow WrapArrow WrappedArrow getZipListZipList<$