From 44ecd58e9ab5fb0f2c45e9eec76440f84995825c Mon Sep 17 00:00:00 2001 From: Gaƫtan Gilbert Date: Wed, 10 Oct 2018 14:20:51 +0200 Subject: {Univops -> Vars}.universes_of_constr It's basically an occur check so it makes sense to put it in vars --- kernel/typeops.ml | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'kernel/typeops.ml') diff --git a/kernel/typeops.ml b/kernel/typeops.ml index 7456ecea56..164a47dd9a 100644 --- a/kernel/typeops.ml +++ b/kernel/typeops.ml @@ -432,21 +432,8 @@ and execute_array env = Array.map (execute env) (* Derived functions *) -let universe_levels_of_constr _env c = - let rec aux s c = - match kind c with - | Const (_c, u) -> - LSet.fold LSet.add (Instance.levels u) s - | Ind ((_mind,_), u) | Construct (((_mind,_),_), u) -> - LSet.fold LSet.add (Instance.levels u) s - | Sort u when not (Sorts.is_small u) -> - let u = Sorts.univ_of_sort u in - LSet.fold LSet.add (Universe.levels u) s - | _ -> Constr.fold aux s c - in aux LSet.empty c - let check_wellformed_universes env c = - let univs = universe_levels_of_constr env c in + let univs = universes_of_constr c in try UGraph.check_declared_universes (universes env) univs with UGraph.UndeclaredLevel u -> error_undeclared_universe env u -- cgit v1.2.3