Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004570OCaml-OCaml generalpublic2008-06-26 22:192015-12-11 19:21
Assigned To 
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.
Attached Files

- Relationships

-  Notes
doligez (administrator)
2008-09-04 17:02

Strange, 3.10.0 gave a much better error message.
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.
doligez (administrator)
2013-07-29 15:27

Looks like this has been fixed at some point in the past:

  Error: Signature mismatch:
       Modules do not match:
         sig type t = N.t end
       is not included in
         sig type 'a t end
       Type declarations do not match:
         type t = N.t
       is not included in
         type 'a t
       They have different arities.

- 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 =>
2013-07-29 15:27 doligez Note Added: 0009983
2013-07-29 15:27 doligez Status acknowledged => resolved
2013-07-29 15:27 doligez Resolution open => fixed
2015-12-11 19:21 xleroy Status resolved => closed
2017-02-23 16:36 doligez Category OCaml general => -OCaml general

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker