From 31774047411d7c2c740c13bfa6df30cabd13cecd Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Thu, 28 Jun 2018 18:02:50 +0630 Subject: [PATCH] Remove extra module from Vfile_kind functor Signed-off-by: Rudi Grinberg --- src/super_context.ml | 8 ++++---- src/vfile_kind.ml | 8 +++++--- src/vfile_kind.mli | 6 ++++-- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/src/super_context.ml b/src/super_context.ml index 8d1b2c9f..964f895d 100644 --- a/src/super_context.ml +++ b/src/super_context.ml @@ -534,10 +534,10 @@ end module Pkg_version = struct open Build.O - module V = Vfile_kind.Make(struct type t = string option end) - (struct - let t = Sexp.To_sexp.(option string) - end) + module V = Vfile_kind.Make(struct + type t = string option + let t = Sexp.To_sexp.(option string) + end) let spec sctx (p : Package.t) = let fn = diff --git a/src/vfile_kind.ml b/src/vfile_kind.ml index 90911ca0..dceff38d 100644 --- a/src/vfile_kind.ml +++ b/src/vfile_kind.ml @@ -43,14 +43,16 @@ let eq (type a) (type b) Id.eq A.id B.id module Make - (T : sig type t end) - (To_sexp : sig val t : T.t Sexp.To_sexp.t end) + (T : sig + type t + val t : t Sexp.To_sexp.t + end) : S with type t = T.t = struct type t = T.t (* XXX dune dump should make use of this *) - let _t = To_sexp.t + let _t = T.t module P = Utils.Persistent(struct type nonrec t = t diff --git a/src/vfile_kind.mli b/src/vfile_kind.mli index be540065..3ae1c604 100644 --- a/src/vfile_kind.mli +++ b/src/vfile_kind.mli @@ -20,6 +20,8 @@ type 'a t = (module S with type t = 'a) val eq : 'a t -> 'b t -> ('a, 'b) eq option module Make - (T : sig type t end) - (To_sexp : sig val t : T.t Sexp.To_sexp.t end) + (T : sig + type t + val t : t Sexp.To_sexp.t + end) : S with type t = T.t