From 4c28e0597067d81f5ee7e8b2b2e668f4d45e973f Mon Sep 17 00:00:00 2001 From: Pierre-Marie Pédrot Date: Wed, 12 Sep 2018 11:42:32 +0200 Subject: Fix printing of abstract universe contexts. Due to their representation using names, the instance was not properly displayed. --- kernel/univ.ml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'kernel') diff --git a/kernel/univ.ml b/kernel/univ.ml index 311477daca..8acbeb2d25 100644 --- a/kernel/univ.ml +++ b/kernel/univ.ml @@ -954,6 +954,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 -- cgit v1.2.3 From 7d4d30ab00ded50e4c15c1b078044ea10dfb2fc1 Mon Sep 17 00:00:00 2001 From: Gaëtan Gilbert Date: Wed, 19 Sep 2018 23:07:00 +0200 Subject: Remove hash based univ level compare --- kernel/univ.ml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'kernel') diff --git a/kernel/univ.ml b/kernel/univ.ml index 8acbeb2d25..3e1f8f2cab 100644 --- a/kernel/univ.ml +++ b/kernel/univ.ml @@ -159,13 +159,6 @@ module Level = struct | _ -> false 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) @@ -1056,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) -- cgit v1.2.3