| Safe Haskell | Safe | 
|---|---|
| Language | Haskell2010 | 
RegExDot.BracketExpressionMember
Description
AUTHOR- Dr. Alistair Ward
 DESCRIPTION
Permits Perl-style shortcuts to be canned & assigned a single-Char mnemonic for subsequent reference;
	the implementation of Read looks for a back-slashed Char, for which it expects there to be a corresponding canned ShowablePredicate.
CAVEATS
Since the underlying polymorphic data-type isn't required to implement neither Enum nor Ord, the implementation of Read can't cope with range-specifications.
	Lacking this, Bracket-expression members must be enumerated exhaustively.
Synopsis
- class ShortcutExpander a where
- findPredicate :: Char -> Maybe (ShowablePredicate a)
 
 - data Member m
- = Predicate (ShowablePredicate m)
 - | Literal m
 
 - (=~) :: Eq m => m -> Member m -> Bool
 
Type-classes
class ShortcutExpander a where Source #
- The interface via which Perl-style shortcuts are expanded (when they occur within a bracket-expression), in a manner appropriate to the chosen type-parameter.
 - The expansion of Perl-style shortcuts, is more restricted inside than outside, a bracket-expression,
	& consequently are merely represented here by a 
ShowablePredicate, rather than providing a more general form suitable also for those Perl-style shortcuts found outside bracket-expressions. - This interface is implemented elsewhere, where the specific type-parameter & consequently the appropriate set of Perl-style shortcuts, are defined.
 
Methods
Arguments
| :: Char | |
| -> Maybe (ShowablePredicate a) | Attempt to find the appropriate   | 
Instances
| ShortcutExpander Int Source # | |
Defined in RegExDot.InstanceInt Methods findPredicate :: Char -> Maybe (ShowablePredicate Int) Source #  | |
Types
Data-types
- A BracketExpression can contain either a literal, a range of literals given 
(Enum a, Ord a), a Perl-style shortcut, or whenCharis the type-parameter, a POSIX Character-class. - This data-type reduces the representation of all these possibilities to either a predicate or a literal.
 
Constructors
| Predicate (ShowablePredicate m) | This   | 
| Literal m | This   |