package re2

  1. Overview
  2. Docs

This module uses the X-macro technique to keep a variant type in ML synchronized with an enum in C. Check the jbuild file to figure out which files are safe to edit and which files are generated during the build. To help distinguish the two, the next comment is omitted from the generated copy. *

type enum =
  1. | Encoding_latin1 of bool
  2. | Posix_syntax of bool
  3. | Longest_match of bool
  4. | Log_errors of bool
  5. | Max_mem of int
  6. | Literal of bool
  7. | Never_nl of bool
  8. | Dot_nl of bool
  9. | Never_capture of bool
  10. | Case_sensitive of bool
  11. | Perl_classes of bool
  12. | Word_boundary of bool
  13. | One_line of bool

The order of variants in this enum type must be kept in sync with a C-side enum or else options will be silently misparsed. *

type t = [
  1. | `Encoding_latin1 of bool
  2. | `Posix_syntax of bool
  3. | `Longest_match of bool
  4. | `Log_errors of bool
  5. | `Max_mem of int
  6. | `Literal of bool
  7. | `Never_nl of bool
  8. | `Dot_nl of bool
  9. | `Never_capture of bool
  10. | `Case_sensitive of bool
  11. | `Perl_classes of bool
  12. | `Word_boundary of bool
  13. | `One_line of bool
]

Polymorphic variants are provided for concision at client call sites. *

val latin1 : [> `Encoding_latin1 of bool ] list
val posix : [> `Longest_match of bool | `Posix_syntax of bool ] list
val noisy : [> `Log_errors of bool ] list
val enum_of_t : [< `Case_sensitive of bool | `Dot_nl of bool | `Encoding_latin1 of bool | `Literal of bool | `Log_errors of bool | `Longest_match of bool | `Max_mem of int | `Never_capture of bool | `Never_nl of bool | `One_line of bool | `Perl_classes of bool | `Posix_syntax of bool | `Word_boundary of bool ] -> enum
module type S = sig ... end
OCaml

Innovation. Community. Security.