package ppx_enumerate

  1. Overview
  2. Docs
Generate a list containing all values of a finite type

Install

Dune Dependency

Authors

Maintainers

Sources

v0.17.0.tar.gz
sha256=a27f1797b1315bdf7678fde783dff493bd348f1c5b644d7616b660bd295dad36

doc/src/ppx_enumerate.runtime-lib/ppx_enumerate_lib.ml.html

Source file ppx_enumerate_lib.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
module List = List

module Enumerable = struct
  module type S = sig
    type t

    val all : t list
  end

  module type S1 = sig
    type 'a t

    val all : 'a list -> 'a t list
  end

  module type S2 = sig
    type ('a, 'b) t

    val all : 'a list -> 'b list -> ('a, 'b) t list
  end

  module type S3 = sig
    type ('a, 'b, 'c) t

    val all : 'a list -> 'b list -> 'c list -> ('a, 'b, 'c) t list
  end
end
OCaml

Innovation. Community. Security.