aboutsummaryrefslogtreecommitdiffhomepage
path: root/checker/mod_checking.ml
diff options
context:
space:
mode:
authorGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2018-01-14 02:20:42 +0100
committerGravatar Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr>2018-01-14 03:02:20 +0100
commit20481a3f3405f04b47c7865ca2788a6f63660443 (patch)
treed98f03e446ca636c62df9593d19f5d29ac3c39ee /checker/mod_checking.ml
parent7f9223bf9939a626b0813ecc6c34b4ef19b123f0 (diff)
Actually use the strategy information in the checker.
Diffstat (limited to 'checker/mod_checking.ml')
-rw-r--r--checker/mod_checking.ml11
1 files changed, 9 insertions, 2 deletions
diff --git a/checker/mod_checking.ml b/checker/mod_checking.ml
index 4357a690e..7685863ea 100644
--- a/checker/mod_checking.ml
+++ b/checker/mod_checking.ml
@@ -26,6 +26,9 @@ let refresh_arity ar =
let check_constant_declaration env kn cb =
Flags.if_verbose Feedback.msg_notice (str " checking cst:" ++ prcon kn);
+ (** Locally set the oracle for further typechecking *)
+ let oracle = env.env_conv_oracle in
+ let env = Environ.set_oracle env cb.const_typing_flags.conv_oracle in
(** [env'] contains De Bruijn universe variables *)
let env' =
match cb.const_universes with
@@ -53,8 +56,12 @@ let check_constant_declaration env kn cb =
conv_leq envty j ty)
| None -> ()
in
- if constant_is_polymorphic cb then add_constant kn cb env
- else add_constant kn cb env'
+ let env =
+ if constant_is_polymorphic cb then add_constant kn cb env
+ else add_constant kn cb env'
+ in
+ (** Reset the value of the oracle *)
+ Environ.set_oracle env oracle
(** {6 Checking modules } *)