Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004993OCamlOCaml generalpublic2010-03-05 01:152012-09-17 17:50
Reportergarrigue 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusacknowledgedResolutionopen 
PlatformOSOS Version
Product Version3.11.2 
Target VersionlaterFixed in Version 
Summary0004993: A program using recursive modules doesn't compile since 3.10
DescriptionThe attached program did compile with ocaml 3.09.3,
but doesn't compile with all versions since 3.10.0.

Note that other versions of the same program using
polymorphic variants (and avoiding conversions) do
still work.
Tagsrecmod
Attached Files? file icon mixmod2.ml [^] (4,253 bytes) 2010-03-05 01:15 [Show Content]

- Relationships

-  Notes
(0005419)
garrigue (manager)
2010-04-30 05:13

I should have mentioned that this program is particularly important, as it demonstrated the
power of ocaml recursive modules by encoding the expression problem without using
polymorphic variants. This was presented at IFIP WG2.8 in 2005.
So this is is kind of unfortunate that this doesn't work anymore.
On the other hand, I understand that recursive modules were not a finished feature at that time,
so maybe I was just lucky.
(0005445)
xleroy (administrator)
2010-05-04 15:24

Jacques, I know this code is dear to your heart :-) The typechecking of recursive modules was unsound in 3.09, and what I think are the correct typing rules could not be implemented because they give rise to cycles of type abbreviations that cause the typechecker to loop. So, what's implemented today is a conservative approximation, and I'm not surprised it rejects some useful codes. At any rate, I learnt one thing the hard way: recursive modules will never be 100% right until the type-checker is resistant to cyclic abbreviations (treating them as abstract types instead of stupidly looping).

- Issue History
Date Modified Username Field Change
2010-03-05 01:15 garrigue New Issue
2010-03-05 01:15 garrigue File Added: mixmod2.ml
2010-04-30 05:13 garrigue Note Added: 0005419
2010-05-04 15:24 xleroy Note Added: 0005445
2010-05-04 15:24 xleroy Status new => acknowledged
2012-07-11 11:55 doligez Target Version => 4.01.0+dev
2012-07-31 13:36 doligez Target Version 4.01.0+dev => 4.00.1+dev
2012-09-17 17:49 doligez Tag Attached: recmod
2012-09-17 17:50 doligez Target Version 4.00.1+dev => later


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker