package base_quickcheck

  1. Overview
  2. Docs
Randomized testing framework, designed for compatibility with Base

Install

dune-project
 Dependency

Authors

Maintainers

Sources

v0.14.1.tar.gz
sha256=b69a18bf0149e3b553ada9af5258681000948bfb7b6646fee66aa462b507b058
md5=d04738d4499e256b752bc40fcdb9730d

doc/src/ppx_quickcheck_expander/clause_syntax_intf.ml.html

Source file clause_syntax_intf.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
open! Import

module type S = sig
  type ast
  type t

  val create_list : ast list -> t list

  (** Add to hash state via [hash_fold_int] to signify what clause we're in. [None] for
      inherited polymorphic variant clauses, since their observers will have salt for
      concrete tags. *)
  val salt : t -> int option

  (** location of the clause's definition *)
  val location : t -> location

  (** weight of the clause relative to other clauses in the generator distribution *)
  val weight : t -> expression

  (** types of the clause's arguments *)
  val core_type_list : t -> core_type list

  (** constructing a pattern to match the clause *)
  val pattern : t -> loc:location -> pattern list -> pattern

  (** constructing an expression to create an instance of the clause *)
  val expression : t -> loc:location -> core_type -> expression list -> expression
end

module type Clause_syntax = sig
  module type S = S

  module Variant : S with type ast = constructor_declaration
  module Polymorphic_variant : S with type ast = row_field
end