aboutsummaryrefslogtreecommitdiff
path: root/plugins/firstorder
diff options
context:
space:
mode:
authorregisgia2012-09-14 09:52:38 +0000
committerregisgia2012-09-14 09:52:38 +0000
commit18ebb3f525a965358d96eab7df493450009517b5 (patch)
tree8a2488055203831506010a00bb1ac0bb6fc93750 /plugins/firstorder
parent338608a73bc059670eb8196788c45a37419a3e4d (diff)
The new ocaml compiler (4.00) has a lot of very cool warnings,
especially about unused definitions, unused opens and unused rec flags. The following patch uses information gathered using these warnings to clean Coq source tree. In this patch, I focused on warnings whose fix are very unlikely to introduce bugs. (a) "unused rec flags". They cannot change the semantics of the program but only allow the inliner to do a better job. (b) "unused type definitions". I only removed type definitions that were given to functors that do not require them. Some type definitions were used as documentation to obtain better error messages, but were not ascribed to any definition. I superficially mentioned them in one arbitrary chosen definition to remove the warning. This is unaesthetic but I did not find a better way. (c) "unused for loop index". The following idiom of imperative programming is used at several places: "for i = 1 to n do that_side_effect () done". I replaced "i" with "_i" to remove the warning... but, there is a combinator named "Util.repeat" that would only cost us a function call while improving readibility. Should'nt we use it? git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@15797 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'plugins/firstorder')
-rw-r--r--plugins/firstorder/formula.ml2
-rw-r--r--plugins/firstorder/sequent.ml2
2 files changed, 2 insertions, 2 deletions
diff --git a/plugins/firstorder/formula.ml b/plugins/firstorder/formula.ml
index 8680b5756c..5cc7f61d97 100644
--- a/plugins/firstorder/formula.ml
+++ b/plugins/firstorder/formula.ml
@@ -77,7 +77,7 @@ type kind_of_formula=
| Forall of constr*constr
| Atom of constr
-let rec kind_of_formula gl term =
+let kind_of_formula gl term =
let normalize=special_nf gl in
let cciterm=special_whd gl term in
match match_with_imp_term cciterm with
diff --git a/plugins/firstorder/sequent.ml b/plugins/firstorder/sequent.ml
index c6ec43e7a2..7e6f65eaa3 100644
--- a/plugins/firstorder/sequent.ml
+++ b/plugins/firstorder/sequent.ml
@@ -124,7 +124,7 @@ let lookup item seq=
| Some ((m2,t2) as c2)->id=id2 && m2>m && more_general c2 c in
History.exists p seq.history
-let rec add_formula side nam t seq gl=
+let add_formula side nam t seq gl=
match build_formula side nam t gl seq.cnt with
Left f->
begin