aboutsummaryrefslogtreecommitdiffhomepage
path: root/kernel
diff options
context:
space:
mode:
authorGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2017-07-11 15:42:43 +0200
committerGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2017-07-11 15:54:46 +0200
commit91df402729f70144a4e4d198c4384dc515920e59 (patch)
treec750afbc9119b7da597235bb62432ff42c871e25 /kernel
parentc401fc96c3271746448600ca097876bd139b10e9 (diff)
Moving the last bits of abtraction-breaking code out of the kernel.
Diffstat (limited to 'kernel')
-rw-r--r--kernel/declareops.ml18
-rw-r--r--kernel/declareops.mli7
-rw-r--r--kernel/univ.mli5
3 files changed, 3 insertions, 27 deletions
diff --git a/kernel/declareops.ml b/kernel/declareops.ml
index cf6d3c55e..efce21982 100644
--- a/kernel/declareops.ml
+++ b/kernel/declareops.ml
@@ -44,29 +44,11 @@ let hcons_template_arity ar =
(** {6 Constants } *)
-let instantiate cb c =
- match cb.const_universes with
- | Monomorphic_const _ -> c
- | Polymorphic_const ctx ->
- Vars.subst_instance_constr (Univ.AUContext.instance ctx) c
-
let constant_is_polymorphic cb =
match cb.const_universes with
| Monomorphic_const _ -> false
| Polymorphic_const _ -> true
-let body_of_constant otab cb = match cb.const_body with
- | Undef _ -> None
- | Def c -> Some (instantiate cb (force_constr c))
- | OpaqueDef o -> Some (instantiate cb (Opaqueproof.force_proof otab o))
-
-let type_of_constant cb =
- match cb.const_type with
- | RegularArity t as x ->
- let t' = instantiate cb t in
- if t' == t then x else RegularArity t'
- | TemplateArity _ as x -> x
-
let constant_has_body cb = match cb.const_body with
| Undef _ -> false
| Def _ | OpaqueDef _ -> true
diff --git a/kernel/declareops.mli b/kernel/declareops.mli
index 987c1adaf..a8ba5fa39 100644
--- a/kernel/declareops.mli
+++ b/kernel/declareops.mli
@@ -32,13 +32,6 @@ val constant_polymorphic_context : constant_body -> abstract_universe_context
(** Is the constant polymorphic? *)
val constant_is_polymorphic : constant_body -> bool
-(** Accessing const_body, forcing access to opaque proof term if needed.
- Only use this function if you know what you're doing. *)
-
-val body_of_constant :
- Opaqueproof.opaquetab -> constant_body -> Term.constr option
-val type_of_constant : constant_body -> constant_type
-
(** Return the universe context, in case the definition is polymorphic, otherwise
the context is empty. *)
diff --git a/kernel/univ.mli b/kernel/univ.mli
index 9d93ec26c..53297ac46 100644
--- a/kernel/univ.mli
+++ b/kernel/univ.mli
@@ -326,6 +326,7 @@ sig
val empty : t
val is_empty : t -> bool
+ (** Don't use. *)
val instance : t -> Instance.t
val size : t -> int
@@ -460,10 +461,10 @@ val abstract_cumulativity_info : cumulativity_info -> universe_level_subst * abs
val make_abstract_instance : abstract_universe_context -> universe_instance
-(** Get the instantiated graph. *)
+(** Don't use. *)
val instantiate_univ_context : abstract_universe_context -> universe_context
-(** Get the instantiated graphs for both universe constraints and subtyping constraints. *)
+(** Don't use. *)
val instantiate_cumulativity_info : abstract_cumulativity_info -> cumulativity_info
(** {6 Pretty-printing of universes. } *)