Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005729OCamlOCaml tools (ocaml{lex,yacc,dep,browser,debug})public2012-08-16 09:142012-11-06 13:42
Reporterfuruse 
Assigned Tolefessan 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version4.00.0 
Target Version4.00.1+devFixed in Version4.00.1+dev 
Summary0005729: tools/untypeast.ml creates unary Pexp_tuple
DescriptionThere is a bug of `untyping' unary variant constructor, which creates unary tuple Parsetree node, which never appear in legal OCaml programs AFAIK.

This is found when I wrote a modified ocamlc which tries to retype once typed source code using Untypeast.
Additional Information*** ../../ocaml/ocaml-custom/tools/untypeast.ml Thu Aug 16 15:11:41 2012
--- untypeast.ml Thu Aug 16 15:11:16 2012
***************
This simple patch fix the problem:

*** 225,230 ****
--- 225,231 ----
          Pexp_construct (lid,
            (match args with
                [] -> None
+ | [arg] -> Some (untype_expression arg)
              | args -> Some
                    { pexp_desc = Pexp_tuple (List.map untype_expression args);
                    pexp_loc = exp.exp_loc; }
TagsNo tags attached.
Attached Files

- Relationships
related to 0005811resolvedfrisch Untypeast produces singleton tuples for constructor patterns with only one argument 

-  Notes
(0008174)
lefessan (developer)
2012-09-27 18:50

Fixed in commit 12966.

- Issue History
Date Modified Username Field Change
2012-08-16 09:14 furuse New Issue
2012-09-06 16:43 doligez Target Version => 4.00.1+dev
2012-09-27 18:50 lefessan Note Added: 0008174
2012-09-27 18:50 lefessan Status new => resolved
2012-09-27 18:50 lefessan Fixed in Version => 4.00.1+dev
2012-09-27 18:50 lefessan Resolution open => fixed
2012-09-27 18:50 lefessan Assigned To => lefessan
2012-11-06 13:42 gasche Relationship added related to 0005811
2013-08-19 15:58 doligez Category OCaml tools (ocaml{lex,yacc,dep,browser}) => OCaml tools (ocaml{lex,yacc,dep,browser,debug})


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker