package core

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Source file identifiable.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
open! Import
include Identifiable_intf
module Binable = Binable0

module Make_plain (T : sig
    type t [@@deriving compare, hash, sexp_of]

    include Stringable.S with type t := t

    val module_name : string
  end) =
struct
  include T
  include Comparable.Make_plain (T)
  include Hashable.Make_plain (T)
  include Pretty_printer.Register (T)
end

module Make (T : sig
    type t [@@deriving bin_io, compare, hash, sexp]

    include Stringable.S with type t := t

    val module_name : string
  end) =
struct
  include T
  include Comparable.Make_binable (T)
  include Hashable.Make_binable (T)
  include Pretty_printer.Register (T)
end

module Make_with_sexp_grammar (T : sig
    type t [@@deriving bin_io, compare, hash, sexp, sexp_grammar]

    include Stringable.S with type t := t

    val module_name : string
  end) =
struct
  include T
  include Make (T)
end

module Make_and_derive_hash_fold_t (T : sig
    type t [@@deriving bin_io, compare, sexp]

    include Stringable.S with type t := t

    val hash : t -> int
    val module_name : string
  end) =
  Make (struct
    include T

    let hash_fold_t state t = hash_fold_int state (hash t)
  end)

module Make_using_comparator (T : sig
    type t [@@deriving bin_io, compare, hash, sexp]

    include Comparator.S with type t := t
    include Stringable.S with type t := t

    val module_name : string
  end) =
struct
  include T
  include Comparable.Make_binable_using_comparator (T)
  include Hashable.Make_binable (T)
  include Pretty_printer.Register (T)
end

module Make_using_comparator_and_derive_hash_fold_t (T : sig
    type t [@@deriving bin_io, compare, sexp]

    include Comparator.S with type t := t
    include Stringable.S with type t := t

    val hash : t -> int
    val module_name : string
  end) =
  Make_using_comparator (struct
    include T

    let hash_fold_t state t = hash_fold_int state (hash t)
  end)

module Extend (M : Base.Identifiable.S) (B : Binable0.S with type t = M.t) = struct
  module T = struct
    include M
    include (B : Binable.S with type t := t)
  end

  include T
  include Comparable.Extend_binable (M) (T)

  include Hashable.Make_binable_with_hashable (struct
      module Key = T

      let hashable = M.hashable
    end)
end
OCaml

Innovation. Community. Security.