Safe HaskellSafe

Regexp

Description

Definition and simplification of regular expressions

Synopsis

Documentation

data Regexp #

Regular expressions

Instances
Eq Regexp # 
Instance details

Defined in Regexp

Methods

(==) :: Regexp -> Regexp -> Bool #

(/=) :: Regexp -> Regexp -> Bool #

Show Regexp # 
Instance details

Defined in Regexp

simplify :: Regexp -> Regexp #

Simplify a regexp recursively.

>>> simplify $ Star Empty `Concat` Single 'a'
(εa)

repeatedly :: Eq a => (a -> a) -> a -> a #

Repeatedly apply f to the argument x until the fix point is reached.

>>> repeatedly simplify $ Star Empty `Concat` Single 'a'
a