Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Charactor classes.
Synopsis
- type CharClasses = Set Char
- charClasses :: RE a -> CharClasses
- classOfChar :: CharClasses -> Char -> Char
Documentation
type CharClasses = Set Char Source #
Character classes are represented by partition lower bounds.
charClasses :: RE a -> CharClasses Source #
Character classes.
We can partition Char
so characters in each part,
affect the given regular expression in the same way.
If we do some kind of memoising, we can map all characters
to classOfChar
, making everything smaller.
classOfChar :: CharClasses -> Char -> Char Source #
Map char to the representer of a class.