From e34a7581d3c67411c965d2615de4b3d5899d56ca Mon Sep 17 00:00:00 2001 From: Thomas Gazagnaire Date: Fri, 8 Mar 2019 17:16:01 +0100 Subject: [PATCH] Simplify the parameters of the Private.Node.Make functor --- src/irmin/irmin.mli | 5 ++++- src/irmin/node.ml | 5 ++++- src/irmin/node.mli | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/irmin/irmin.mli b/src/irmin/irmin.mli index 1ee1ba7a0f..57169267ea 100644 --- a/src/irmin/irmin.mli +++ b/src/irmin/irmin.mli @@ -1561,7 +1561,10 @@ module Private: sig (** [Make] provides a simple node implementation, parameterized by the contents and notes keys [K], paths [P] and metadata [M]. *) - module Make (K: Type.S) (P: Path.S) (M: Metadata.S): + module Make + (K: Type.S) + (P: sig type step val step_t: step Type.t end) + (M: Metadata.S): S with type hash = K.t and type step = P.step and type metadata = M.t diff --git a/src/irmin/node.ml b/src/irmin/node.ml index 73eb152295..78c16fb508 100644 --- a/src/irmin/node.ml +++ b/src/irmin/node.ml @@ -27,7 +27,10 @@ module No_metadata = struct let merge = Merge.v t (fun ~old:_ () () -> Merge.ok ()) end -module Make (K: Type.S) (P: S.PATH) (M: S.METADATA) = +module Make + (K: Type.S) + (P: sig type step val step_t: step Type.t end) + (M: S.METADATA) = struct type hash = K.t diff --git a/src/irmin/node.mli b/src/irmin/node.mli index 22d80522e0..698900902f 100644 --- a/src/irmin/node.mli +++ b/src/irmin/node.mli @@ -20,7 +20,10 @@ module No_metadata: S.METADATA with type t = unit -module Make (K: Type.S) (P: S.PATH) (M: S.METADATA): +module Make + (K: Type.S) + (P: sig type step val step_t: step Type.t end) + (M: S.METADATA): S.NODE with type hash = K.t and type step = P.step and type metadata = M.t