Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007859OCamltypingpublic2018-10-07 12:592018-10-10 14:49
Assigned To 
PlatformOSOS Version
Product Version4.07.1 
Target VersionFixed in Version 
Summary0007859: Imprecise error location when a submodule does not implement its signature
DescriptionThe location (and the message) for type errors regarding module not implementing a required signature is sometimes not very helpful. For instance when the signature is defined in an other module, the error message points to that other module instead of the implementation:

$ cat foo.mli
val x: int

module X: Map.OrderedType
$ cat
let x = 2

module X = struct end
$ ocamlc -c foo.mli
File "", line 1:
Error: The implementation does not match the interface foo.cmi:
       In module X:
       Modules do not match: sig end is not included in Map.OrderedType
       In module X:
       The value `compare' is required but not provided
       File "map.mli", line 51, characters 4-31: Expected declaration
       In module X:
       The type `t' is required but not provided
       File "map.mli", line 48, characters 4-10: Expected declaration

The error message refers to `map.mli` which is not helpful here. No error message points me to the actual module X in the file which needs to be corrected.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
samoht (reporter)
2018-10-07 13:29

(I have assigned the wrong Category to that issue but it seems that I cannot edit it... sorry about this)
frisch (developer)
2018-10-10 14:49

(Moved to the "typing" category.)

- Issue History
Date Modified Username Field Change
2018-10-07 12:59 samoht New Issue
2018-10-07 13:29 samoht Note Added: 0019403
2018-10-10 14:49 frisch Category middle end (typedtree to clambda) => typing
2018-10-10 14:49 frisch Note Added: 0019411

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker