aboutsummaryrefslogtreecommitdiffhomepage
path: root/plugins/firstorder/sequent.ml
diff options
context:
space:
mode:
authorGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2014-03-01 18:26:26 +0100
committerGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2014-03-01 22:45:39 +0100
commit87b510e5b0f363724eae5db9f177f167a3586015 (patch)
tree204c7ad1e1ba38945ab58d74e28d8cf67201fe71 /plugins/firstorder/sequent.ml
parentbca756eaebf16b6145c65b53629219d2a0a8b1ba (diff)
Fixing pervasive comparisons
Diffstat (limited to 'plugins/firstorder/sequent.ml')
-rw-r--r--plugins/firstorder/sequent.ml14
1 files changed, 8 insertions, 6 deletions
diff --git a/plugins/firstorder/sequent.ml b/plugins/firstorder/sequent.ml
index 8b831d595..72bde18f4 100644
--- a/plugins/firstorder/sequent.ml
+++ b/plugins/firstorder/sequent.ml
@@ -67,12 +67,14 @@ module Hitem=
struct
type t = h_item
let compare (id1,co1) (id2,co2)=
- (Globnames.RefOrdered.compare
- =? (fun oc1 oc2 ->
- match oc1,oc2 with
- Some (m1,c1),Some (m2,c2) ->
- ((-) =? OrderedConstr.compare) m1 m2 c1 c2
- | _,_->Pervasives.compare oc1 oc2)) id1 id2 co1 co2
+ let c = Globnames.RefOrdered.compare id1 id2 in
+ if c = 0 then
+ let cmp (i1, c1) (i2, c2) =
+ let c = Int.compare i1 i2 in
+ if c = 0 then OrderedConstr.compare c1 c2 else c
+ in
+ Option.compare cmp co1 co2
+ else c
end
module CM=Map.Make(OrderedConstr)