diff options
| author | Gaëtan Gilbert | 2018-09-27 13:22:45 +0200 |
|---|---|---|
| committer | Gaëtan Gilbert | 2018-09-27 13:22:45 +0200 |
| commit | 49e9fe1c4666beda099872988144d12138dc6349 (patch) | |
| tree | 47eb811fc8547c6d7acde74e7832ef679e2cf90a /kernel | |
| parent | f10e10eeb2efd8f5d13fdb4619883f45aa834238 (diff) | |
| parent | 7d4d30ab00ded50e4c15c1b078044ea10dfb2fc1 (diff) | |
Merge PR #8475: Centralize the reliance on abstract universe context internals
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/univ.ml | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/kernel/univ.ml b/kernel/univ.ml index 747a901f45..61ad1d0a82 100644 --- a/kernel/univ.ml +++ b/kernel/univ.ml @@ -160,13 +160,6 @@ module Level = struct let compare u v = if u == v then 0 - else - let c = Int.compare (hash u) (hash v) in - if c == 0 then RawLevel.compare (data u) (data v) - else c - - let natural_compare u v = - if u == v then 0 else RawLevel.compare (data u) (data v) let to_string x = @@ -954,6 +947,8 @@ struct let repr (inst, cst) = (Array.mapi (fun i _l -> Level.var i) inst, cst) + let pr f ?variance ctx = pr f ?variance (repr ctx) + let instantiate inst (u, cst) = assert (Array.length u = Array.length inst); subst_instance_constraints inst cst @@ -1054,7 +1049,7 @@ struct (univs, cst) let sort_levels a = - Array.sort Level.natural_compare a; a + Array.sort Level.compare a; a let to_context (ctx, cst) = (Instance.of_array (sort_levels (Array.of_list (LSet.elements ctx))), cst) |
