package core_kernel

  1. Overview
  2. Docs
Industrial strength alternative to OCaml's standard library

Install

Dune Dependency

Authors

Maintainers

Sources

v0.17.0.tar.gz
sha256=fd2b8c6715794df7a810a62b226f53720f211cd344b4afc9fab0498796d6b466

doc/src/core_kernel.total_map/enumeration_intf.ml.html

Source file enumeration_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
open! Core
open! Import

module type S = sig
  type ('a, 'b) enumeration
  type t
  type enumeration_witness

  val enumeration : (t, enumeration_witness) enumeration
end

(* "fc" stands for "first class" *)
module type S_fc = sig
  type enumerable_t

  include S with type t := enumerable_t
end

module type Enumeration = sig
  type ('a, 'witness) t = private { all : 'a list }

  module type S = S with type ('a, 'witness) enumeration := ('a, 'witness) t
  module type S_fc = S_fc with type ('a, 'witness) enumeration := ('a, 'witness) t

  module Make (T : sig
    type t [@@deriving enumerate]
  end) : S with type t := T.t

  val make : all:'a list -> (module S_fc with type enumerable_t = 'a)
end
OCaml

Innovation. Community. Security.