summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamien Doligez <damien.doligez-inria.fr>2003-03-12 16:33:38 +0000
committerDamien Doligez <damien.doligez-inria.fr>2003-03-12 16:33:38 +0000
commitded35d5bcef7c6ec3196bba7eaef39ae5bf7a921 (patch)
treefd4dbd0b30555522dffe336b3a2672b62cb74758
parentd98aa4b06d0a76e57fe37c025b2b7795a616882f (diff)
PR#1584
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5432 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r--parsing/parser.mly6
1 files changed, 3 insertions, 3 deletions
diff --git a/parsing/parser.mly b/parsing/parser.mly
index b2d480c30..4b4b08cae 100644
--- a/parsing/parser.mly
+++ b/parsing/parser.mly
@@ -72,10 +72,10 @@ let neg_float_string f =
else "-" ^ f
let mkuminus name arg =
- match arg.pexp_desc with
- Pexp_constant(Const_int n) ->
+ match name, arg.pexp_desc with
+ | "-", Pexp_constant(Const_int n) ->
mkexp(Pexp_constant(Const_int(-n)))
- | Pexp_constant(Const_float f) ->
+ | _, Pexp_constant(Const_float f) ->
mkexp(Pexp_constant(Const_float(neg_float_string f)))
| _ ->
mkexp(Pexp_apply(mkoperator ("~" ^ name) 1, ["", arg]))