Add modules_without_implementation example to wrapped transition mode
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
This commit is contained in:
parent
8acca614da
commit
f47834d80b
|
@ -166,11 +166,16 @@ let to_sexp { name; impl; intf; obj_name ; pp } =
|
||||||
|
|
||||||
let deprecate t =
|
let deprecate t =
|
||||||
{ t with
|
{ t with
|
||||||
intf = None
|
impl =
|
||||||
; impl =
|
|
||||||
Some (
|
Some (
|
||||||
let impl = Option.value_exn t.impl in
|
let path =
|
||||||
let (base, _) = Path.split_extension impl.path in
|
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
|
{ syntax = OCaml
|
||||||
; path = Path.extend_basename base ~suffix:".ml-gen"
|
; path = Path.extend_basename base ~suffix:".ml-gen"
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,3 +2,6 @@ Mylib.Bar.run ();;
|
||||||
Mylib.Foo.run ();;
|
Mylib.Foo.run ();;
|
||||||
Bar.run ();;
|
Bar.run ();;
|
||||||
Foo.run ();;
|
Foo.run ();;
|
||||||
|
|
||||||
|
module Y : Mylib.Intf_only.S = struct end
|
||||||
|
module X : Intf_only.S = struct end
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
(library
|
(library
|
||||||
(name mylib)
|
(name mylib)
|
||||||
|
(modules_without_implementation intf_only)
|
||||||
(wrapped (transition "Will be removed past 2020-20-20")))
|
(wrapped (transition "Will be removed past 2020-20-20")))
|
|
@ -0,0 +1 @@
|
||||||
|
module type S = sig end
|
Loading…
Reference in New Issue