From 2fcf6e585169719e56542faeca98486453df4640 Mon Sep 17 00:00:00 2001 From: Dorian Lesbre Date: Wed, 17 Jul 2024 11:25:07 +0200 Subject: [PATCH] copy module instead of include (https://github.com/ocaml/odoc/issues/1162) --- src/PatriciaTree.ml | 2 +- src/PatriciaTree.mli | 10 +++++----- src/functors.ml | 2 +- src/functors.mli | 2 +- src/key_value.ml | 2 +- src/key_value.mli | 2 +- src/nodes.ml | 2 +- src/nodes.mli | 2 +- src/{signatures.ml => sigs.ml} | 0 src/test/patriciaTreeTest.ml | 1 + 10 files changed, 13 insertions(+), 12 deletions(-) rename src/{signatures.ml => sigs.ml} (100%) diff --git a/src/PatriciaTree.ml b/src/PatriciaTree.ml index 80cf374..9c6adac 100644 --- a/src/PatriciaTree.ml +++ b/src/PatriciaTree.ml @@ -20,7 +20,7 @@ (**************************************************************************) include Ints -include Signatures +module Sigs = Sigs include Key_value include Functors include Nodes diff --git a/src/PatriciaTree.mli b/src/PatriciaTree.mli index 020589c..bc64a71 100644 --- a/src/PatriciaTree.mli +++ b/src/PatriciaTree.mli @@ -115,18 +115,18 @@ informative; log(n) corresponds to the real complexity in usual distributions. *) -(** {1 Integer manipulations} *) - -include module type of Ints - (** {1 Signatures} *) -include module type of Signatures +module Sigs = Sigs (** {1 Functors} *) include module type of Functors +(** {1 Miscellaneous utilities} *) + +include module type of Ints + (** {1 Default KEY and VALUE implementations} *) (** These can be used as parameters to {!MakeMap}/{!MakeSet} functors in the most common use cases. *) diff --git a/src/functors.ml b/src/functors.ml index 2a72e27..4972a5e 100644 --- a/src/functors.ml +++ b/src/functors.ml @@ -20,7 +20,7 @@ (**************************************************************************) open Ints -open Signatures +open Sigs open Key_value open Nodes diff --git a/src/functors.mli b/src/functors.mli index b4de852..93ef60a 100644 --- a/src/functors.mli +++ b/src/functors.mli @@ -19,7 +19,7 @@ (* for more details (enclosed in the file LICENSE). *) (**************************************************************************) -open Signatures +open Sigs (** This section presents the functors which can be used to build patricia tree maps and sets. *) diff --git a/src/key_value.ml b/src/key_value.ml index f9b871c..a522121 100644 --- a/src/key_value.ml +++ b/src/key_value.ml @@ -19,7 +19,7 @@ (* for more details (enclosed in the file LICENSE). *) (**************************************************************************) -open Signatures +open Sigs (** {1 Keys and values} *) diff --git a/src/key_value.mli b/src/key_value.mli index e90188a..f2a65f3 100644 --- a/src/key_value.mli +++ b/src/key_value.mli @@ -19,7 +19,7 @@ (* for more details (enclosed in the file LICENSE). *) (**************************************************************************) -open Signatures +open Sigs module Value : VALUE with type 'a t = 'a (** Default implementation of {!VALUE}, used in {!MakeMap}. diff --git a/src/nodes.ml b/src/nodes.ml index 7049b72..caec96e 100644 --- a/src/nodes.ml +++ b/src/nodes.ml @@ -20,7 +20,7 @@ (**************************************************************************) open Ints -open Signatures +open Sigs let sdbm x y = y + (x lsl 16) + (x lsl 6) - x (** Combine two numbers into a new hash *) diff --git a/src/nodes.mli b/src/nodes.mli index 8507fda..65c5f36 100644 --- a/src/nodes.mli +++ b/src/nodes.mli @@ -19,7 +19,7 @@ (* for more details (enclosed in the file LICENSE). *) (**************************************************************************) -open Signatures +open Sigs (** {1 Basic nodes} *) diff --git a/src/signatures.ml b/src/sigs.ml similarity index 100% rename from src/signatures.ml rename to src/sigs.ml diff --git a/src/test/patriciaTreeTest.ml b/src/test/patriciaTreeTest.ml index 4fce639..7d4ccdc 100644 --- a/src/test/patriciaTreeTest.ml +++ b/src/test/patriciaTreeTest.ml @@ -20,6 +20,7 @@ (**************************************************************************) open PatriciaTree +open Sigs let check_highest_bit x res = (* Printf.printf "CHECK_HIGHEST_BIT: %x %x\n%!" x res; *)