HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

Moduleregex-applicative-0.3.4Haskell2010

Text.Regex.Applicative.Object

This is a low-level interface to the regex engine.

Synopsis
newtypenewtype ReObject s r

The state of the engine is represented as a "regex object" of type ReObject s r, where s is the type of symbols and r is the result type (as in the RE type). Think of ReObject as a collection of Threads ordered by priority. E.g. threads generated by the left part of <|> come before the threads generated by the right part.

datadata Thread s r

A thread either is a result or corresponds to a symbol in the regular expression, which is expected by that thread.

valuefailed :: ReObject s r -> Bool

Check if the object has no threads. In that case it never will produce any new threads as a result of step.

valueresults :: ReObject s r -> [r]

Extract the result values from all the result threads of an object

valuefromThreads :: [Thread s r] -> ReObject s r

Create an object from a list of threads. It is recommended that all threads come from the same ReObject, unless you know what you're doing. However, it should be safe to filter out or rearrange threads.

valueaddThread :: Thread s r -> ReObject s r -> ReObject s r

Add a thread to an object. The new thread will have lower priority than the threads which are already in the object.

If a (non-result) thread with the same id already exists in the object, the object is not changed.