This commit is contained in:
parent
aa2ff7b2f0
commit
2f3113f55d
11742 changed files with 1223940 additions and 0 deletions
|
|
@ -0,0 +1,21 @@
|
|||
$ cat >dune-project <<EOF
|
||||
> (lang dune 3.3)
|
||||
> EOF
|
||||
|
||||
$ mkdir vlib impl
|
||||
$ touch vlib/foo.mli
|
||||
$ cat >vlib/dune <<EOF
|
||||
> (library
|
||||
> (name foo)
|
||||
> (virtual_modules foo)
|
||||
> (wrapped false))
|
||||
> EOF
|
||||
|
||||
$ touch impl/foo.ml impl/new_public_module.ml
|
||||
$ cat >impl/dune <<EOF
|
||||
> (library
|
||||
> (name bar)
|
||||
> (implements foo))
|
||||
> EOF
|
||||
|
||||
$ dune build
|
||||
|
|
@ -0,0 +1 @@
|
|||
(lang dune 1.7)
|
||||
|
|
@ -0,0 +1 @@
|
|||
let run () = print_endline "implementing bar"
|
||||
|
|
@ -0,0 +1 @@
|
|||
(* this module isn't allowed as it introduces a new interface *)
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
(library
|
||||
(name foo_impl)
|
||||
(implements foo))
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
Implementations cannot introduce new modules to the library's interface
|
||||
$ dune build
|
||||
File "impl/dune", lines 1-3, characters 0-44:
|
||||
1 | (library
|
||||
2 | (name foo_impl)
|
||||
3 | (implements foo))
|
||||
Error: Implementations of wrapped libraries cannot introduce new public
|
||||
modules.
|
||||
The following modules:
|
||||
- Baz
|
||||
must all be marked as private using the (private_modules ..) field.
|
||||
[1]
|
||||
|
|
@ -0,0 +1 @@
|
|||
val run : unit -> unit
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
(library
|
||||
(name foo)
|
||||
(virtual_modules bar))
|
||||
Loading…
Add table
Add a link
Reference in a new issue