Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006037OCaml~DO NOT USE (was: OCaml general)public2013-06-09 01:092015-12-11 19:19
Assigned Tofrisch 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusclosedResolutionwon't fix 
PlatformOSOS Version
Product Version4.01.0+dev 
Target VersionFixed in Version 
Summary0006037: a backward-compatible way of adding new syntactic construct
DescriptionI found that the trunk changed Pexp_open
----- old
 Pexp_open of Longident.t loc * expression
----- new
 Pexp_open of override_flag * Longident.t loc * expression

How about adding a new constructor instead
Pexp_open_bang of Longident.t loc * expression
The main benefit is to avoid unnecessary breaking other compiler dependent tools?

TagsNo tags attached.
Attached Files

- Relationships

-  Notes
frisch (developer)
2013-06-09 20:55

If we had followed this approach to make the Parsetree backward-compatible for previous evolutions of the Parsetree, we would have ended up already with a mess (many duplicated constructors, for no good conceptual reason). Not even mentioning the recent changes introduced with the "bin-annot" branch (which changes most constructors) and the forthcoming "extension_points" (idem). Tools which use directly the Parsetree or other internal modules of the compiler should be prepared for such changes.

For the specific case you cite, I see it as a good thing that tools matching on the Parsetree need to be adapted explicitly. The author of these tools need to decide whether the new form should also be recognized or not where previously the Pexp_open constructor was used. And adapting the code is rather trivial anyway.

- Issue History
Date Modified Username Field Change
2013-06-09 01:09 hongboz New Issue
2013-06-09 20:55 frisch Note Added: 0009449
2013-06-09 20:55 frisch Status new => resolved
2013-06-09 20:55 frisch Resolution open => won't fix
2013-06-09 20:55 frisch Assigned To => frisch
2015-12-11 19:19 xleroy Status resolved => closed
2017-02-23 16:36 doligez Category OCaml general => -OCaml general
2017-03-03 17:55 doligez Category -OCaml general => -(deprecated) general
2017-03-03 18:01 doligez Category -(deprecated) general => ~deprecated (was: OCaml general)
2017-03-06 17:04 doligez Category ~deprecated (was: OCaml general) => ~DO NOT USE (was: OCaml general)

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker