HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Moduleregex-tdfa-1.3.2.5Haskell2010

Text.Regex.TDFA.Common

Common provides simple functions to the backend. It defines most of the data types. All modules should call error via the common_error function below.

  • 32 types
  • 16 values
valueon :: (t1 -> t1 -> t2) -> (t -> t1) -> t -> t -> t2
#
valuenorep :: Eq a => [a] -> [a]
#

After sort or sortBy the use of nub or nubBy can be replaced by norep or norepBy.

valuenorepBy :: (a -> a -> Bool) -> [a] -> [a]
#

After sort or sortBy the use of nub or nubBy can be replaced by norep or norepBy.

valuemapFst :: Functor f => (t -> t2) -> f (t, t1) -> f (t2, t1)
#
valuemapSnd :: Functor f => (t1 -> t2) -> f (t, t1) -> f (t, t2)
#
valuefst3 :: (a, b, c) -> a
#
valuesnd3 :: (a, b, c) -> b
#
valuethd3 :: (a, b, c) -> c
#
newtypenewtype DoPa
#

Used to track elements of the pattern that accept characters or are anchors.

Constructors

Instances4Enum, Eq, Ord, Show
  • Enum DoPaDefined in regex-tdfa-1.3.2.5 · Text.Regex.TDFA.Common
  • Eq DoPaDefined in regex-tdfa-1.3.2.5 · Text.Regex.TDFA.Common
  • Ord DoPaDefined in regex-tdfa-1.3.2.5 · Text.Regex.TDFA.Common
  • Show DoPaDefined in regex-tdfa-1.3.2.5 · Text.Regex.TDFA.Common
datadata CompOption
#

Control whether the pattern is multiline or case-sensitive like Text.Regex and whether to capture the subgroups (\1, \2, etc). Controls enabling extra anchor syntax.

Constructors

Instances9Read, Show, RegexOptions, RegexMaker, …
datadata ExecOption
#

Constructors

Instances9Read, Show, RegexOptions, RegexMaker, …
typetype Tag = Int
#

Used by implementation to name certain Positions during matching. Identity of Position tag to set during a transition.

datadata OP
#

Internal use to indicate type of tag and preference for larger or smaller Positions.

Instances2Eq, Show
  • Eq OPDefined in regex-tdfa-1.3.2.5 · Text.Regex.TDFA.Common
  • Show OPDefined in regex-tdfa-1.3.2.5 · Text.Regex.TDFA.Common
typetype Index = Int
#

Internal NFA node identity number.

typetype Position = Int
#

Index into the text being searched.

typetype GroupIndex = Int
#

GroupIndex is for indexing submatches from capturing parenthesized groups (PGroup or Group).

datadata Regex
#

The TDFA backend specific Regex type, used by this module's RegexOptions and RegexMaker.

Constructors

Instances19RegexOptions, RegexMaker, RegexLike, RegexContext, …
datadata QT
#

Internal to QNFA type.

Constructors

Instances2Eq, Show
  • Eq QTDefined in regex-tdfa-1.3.2.5 · Text.Regex.TDFA.Common
  • Show QTDefined in regex-tdfa-1.3.2.5 · Text.Regex.TDFA.Common
typetype QTrans = IntMap [TagCommand]
#

Internal type to represent the tagged transition from one QNFA to another (or itself). The key is the Index of the destination QNFA.

datadata WhichTest
#

Known predicates, just Beginning of Line (^) and End of Line ($). Also support for GNU extensions is being added: \` beginning of buffer, \' end of buffer, \< and \> for begin and end of words, \b and \B for word boundary and not word boundary.

Constructors

Instances4Enum, Eq, Ord, Show
  • Enum WhichTestDefined in regex-tdfa-1.3.2.5 · Text.Regex.TDFA.Common
  • Eq WhichTestDefined in regex-tdfa-1.3.2.5 · Text.Regex.TDFA.Common
  • Ord WhichTestDefined in regex-tdfa-1.3.2.5 · Text.Regex.TDFA.Common
  • Show WhichTestDefined in regex-tdfa-1.3.2.5 · Text.Regex.TDFA.Common
typetype TagList = [(Tag, TagUpdate)]
#

Ordered list of tags and their associated update operation.

typetype TagCommand = (DoPa, TagList)
#

A TagList and the location of the item in the original pattern that is being accepted.

typetype WinTags = TagList
#

Ordered list of tags and their associated update operation to perform on an empty transition to the virtual winning state.

datadata DFA
#

Internal DFA node, identified by the Set of indices of the QNFA nodes it represents.

Constructors

Instances1Show
  • Show DFADefined in regex-tdfa-1.3.2.5 · Text.Regex.TDFA.Common
datadata DT
#

Internal to the DFA node

Constructors

Instances1Show
  • Show DTDefined in regex-tdfa-1.3.2.5 · Text.Regex.TDFA.Common
typetype DTrans = IntMap (IntMap (DoPa, Instructions))
#

Internal type to represent the commands for the tagged transition. The outer IntMap is for the destination Index and the inner IntMap is for the Source Index. This is convenient since all runtime data going to the same destination must be compared to find the best.

A Destination IntMap entry may have an empty Source IntMap if and only if the destination is the starting index and the NFA or DFA. This instructs the matching engine to spawn a new entry starting at the post-update position.

datadata Orbits
#

Positions for which a * was re-started while looping. Need to append locations at back but compare starting with front, so use Seq as a queue. The initial position is saved in basePos (and a Maximize Tag), the middle positions in the Seq, and the final position is NOT saved in the Orbits (only in a Maximize Tag).

Instances1Show
  • Show OrbitsDefined in regex-tdfa-1.3.2.5 · Text.Regex.TDFA.Common