regex-1.1.0.0: Toolkit for regex-base

Safe HaskellNone
LanguageHaskell2010

Text.RE.REOptions

Contents

Synopsis

The Options Tutorial

This API module provides the generic types used to specify the options when compiling REs for each of the backl ends.

See the tutorials at http://re-tutorial-options.regex.uk

SimpleREOptions

data SimpleREOptions Source #

the default API uses these simple, universal RE options, which get auto-converted into the apropriate back-end REOptions_

Constructors

MultilineSensitive

case-sensitive with ^ and $ matching the start and end of a line

MultilineInsensitive

case-insensitive with ^ and $ matsh the start and end of a line

BlockSensitive

case-sensitive with ^ and $ matching the start and end of the input text

BlockInsensitive

case-insensitive with ^ and $ matching the start and end of the input text

Instances
Bounded SimpleREOptions Source # 
Instance details

Defined in Text.RE.REOptions

Enum SimpleREOptions Source # 
Instance details

Defined in Text.RE.REOptions

Eq SimpleREOptions Source # 
Instance details

Defined in Text.RE.REOptions

Ord SimpleREOptions Source # 
Instance details

Defined in Text.RE.REOptions

Show SimpleREOptions Source # 
Instance details

Defined in Text.RE.REOptions

Lift SimpleREOptions Source #

we need to use this in the quasi quoters to specify SimpleREOptions selected by the quasi quoter

Instance details

Defined in Text.RE.REOptions

Methods

lift :: SimpleREOptions -> Q Exp #

IsOption SimpleREOptions Source # 
Instance details

Defined in Text.RE.ZeInternals.TDFA

REOptions_

data REOptions_ r c e Source #

the general options for an RE are dependent on which back end is being used and are parameterised over the RE type for the back end, and its CompOption and ExecOption types (the compile-time and execution time options, respectively); each back end will define an REOptions type that fills out these three type parameters with the apropriate types (see, for example, Text.RE.TDFA)

Constructors

REOptions 

Fields

Instances
IsOption REOptions Source # 
Instance details

Defined in Text.RE.ZeInternals.TDFA

(Show r, Show c, Show e) => Show (REOptions_ r c e) Source # 
Instance details

Defined in Text.RE.REOptions

Methods

showsPrec :: Int -> REOptions_ r c e -> ShowS #

show :: REOptions_ r c e -> String #

showList :: [REOptions_ r c e] -> ShowS #

The Macro Tables

type Macros r = HashMap MacroID r Source #

our macro tables are parameterised over the back end RE type and and just associate each MacroID with an RE (which may in turn contain macros to be expanded)

newtype MacroID Source #

MacroID is just a wrapped String type with an IsString instance

Constructors

MacroID 

Fields

Instances
Eq MacroID Source # 
Instance details

Defined in Text.RE.REOptions

Methods

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

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

Ord MacroID Source # 
Instance details

Defined in Text.RE.REOptions

Show MacroID Source # 
Instance details

Defined in Text.RE.REOptions

IsString MacroID Source # 
Instance details

Defined in Text.RE.REOptions

Methods

fromString :: String -> MacroID #

Hashable MacroID Source #

MacroID is used with HM.HashMap to build macro lookup tables

Instance details

Defined in Text.RE.REOptions

Methods

hashWithSalt :: Int -> MacroID -> Int #

hash :: MacroID -> Int #

IsOption (Macros RE) Source # 
Instance details

Defined in Text.RE.ZeInternals.TDFA

emptyMacros :: Macros r Source #

a macro table containing no entries