package pattern

  1. Overview
  2. Docs

Source file types.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
type pattern = (Ppxlib.pattern [@printer Ppxlib.Pprintast.pattern])

and expression = (Ppxlib.expression [@printer Ppxlib.Pprintast.expression])

and mismatch = {
    ident : string;
    expected : pattern;
    got : expression option;
  }

and failure = {
    common : pattern;
    mismatches : mismatch list;
  }

and 'a pattern_result = ('a, failure) result
      [@@deriving show]

type ('a, 'b) matcher = ?quoted:Ppxlib.expression -> 'a -> 'b pattern_result
OCaml

Innovation. Community. Security.