|Anonymous | Login | Signup for a new account||2017-09-25 19:08 CEST|
|Main | My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0004993||OCaml||typing||public||2010-03-05 01:15||2017-03-10 09:43|
|Target Version||later||Fixed in Version|
|Summary||0004993: A program using recursive modules doesn't compile since 3.10|
|Description||The 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
|Attached Files||mixmod2.ml [^] (4,253 bytes) 2010-03-05 01:15 [Show Content]|
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.
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).
|Jacques, can this issue be closed?|
|I'd prefer to keep it: ideally this should work some day.|
|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|
|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|