HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Moduleregex-pcre-builtin-0.95.2.3.8.44Haskell2010

Text.Regex.PCRE.Wrap

This will fail or error only if allocation fails or a nullPtr is passed in.

  • 7 types
  • 40 values

High-level interface

5 declarations
datadata Regex
#

A compiled regular expression

Instances19RegexOptions, RegexMaker, RegexLike, RegexContext, …
newtypenewtype CompOption
#

Constructors

Instances11Eq, Num, Show, Bits, RegexOptions, RegexMaker, …
newtypenewtype ExecOption
#

Constructors

Instances11Eq, Num, Show, Bits, RegexOptions, RegexMaker, …

Low-level interface

9 declarations
valuewrapMatch
  1. :: StartOffset

    Starting index in CStringLen

  2. -> Regex

    Compiled regular expression

  3. -> CStringLen

    String to match against and length in bytes

  4. -> IO (Either WrapError (Maybe [(StartOffset, EndOffset)]))

    Returns: 'Right Nothing' if the regex did not match the string, or: 'Right Just' an array of (offset,length) pairs where index 0 is whole match, and the rest are the captured subexpressions, or: 'Left ReturnCode' if there is some strange error

#

Matches a regular expression against a string

Should never return (Right (Just []))

Miscellaneous

4 declarations

CompOption values

14 declarations

ExecOption values

7 declarations

ReturnCode values

8 declarations