summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel de Rauglaudre <daniel.de_rauglaudre@inria.fr>2001-11-09 14:46:19 +0000
committerDaniel de Rauglaudre <daniel.de_rauglaudre@inria.fr>2001-11-09 14:46:19 +0000
commitdaad5a168ee5ccea386afacc62cddf3b7ea677aa (patch)
treefafb4f12b0ee54a2fca4a63ec063fc2f756672b5
parent8c11479ce0eeb4bc49e046ffcbebab12dbb218ee (diff)
downloadocaml-daad5a168ee5ccea386afacc62cddf3b7ea677aa.tar.gz
-
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4001 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r--camlp4/etc/pr_r.ml6
1 files changed, 5 insertions, 1 deletions
diff --git a/camlp4/etc/pr_r.ml b/camlp4/etc/pr_r.ml
index f57dd01ae4..00055b4d2b 100644
--- a/camlp4/etc/pr_r.ml
+++ b/camlp4/etc/pr_r.ml
@@ -1485,7 +1485,11 @@ pr_patt.pr_levels :=
`ctyp t [: `S RO ")"; k :] :]
| <:patt< ? $i$ : ($p$) >> ->
fun curr next _ k ->
- [: `S LO ("?"^ i ^ ":"); `S LO "("; `patt p [: `S RO ")"; k :] :]
+ match p with
+ [ <:patt< $lid:x$ >> when i = x -> [: `S LR ("?" ^ i); k :]
+ | _ ->
+ [: `S LO ("?"^ i ^ ":"); `S LO "("; `patt p [: `S RO ")";
+ k :] :] ]
| <:patt< ? $i$ : ($p$ : $t$ = $e$) >> ->
fun curr next _ k ->
[: `S LO ("?" ^ i ^ ":"); `S LO "("; `patt p [: `S LR ":" :];