Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005997OCamlOCaml typingpublic2013-04-22 16:232013-04-23 02:05
Reportergasche 
Assigned Togarrigue 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version4.01.0+dev 
Target VersionFixed in Version4.00.2+dev 
Summary0005997: Non-compatibility assumed between concrete types with same constructor
Descriptiontype (_, _) comp =
  | Eq : ('a, 'a) comp
  | Diff : ('a, 'b) comp

module U = struct type t = T end

module M : sig
  type t = T
  val comp : (U.t, t) comp
end = struct
  include U
  let comp = Eq
end

# match M.comp with | Diff -> false;;
- : bool = false


I checked this example against both the trunk (in particular after the recent "incompatibility check" fixes) and the non-vanishing branch.
TagsNo tags attached.
Attached Files

- Relationships
related to 0005989resolvedgarrigue Assumed inequalities involving private rows 
child of 0005998assignedgarrigue GADT typing and exhaustiveness bugs 

-  Notes
(0009188)
garrigue (manager)
2013-04-23 02:03

Fix in trunk and 4.00, commits 13586 and 13587.

This was a particularly stupid bug:
constructors were compared by id rather than by name, and as a result independent copies of the same definition were all incompatible.
Also fixed the same problem for records.

- Issue History
Date Modified Username Field Change
2013-04-22 16:23 gasche New Issue
2013-04-22 16:24 gasche Relationship added related to 0005989
2013-04-23 02:03 garrigue Note Added: 0009188
2013-04-23 02:03 garrigue Status new => resolved
2013-04-23 02:03 garrigue Fixed in Version => 4.00.2+dev
2013-04-23 02:03 garrigue Resolution open => fixed
2013-04-23 02:03 garrigue Assigned To => garrigue
2013-04-23 02:05 garrigue Relationship added child of 0005998


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker