Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006464OCamlOCaml generalpublic2014-06-19 17:552014-07-16 10:32
Reporterwhitequark 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusacknowledgedResolutionopen 
PlatformOSOS Version
Product Version4.02.0+dev 
Target Versionafter-4.02.0Fixed in Version 
Summary0006464: -dsource prints uninterpreted syntax extensions incorrectly
DescriptionI.e. it prints

    &lwt let _ = raise Not_found

instead of

    let%lwt _ = raise Not_found

Seems to be a leftover from earlier syntax.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0011762)
lpw25 (developer)
2014-06-19 23:27

This appears to have been fixed by 0006377. It now prints:

    let _ = [%foo raise Not_found]

However, this raises an interesting issue about the automatic conversion of:

    let _ = ...

into a Pstr_eval. It means the extension node is in an unexpected place. For example, by naming the result `x` we instead get.

    [%%foo let x = raise Not_found]

More generally, this conversion is a bit unexpected and likely to cause mistakes in peoples AST transformers (-ppx).

Does anybody know why this conversion is done?

- Issue History
Date Modified Username Field Change
2014-06-19 17:55 whitequark New Issue
2014-06-19 23:27 lpw25 Note Added: 0011762
2014-07-16 10:32 doligez Status new => acknowledged
2014-07-16 10:32 doligez Product Version => 4.02.0+dev
2014-07-16 10:32 doligez Target Version => after-4.02.0


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker