Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004993OCamltypingpublic2010-03-05 01:152017-03-10 09:43
Assigned Togarrigue 
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.
Attached Files? file icon [^] (4,253 bytes) 2010-03-05 01:15 [Show Content]

- Relationships

-  Notes
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.
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).
shinwell (developer)
2016-12-07 14:15

Jacques, can this issue be closed?
garrigue (manager)
2016-12-08 08:32

I'd prefer to keep it: ideally this should work some day.

- Issue History
Date Modified Username Field Change
2010-03-05 01:15 garrigue New Issue
2010-03-05 01:15 garrigue File Added:
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
2016-12-07 14:15 shinwell Assigned To => garrigue
2016-12-07 14:15 shinwell Status acknowledged => assigned
2016-12-07 14:15 shinwell Note Added: 0016705
2016-12-08 08:32 garrigue Note Added: 0016812
2017-02-23 16:36 doligez Category OCaml general => -OCaml general
2017-02-27 14:24 doligez Category -OCaml general => typing
2017-03-10 09:43 shinwell Severity minor => feature

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker