HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

  • Packageregex-1.1.0.2
  • Exports30
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceAddCaptureNames.hs

The regex Internal Modules

This module contains just what the test suite (re-tests) in regex-examples needs from the package internals to do its job and the ZeInternals types and functions needed by the regex-with-pcre package

Text.RE.ZeInternals.AddCaptureNames

valueaddCaptureNames :: Typeable a => CaptureNames -> a -> a

a hairy dynamically-typed function used with the legacy (=~) and (=~~) to see if it can/should add the capture names extracted from the RE into the polymorphic result of the operator (it does for any Match or Matches type, provided it is parameterised over a recognised type). The test suite is all over this one, testing all of these cases.

Text.RE.ZeInternals.EscapeREString

Text.RE.ZeInternals.NamedCaptures

valuecp :: QuasiQuoter

quasi quoter for CaptureID: [cp|0|], [cp|0|], etc., indexing captures by classic positional numbers, and [cp|foo|], etc., referencing a named capture [re| ... ${foo}( ... ) ... |].

datadata Token

our RE scanner returns a list of these tokens

Instances4Eq, Show, Generic, Rep

Text.RE.ZeInternals.Replace

valueexpandMacros :: (r -> String) -> Macros r -> String -> String

expand all of the @{..} macros in the RE in the argument String according to the Macros argument, preprocessing the RE String according to the Mode argument (used internally)

Text.RE.ZeInternals.PreludeMacros

datadata PreludeMacro
Instances5Bounded, Enum, Eq, Ord, Show

Text.RE.ZeInternals.SearchReplace

Text.RE.ZeInternals.QQ

valueqq0 :: String -> QuasiQuoter

a quasi quoter that can be used in no context (to be extended with the appropriate quasi quoter parser)

Text.RE.ZeInternals.TestBench