Skip to content

Commit

Permalink
Merge pull request #645 from samoht/node-functor
Browse files Browse the repository at this point in the history
Simplify the parameters of the Private.Node.Make functor
  • Loading branch information
samoht authored Mar 8, 2019
2 parents 08aea1d + e34a758 commit 5563388
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
5 changes: 4 additions & 1 deletion src/irmin/irmin.mli
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion src/irmin/node.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion src/irmin/node.mli
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5563388

Please sign in to comment.