package core
Module Core.Set_intf
This module defines interfaces used in Set. See the Map docs for a description of the design.
This module defines module types {Creators,Accessors}{0,1,2,_generic,_with_comparator}. It uses check functors to ensure that each module type is an instance of the corresponding _generic one.
We must treat Creators and Accessors separately, because we sometimes need to choose different instantiations of their options. In particular, Set itself matches Creators2_with_comparator but Accessors2 (without comparator).
module Binable : sig ... endmodule Set = Base.Setmodule Tree = Set.Using_comparator.Treemodule Named = Set.Namedmodule Container = Base.Containermodule type Elt_plain = Set.Elt_plainmodule type Elt = sig ... endmodule type Elt_binable = sig ... endmodule Elt_bin_io : sig ... endmodule type For_deriving = sig ... endmodule Without_comparator = Set.Without_comparatormodule With_comparator = Set.With_comparatormodule With_first_class_module = Set.With_first_class_modulemodule Continue_or_stop = Container.Continue_or_stopmodule Merge_to_sequence_element = Sequence.Merge_with_duplicates_elementmodule type Accessors_generic = sig ... endmodule type Accessors0 = sig ... endmodule type Accessors1 = sig ... endmodule type Accessors2 = sig ... endmodule type Accessors2_with_comparator = sig ... endmodule Check_accessors
(T : Base.T.T2)
(Tree : Base.T.T2)
(Elt : Base.T.T1)
(Named : Base.T.T2)
(Cmp : Base.T.T1)
(Options : Base.T.T3)
(_ :
Accessors_generic
with type ('a, 'b, 'c) options := ('a, 'b, 'c) Options.t
with type ('a, 'b) t := ('a, 'b) T.t
with type ('a, 'b) tree := ('a, 'b) Tree.t
with type 'a elt := 'a Elt.t
with type 'cmp cmp := 'cmp Cmp.t
with type ('a, 'b) named := ('a, 'b) Named.t) :
sig ... endConsistency checks (same as in Container).
module Check_accessors0 (M : Accessors0) : sig ... endmodule Check_accessors1 (M : Accessors1) : sig ... endmodule Check_accessors2 (M : Accessors2) : sig ... endmodule Check_accessors2_with_comparator
(M : Accessors2_with_comparator) :
sig ... endmodule type Creators_generic = sig ... endmodule type Creators0 = sig ... endmodule type Creators1 = sig ... endmodule type Creators2 = sig ... endmodule type Creators2_with_comparator = sig ... endmodule Check_creators
(T : Base.T.T2)
(Tree : Base.T.T2)
(Elt : Base.T.T1)
(Cmp : Base.T.T1)
(Options : Base.T.T3)
(_ :
Creators_generic
with type ('a, 'b, 'c) options := ('a, 'b, 'c) Options.t
with type ('a, 'b) t := ('a, 'b) T.t
with type ('a, 'b) tree := ('a, 'b) Tree.t
with type 'a elt := 'a Elt.t
with type 'cmp cmp := 'cmp Cmp.t) :
sig ... endmodule Check_creators0 (M : Creators0) : sig ... endmodule Check_creators1 (M : Creators1) : sig ... endmodule Check_creators2 (M : Creators2) : sig ... endmodule Check_creators2_with_comparator
(M : Creators2_with_comparator) :
sig ... endmodule type Creators_and_accessors_generic = sig ... endmodule type Creators_and_accessors0 = sig ... endmodule type Creators_and_accessors1 = sig ... endmodule type Creators_and_accessors2 = sig ... endmodule type Creators_and_accessors2_with_comparator = sig ... endmodule Make_S_plain_tree (Elt : Comparator.S) : sig ... endmodule type S_plain = sig ... endmodule type S = sig ... endmodule type S_binable = sig ... end