Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0003819OCamlOCaml generalpublic2005-10-24 04:292015-02-18 14:00
Reporteradministrator 
Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
StatusacknowledgedResolutionopen 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0003819: Feature Request: Error message for 'Illegal permutation of structure fields'
DescriptionFull_Name: Ethan Aubin
Version: 3.08.4
OS: linux
Submission from: c-24-60-21-144.hsd1.ma.comcast.net (24.60.21.144)


I came across an error saying 'Illegal permutation of structure fields'. The
modules I'm working with are have interfaces 0001607:0000150 lines and its hard to figure
out whats in the wrong spot. Could the message print an which fields are
conflicting (omitting the rest)? Thanks -EA

TagsNo tags attached.
Attached Files? file icon order.ml [^] (375 bytes) 2015-02-18 13:59 [Show Content]
? file icon order.mli [^] (169 bytes) 2015-02-18 13:59 [Show Content]
? file icon order_m.ml [^] (225 bytes) 2015-02-18 14:00 [Show Content]
? file icon order_m.mli [^] (122 bytes) 2015-02-18 14:00 [Show Content]

- Relationships

-  Notes
(0013304)
guesdon (manager)
2015-02-18 08:14

Ping.
(0013305)
gasche (developer)
2015-02-18 10:24

Would someone feel motivated to provide a small representative program that displays this warning?
(0013306)
yallop (developer)
2015-02-18 13:51

Here's an example. The problem boils down to incompatibility between module type members when checking signature inclusion compatibility:

   # module F (X : sig module type T = sig val x : int val y : int end end) =
              (X : sig module type T = sig val y : int val x : int end end);;
     Characters 85-86:
                (X : sig module type T = sig val y : int val x : int end end);;
                 ^
   Error: Signature mismatch:
          Modules do not match:
            sig module type T = sig val x : int val y : int end end
          is not included in
            sig module type T = sig val y : int val x : int end end
          Module type declarations do not match:
            module type T = sig val x : int val y : int end
          does not match
            module type T = sig val y : int val x : int end
          At position module type T = <here>
          Illegal permutation of structure fields
(0013307)
guesdon (manager)
2015-02-18 13:59

Here are four files.
When compiling order.mli and order.ml, the error message:

File "order.ml", line 1:
Error: The implementation order.ml does not match the interface order.cmi:
       ...
       At position module type M = <here>
       Illegal permutation of structure fields

When compiling order_m.mli and order_m.ml:
File "order_m.ml", line 1:
Error: The implementation order_m.ml
       does not match the interface order_m.cmi:
       Module type declarations do not match:
         module type M =
           sig
             module T : sig type t = string end
             module T2 : sig val foo : int -> string end
           end
       does not match
         module type M =
           sig
             module T2 : sig val foo : int -> string end
             module T : sig type t = string end
           end
       At position module type M = <here>
       Illegal permutation of structure fields

- Issue History
Date Modified Username Field Change
2005-11-18 10:14 administrator New Issue
2005-12-15 14:37 doligez Severity minor => feature
2005-12-15 14:37 doligez Description Updated
2015-02-18 08:14 guesdon Note Added: 0013304
2015-02-18 10:24 gasche Note Added: 0013305
2015-02-18 13:51 yallop Note Added: 0013306
2015-02-18 13:59 guesdon Note Added: 0013307
2015-02-18 13:59 guesdon File Added: order.ml
2015-02-18 13:59 guesdon File Added: order.mli
2015-02-18 14:00 guesdon File Added: order_m.ml
2015-02-18 14:00 guesdon File Added: order_m.mli


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker