diff options
author | Matthieu Sozeau <mattam@mattam.org> | 2016-11-18 13:24:39 +0100 |
---|---|---|
committer | Matthieu Sozeau <mattam@mattam.org> | 2016-11-30 11:29:02 +0100 |
commit | 17559d528cf7ff92a089d1b966c500424ba45099 (patch) | |
tree | 8be685df69598c0edb3d86771e7948a9d9300e11 /kernel/univ.ml | |
parent | 3e6fa1cbdc0ec145728089000595b6ea29f37a4c (diff) |
Slightly more efficient [Univ.super] implem
Diffstat (limited to 'kernel/univ.ml')
-rw-r--r-- | kernel/univ.ml | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/kernel/univ.ml b/kernel/univ.ml index 9224ec48d..c863fac0e 100644 --- a/kernel/univ.ml +++ b/kernel/univ.ml @@ -471,12 +471,17 @@ struct let super (u,n as x) (v,n' as y) = let cmp = Level.compare u v in - if Int.equal cmp 0 then - if n < n' then Inl true - else Inl false - else if is_prop x then Inl true - else if is_prop y then Inl false - else Inr cmp + if Int.equal cmp 0 then Inl (n < n') + else + match x, y with + | (l,0), (l',0) -> + let open RawLevel in + (match Level.data l, Level.data l' with + | Prop, Prop -> Inl false + | Prop, _ -> Inl true + | _, Prop -> Inl false + | _, _ -> Inr cmp) + | _, _ -> Inr cmp let to_string (v, n) = if Int.equal n 0 then Level.to_string v |