Add modules_without_implementation example to wrapped transition mode

Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
This commit is contained in:
Rudi Grinberg 2018-08-29 20:22:59 +03:00
parent 8acca614da
commit f47834d80b
4 changed files with 14 additions and 4 deletions

View File

@ -166,11 +166,16 @@ let to_sexp { name; impl; intf; obj_name ; pp } =
let deprecate t =
{ t with
intf = None
; impl =
impl =
Some (
let impl = Option.value_exn t.impl in
let (base, _) = Path.split_extension impl.path in
let path =
match t.intf, t.impl with
| Some _, Some impl
| None, Some impl -> impl.path
| Some intf, _ -> intf.path
| None, None -> assert false
in
let (base, _) = Path.split_extension path in
{ syntax = OCaml
; path = Path.extend_basename base ~suffix:".ml-gen"
}

View File

@ -2,3 +2,6 @@ Mylib.Bar.run ();;
Mylib.Foo.run ();;
Bar.run ();;
Foo.run ();;
module Y : Mylib.Intf_only.S = struct end
module X : Intf_only.S = struct end

View File

@ -1,3 +1,4 @@
(library
(name mylib)
(modules_without_implementation intf_only)
(wrapped (transition "Will be removed past 2020-20-20")))

View File

@ -0,0 +1 @@
module type S = sig end