Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005006OCamlOCaml typingpublic2010-03-22 14:092014-05-25 20:20
Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
PlatformOSOS Version
Product Version 
Target Version4.02.0+devFixed in Version 
Summary0005006: Typing problem with recursive modules
DescriptionThe following is rejected:

module rec X : sig
  type t
  module type S = sig val x: t end
end = struct
  type t
  module type S = X.S

Same for "val x: X.t" instead of "val x: t".

But if we replace X.S with "sig include X.S end", then it works fine.

Is it the expected behavior?

Are there cases where replacing a reference to a signature S by "sig include S end" breaks code?
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
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.
frisch (developer)
2012-08-06 22:54

Xavier: do you have an opinion about the "S -> sig include S end" rewriting? Do you understand why it makes this code type-checks? Could this be applied systematically, or could it break something?

- Issue History
Date Modified Username Field Change
2010-03-22 14:09 frisch New Issue
2010-05-28 17:24 frisch Status new => assigned
2010-05-28 17:24 frisch Assigned To => xleroy
2012-06-20 11:15 frisch Category OCaml general => OCaml typing
2012-07-10 20:30 doligez Target Version => 4.01.0+dev
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: 0007908
2012-08-06 18:27 xleroy Assigned To xleroy =>
2012-08-06 18:27 xleroy Status assigned => acknowledged
2012-08-06 22:54 frisch Note Added: 0007923
2013-07-29 15:32 doligez Target Version 4.01.0+dev => 4.01.1+dev
2014-05-25 20:20 doligez Target Version 4.01.1+dev => 4.02.0+dev

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker