summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlain Frisch <alain@frisch.fr>2013-06-17 08:53:03 +0000
committerAlain Frisch <alain@frisch.fr>2013-06-17 08:53:03 +0000
commit9d3592791cde79cee4a77e3a0b8aca0e828f7ff1 (patch)
tree770d4f6bc44e3f89b5c379ef6d7f3d0541f0dbe9
parentd53e2b57b26b2d49d32f3ea65ab6248532488662 (diff)
Fix #5811 as suggested. (Merge 13792 from 4.01.)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13793 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r--Changes2
-rw-r--r--tools/untypeast.ml1
2 files changed, 3 insertions, 0 deletions
diff --git a/Changes b/Changes
index 8caf9c47e..e4d82539a 100644
--- a/Changes
+++ b/Changes
@@ -103,6 +103,8 @@ Bug fixes:
- PR#5805: Assert failure with warning 34 on pre-processed file
- PR#5806: ensure that backtrace tests are always run (testsuite)
- PR#5810: error in switch printing when using -dclambda
+- PR#5811: Untypeast produces singleton tuples for constructor patterns
+ with only one argument
- PR#5813: GC not called when unmarshaling repeatedly in a tight loop (ocamlopt)
- PR#5815: Multiple exceptions in signatures gives an error
- PR#5819: segfault when using [with] on large recursive record (ocamlopt)
diff --git a/tools/untypeast.ml b/tools/untypeast.ml
index a0b1a2c1e..e1719d903 100644
--- a/tools/untypeast.ml
+++ b/tools/untypeast.ml
@@ -153,6 +153,7 @@ and untype_pattern pat =
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; }