HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulerere-0.2.0.2Haskell2010

RERE.Type

Regular-expression with fixed points.

  • 1 type
  • 14 values
  • Packagerere-0.2.0.2
  • Exports15
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceType.hs

Regular expression type

1 declaration
datadata RE a
#

Regular expression with fixed point.

Constructors

Instances11Monad, Functor, Applicative, Foldable, Traversable, Eq, …

Smart constructors

7 declarations
value(>>>=) :: Ord b => RE a -> (a -> RE b) -> RE b
#

Variable substitution.

Operations

5 declarations
valuenullable :: RE a -> Bool
#

Whether the regular expression accepts empty string, or whether the formal language contains empty string.

Example1 expression
nullable EpsTrue
Example1 expression
nullable (ch_ 'c')False
valuematch :: RE Void -> String -> Bool
#

Match string by iteratively differentiating the regular expression.

This version is slow, consider using RERE.matchR.

valuecompact :: Ord a => RE a -> RE a
#

Re-apply smart constructors on RE structure, thus potentially making it smaller.

This function is slow.

valuesize :: RE a -> Int
#

Size of RE. Counts constructors.

Internals

2 declarations