aboutsummaryrefslogtreecommitdiffhomepage
path: root/kernel/nativecode.ml
diff options
context:
space:
mode:
authorGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2017-07-07 16:33:47 +0200
committerGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2017-07-11 14:50:47 +0200
commit0d9a91113c4112eece0680e433f435fdfb39ea4b (patch)
treecf90d290a92c02a2297b3a13b77190db9aa4db70 /kernel/nativecode.ml
parentb5ad6a80107f196fa8ffcc4f5dff58bea8c4f70e (diff)
Getting rid of simple calls to AUContext.instance.
This function breaks the abstraction barrier of abstract universe contexts, as it provides a way to observe the bound names of such a context. We remove all the uses that can be easily get rid of with the current API.
Diffstat (limited to 'kernel/nativecode.ml')
-rw-r--r--kernel/nativecode.ml10
1 files changed, 5 insertions, 5 deletions
diff --git a/kernel/nativecode.ml b/kernel/nativecode.ml
index 1acede729..9d7262206 100644
--- a/kernel/nativecode.ml
+++ b/kernel/nativecode.ml
@@ -1861,10 +1861,10 @@ and compile_named env sigma univ auxdefs id =
let compile_constant env sigma prefix ~interactive con cb =
match cb.const_proj with
| None ->
- let u =
+ let no_univs =
match cb.const_universes with
- | Monomorphic_const _ -> Univ.Instance.empty
- | Polymorphic_const ctx -> Univ.AUContext.instance ctx
+ | Monomorphic_const _ -> true
+ | Polymorphic_const ctx -> Int.equal (Univ.AUContext.size ctx) 0
in
begin match cb.const_body with
| Def t ->
@@ -1879,7 +1879,7 @@ let compile_constant env sigma prefix ~interactive con cb =
in
let l = con_label con in
let auxdefs,code =
- if Univ.Instance.is_empty u then compile_with_fv env sigma None [] (Some l) code
+ if no_univs then compile_with_fv env sigma None [] (Some l) code
else
let univ = fresh_univ () in
let (auxdefs,code) = compile_with_fv env sigma (Some univ) [] (Some l) code in
@@ -1894,7 +1894,7 @@ let compile_constant env sigma prefix ~interactive con cb =
| _ ->
let i = push_symbol (SymbConst con) in
let args =
- if Univ.Instance.is_empty u then [|get_const_code i; MLarray [||]|]
+ if no_univs then [|get_const_code i; MLarray [||]|]
else [|get_const_code i|]
in
(*