summaryrefslogtreecommitdiff
path: root/plugins/micromega
diff options
context:
space:
mode:
authorGravatar Stephane Glondu <steph@glondu.net>2012-06-04 12:07:52 +0200
committerGravatar Stephane Glondu <steph@glondu.net>2012-06-04 12:07:52 +0200
commit61dc740ed1c3780cccaec00d059a28f0d31d0052 (patch)
treed88d05baf35b9b09a034233300f35a694f9fa6c2 /plugins/micromega
parent97fefe1fcca363a1317e066e7f4b99b9c1e9987b (diff)
Imported Upstream version 8.4~gamma0+really8.4beta2upstream/8.4_gamma0+really8.4beta2
Diffstat (limited to 'plugins/micromega')
-rw-r--r--plugins/micromega/coq_micromega.ml19
1 files changed, 14 insertions, 5 deletions
diff --git a/plugins/micromega/coq_micromega.ml b/plugins/micromega/coq_micromega.ml
index 1ad49bb8..8b7ee55b 100644
--- a/plugins/micromega/coq_micromega.ml
+++ b/plugins/micromega/coq_micromega.ml
@@ -895,7 +895,9 @@ struct
let parse_expr parse_constant parse_exp ops_spec env term =
if debug
then (Pp.pp (Pp.str "parse_expr: ");
- Pp.pp_flush ();Pp.pp (Printer.prterm term); Pp.pp_flush ());
+ Pp.pp (Printer.prterm term);
+ Pp.pp (Pp.str "\n");
+ Pp.pp_flush ());
(*
let constant_or_variable env term =
@@ -991,8 +993,12 @@ struct
else raise ParseError
| App(op,args) ->
begin
- try
- (assoc_const op rconst_assoc) (rconstant args.(0)) (rconstant args.(1))
+ try
+ (* the evaluation order is important in the following *)
+ let f = assoc_const op rconst_assoc in
+ let a = rconstant args.(0) in
+ let b = rconstant args.(1) in
+ f a b
with
ParseError ->
match op with
@@ -1009,10 +1015,12 @@ struct
if debug
then (Pp.pp_flush ();
Pp.pp (Pp.str "rconstant: ");
- Pp.pp (Printer.prterm term); Pp.pp_flush ());
+ Pp.pp (Printer.prterm term);
+ Pp.pp (Pp.str "\n");
+ Pp.pp_flush ());
let res = rconstant term in
if debug then
- (Printf.printf "rconstant -> %a" pp_Rcst res ; flush stdout) ;
+ (Printf.printf "rconstant -> %a\n" pp_Rcst res ; flush stdout) ;
res
@@ -1052,6 +1060,7 @@ struct
then (Pp.pp_flush ();
Pp.pp (Pp.str "parse_arith: ");
Pp.pp (Printer.prterm cstr);
+ Pp.pp (Pp.str "\n");
Pp.pp_flush ());
match kind_of_term cstr with
| App(op,args) ->