New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
typing error instead of scoping error #2550
Comments
Comment author: administrator
This could be a FAQ: using the module name Toto inside a file toto.ml has no But maybe we could add a special error message for that? Jacques |
Comment author: administrator Improve the error message? (JG) |
Comment author: administrator For me, it looks more like a bug of the CAML compiler : The compiler should Daniel
This could be a FAQ: using the module name Toto inside a file toto.ml has But maybe we could add a special error message for that? Jacques |
Comment author: @damiendoligez This was fixed at some point between 3.08.0 and 3.09.0. |
Original bug ID: 2550
Reporter: administrator
Status: closed (set by @damiendoligez on 2012-01-27T21:12:28Z)
Resolution: fixed
Priority: normal
Severity: feature
Fixed in version: 3.09.0
Category: ~DO NOT USE (was: OCaml general)
Bug description
Full_Name: Daniel Weil
Version: 3.07
OS: win32
Submission from: 81.80.88.226 (81.80.88.226)
Suppose you have the file "toto.ml" containing the data:
type 'a t = A of 'a | B
let f () = Toto.B
and the file "toto.mli" containing the data:
type 'a t = A of 'a | B
val f : unit -> 'a t
When I compile first the .ml file (with "ocaml -c toto.ml"), I get a scoping
error which is good.
But when i compile first the .mli and the the .ml (ocamlc -c toto.mli; ocamlc -c
toto.ml), I have a surprising typing error :
The implementation toto.ml does not match the interface toto.cmi:
Values do not match:
val f : unit -> 'a Toto.t
is not included in
val f : unit -> 'a t
I looks like a bug with separate compilation because it does not happen if i put
in a single file the module toto constrained by its signature.
The text was updated successfully, but these errors were encountered: