Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004838OCamlOCaml generalpublic2009-07-20 12:582012-06-01 10:10
Reporteryallop 
Assigned Togarrigue 
PrioritynormalSeverityfeatureReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version3.11.1 
Target VersionFixed in Version4.00.0+dev 
Summary0004838: Treat let-module expressions as non-expansive where possible
DescriptionExpressions of the form

   let module M = <module-expr> in e

are currently always treated as expansive by the type checker. As a result, in the following declaration "id" is given a non-polymorphic type:

   let id = let module M = struct end in fun x -> x

(There are, of course, useful examples as well, particularly where the module expression declares types.)

It seems that many such expressions (including all those where the module-expr is built from non-expansive terms) could be safely treated as non-expansive, increasing the number of typeable programs.
Additional InformationPatch against 3.11.1 attached.
TagsNo tags attached.
Attached Filespatch file icon let_module_expansivity.patch [^] (1,432 bytes) 2009-07-20 12:58 [Show Content]

- Relationships
related to 0004511closedgarrigue Local modules remove polymorphism. 

-  Notes
(0007494)
garrigue (manager)
2012-06-01 09:24
edited on: 2012-06-01 10:10

Fixed in trunk and 4.00, revisions 12535, 12536.
The code was already there for first-class modules.


- Issue History
Date Modified Username Field Change
2009-07-20 12:58 yallop New Issue
2009-07-20 12:58 yallop File Added: let_module_expansivity.patch
2009-08-25 15:23 xclerc Relationship added related to 0004511
2011-05-31 16:22 doligez Status new => acknowledged
2012-06-01 09:24 garrigue Note Added: 0007494
2012-06-01 09:24 garrigue Status acknowledged => closed
2012-06-01 09:24 garrigue Assigned To => garrigue
2012-06-01 09:24 garrigue Resolution open => fixed
2012-06-01 09:24 garrigue Fixed in Version => 3.12.0
2012-06-01 10:10 garrigue Fixed in Version 3.12.0 => 4.00.0+dev
2012-06-01 10:10 garrigue Note Edited: 0007494 View Revisions


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker