package ppx_enumerate

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

Install

Dune Dependency

Authors

Maintainers

Sources

ppx_enumerate-v0.16.0.tar.gz
sha256=2832635d6d9ac4c63d48ed51d72745cd8a548e226a6110909d5a412d40ef9953

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.