HORIZON HASKELLDocslts/ghc-9.14.x45dd5372026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 9.14.1 · lts/ghc-9.14.x · 45dd537 · 2026-10-11

  • Packagepcre2-2.3.1
  • Exports247
  • LanguageGHC2021
  • LicenceApache-2.0
  • SourceForeign.hs

Types

3 declarations
typetype PCRE2_UCHAR = CUChar
#

"The UCHAR types define unsigned code units of the appropriate widths. For example, PCRE2_UCHAR16 is usually defined as uint16_t."

typetype PCRE2_SPTR = Ptr PCRE2_UCHAR
#

"The SPTR types are constant pointers to the equivalent UCHAR types, that is, they are pointers to vectors of unsigned code units."

typetype PCRE2_SIZE = CSize
#

"...string lengths and offsets into strings of code units...are always of type PCRE2_SIZE...currently always defined as size_t."

Opaque types

These correspond to structs that are only ever passed by reference. They simply exist for type safety and cannot be constructed in Haskell.

The general context

4 declarations

The compile context

4 declarations

Compile context setters

The match context

4 declarations

Match context setters

Checking build-time options

18 declarations

Compiling a pattern

6 declarations

Main compile options

Extra compile options

Locale support

2 declarations

Information about a compiled pattern

28 declarations

Duplicate capture group names

Callouts

1 declaration

Callout struct getters

These functions are not part of the official API; we provide them here. C API consumers are supposed to access struct fields directly, but the FFI cannot yet do that as of GHC 8.8.4.

pcre2_callout_block

pcre2_callout_enumerate_block

pcre2_substitute_callout_block

The match data block

4 declarations

Matching a pattern

1 declaration

Match options

Match errors

UTF-16-specific errors

DFA matching

1 declaration

DFA matching options

DFA matching errors

Returned string and captured substrings

15 declarations

Creating a new string with substitutions

1 declaration

Substitution options

Substitution errors

Other information about a match

2 declarations

Obtaining a textual error message

1 declaration

Iterating over all matches

1 declaration

Pattern serialization

6 declarations