| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
RegExChar.MetaChar
Description
AUTHOR- Dr. Alistair Ward
DESCRIPTION
- Implements
ShortcutExpanderChar, to implement some of the traditional Perl-style shortcuts:
\d- => Any
isDigit-character. \D- => Any non-
isDigitcharacter. \s- => Any
isSpace-character. \S- => Any non-
isSpacecharacter. \w- => Any
isWordletter. \W- => Any non-
isWordletter.
- Enables one to compose concise regexen, containing any
Charthat's a member of one of these predefined sets. - Though
Metais polymorphic, & the type-parameter can't be assumed to implement eitherEnumorOrd,Charactually does, so this module is able to implement ranges within a Bracket-expression. - Defines specialised instances of
Read&Show, to cope with Perl-style shortcuts, Posix Character-classes & Bracket-expression range-specifications.
Synopsis
- newtype MetaChar = MkMetaChar {
- deconstruct :: Meta Char
- metaCharParser :: Parser MetaChar
Types
Type-synonyms
A specialised instance, encapsulated to permit tailored instance-declarations.
Constructors
| MkMetaChar | |
Fields
| |
Constants
Functions
metaCharParser :: Parser MetaChar Source #
Builds a parser of traditional regex-syntax, which understands Char-specific concepts like Perl-style shortcuts & Posix Character-classes.
Orphan instances
| ShortcutExpander Char Source # | |
| ShortcutExpander Char Source # | |
Methods findPredicate :: Char -> Maybe (ShowablePredicate Char) # | |