| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] |
| ID | Project | Category | View Status | Date Submitted | Last Update |
| 0005811 | OCaml | Misc | public | 2012-11-06 12:48 | 2013-01-03 17:08 |
|
| Reporter | turpin | |
| Assigned To | | |
| Priority | low | Severity | minor | Reproducibility | always |
| Status | acknowledged | Resolution | open | |
| Platform | | OS | | OS Version | |
| Product Version | 4.00.1 | |
| Target Version | 4.00.2+dev | Fixed in Version | | |
|
| Summary | 0005811: Untypeast produces singleton tuples for constructor patterns with only one argument |
| Description | This can only be seen on the ast (unparsing does not show the generated tuple). I have attached the patch (trivial) |
| Tags | No tags attached. |
|
| Attached Files | untypeast.patch [^] (439 bytes) 2012-11-06 12:48 [Show Content] [Hide Content]--- /home/tifn/ocaml-4.00.1/tools/untypeast.ml 2012-09-27 18:48:43.000000000 +0200
+++ untypeast.ml 2012-11-06 13:35:16.000000000 +0100
@@ -154,6 +154,7 @@
Ppat_construct (lid,
(match args with
[] -> None
+ | [arg] -> Some (untype_pattern arg)
| args -> Some
{ ppat_desc = Ppat_tuple (List.map untype_pattern args);
ppat_loc = pat.pat_loc; }
|
|