Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004478OCaml~DO NOT USE (was: OCaml general)public2008-01-13 17:432010-05-21 05:38
Assigned Togarrigue 
PlatformOSOS Version
Product Version3.09.3 
Target VersionFixed in Version3.12.0+dev 
Summary0004478: Type error message when constructors are mis-ordered could be clearer

type t = A | B


type t = B | A

Running ocamlc -c t.mli correctly reports that...
The implementation does not match the interface t.cmi:
Type declarations do not match:
  type t = B | A
is not included in
  type t = A | B

However, the mismatch is only because the constructors are misordered. This is a slightly cryptic error unless you know about the internals of OCaml - perhaps in this instance, ocamlc could note that the types would be compatible if the constructors were in the same order?
Additional InformationI was being daft here and wrote an mli file with my brain switched off. Although I know from writing C stubs that the constructors must obviously be in the same order for the types to be the same, it took quite me some time to realise my stupidity because the type I was dealing with was much longer. The additional warning would be most useful!

I presume 3.10.1 behaves the same way...
TagsNo tags attached.
Attached Files

- Relationships
related to 0004819closedgarrigue Type error on record declarations too hard to read 

-  Notes
garrigue (manager)
2010-05-21 05:38

Error messages concerning type declaration mismatches have been greatly improved for 3.12.

- Issue History
Date Modified Username Field Change
2008-01-13 17:43 dra New Issue
2008-01-18 15:37 doligez Status new => acknowledged
2010-04-30 07:25 garrigue Status acknowledged => assigned
2010-04-30 07:25 garrigue Assigned To => garrigue
2010-05-21 05:38 garrigue Note Added: 0005480
2010-05-21 05:38 garrigue Status assigned => closed
2010-05-21 05:38 garrigue Resolution open => fixed
2010-05-21 05:38 garrigue Fixed in Version => 3.12.0+dev
2010-05-21 05:51 garrigue Relationship added related to 0004819
2017-02-23 16:36 doligez Category OCaml general => -OCaml general
2017-03-03 17:55 doligez Category -OCaml general => -(deprecated) general
2017-03-03 18:01 doligez Category -(deprecated) general => ~deprecated (was: OCaml general)
2017-03-06 17:04 doligez Category ~deprecated (was: OCaml general) => ~DO NOT USE (was: OCaml general)

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker