Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004570OCamlOCaml generalpublic2008-06-26 22:192012-08-06 18:26
Reporteryallop 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusacknowledgedResolutionopen 
PlatformOSOS Version
Product Version3.10.2 
Target Version4.01.0+devFixed in Version 
Summary0004570: Confusing type error message with recursive modules
DescriptionThe following (wrong) code

  module rec M : sig type 'a s = 'a N.t end =
              struct type 'a s = 'a N.t end
         and N : sig type 'a t end =
              struct type t end

gives rise to the following confusing error message:

                 struct type 'a s = 'a N.t end
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   Signature mismatch:
   Modules do not match:
     sig type 'a s = 'a N.t end
   is not included in
     sig type 'a s = 'a N.t end
   Type declarations do not match:
     type 'a s = 'a N.t
   is not included in
     type 'a s = 'a N.t
 
It'd be less surprising if the mismatch between the number of type parameters in the structure and signature declarations of N.t were reported instead.
Tagsrecmod
Attached Files

- Relationships

-  Notes
(0004596)
doligez (manager)
2008-09-04 17:02

Strange, 3.10.0 gave a much better error message.
(0007913)
xleroy (administrator)
2012-08-06 18:24

I've been sleeping on these PR for too long, and still have no idea how to address them. Unassigning them from myself.

- Issue History
Date Modified Username Field Change
2008-06-26 22:19 yallop New Issue
2008-09-04 16:48 doligez Assigned To => xleroy
2008-09-04 16:48 doligez Status new => acknowledged
2008-09-04 17:02 doligez Note Added: 0004596
2012-07-11 15:50 doligez Target Version => 4.01.0+dev
2012-07-29 18:02 frisch Tag Attached: recmod
2012-07-31 13:36 doligez Target Version 4.01.0+dev => 4.00.1+dev
2012-08-06 18:22 xleroy Target Version 4.00.1+dev => 4.01.0+dev
2012-08-06 18:24 xleroy Note Added: 0007913
2012-08-06 18:26 xleroy Assigned To xleroy =>


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker