Skip to content
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

Wrong error message about a signature mismatch #4001

Closed
vicuna opened this issue Apr 11, 2006 · 1 comment
Closed

Wrong error message about a signature mismatch #4001

vicuna opened this issue Apr 11, 2006 · 1 comment
Labels

Comments

@vicuna
Copy link

vicuna commented Apr 11, 2006

Original bug ID: 4001
Reporter: ertai
Status: closed (set by @garrigue on 2006-06-23T01:13:22Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 3.10+dev
Category: ~DO NOT USE (was: OCaml general)
Monitored by: ertai

Bug description

In a particular case, the OCaml compiler, reports that a module is not included in a signature whereas it knows nothing about this signature since it is inside another directory.

Example:

$ cat bug.sh
mkdir a
cd a
echo 'module type S = sig val i : int end' > a.ml
ocamlc -c a.ml
cd ..
echo 'module Make (M : A.S) : sig end' > b.mli
ocamlc -I a -c b.mli # Note the -I a
echo 'module C = B.Make (struct let i = 42 end)' > test.ml
ocamlc -c test.ml # Note that the -I a is missing

$ sh -x bug.sh

  • mkdir a
  • cd a
  • echo 'module type S = sig val i : int end'
  • ocamlc -c a.ml
  • cd ..
  • echo 'module Make (M : A.S) : sig end'
  • ocamlc -I a -c b.mli
  • echo 'module C = B.Make (struct let i = 42 end)'
  • ocamlc -c test.ml
    File "test.ml", line 1, characters 19-40:
    Signature mismatch:
    Modules do not match: sig val i : int end is not included in A.S

The compiler should says that it knows nothing about the A.S signature.

$ ocamlc -I a -c test.ml
Just works, but it's sometimes hard to discover...

@vicuna
Copy link
Author

vicuna commented Jun 23, 2006

Comment author: @garrigue

Fixed in CVS branch 3.09.
Report unbound module types.

@vicuna vicuna closed this as completed Jun 23, 2006
@vicuna vicuna added the bug label Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant