aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Guillaume Melquiond <guillaume.melquiond@inria.fr>2016-05-03 11:02:05 +0200
committerGravatar Guillaume Melquiond <guillaume.melquiond@inria.fr>2016-05-03 11:02:05 +0200
commitf51dca0647b3213eb20a9b004372e5e6182bb29a (patch)
treebb680e0dd8ac28fe9b3f3b4b190df9459403ee9d
parent24a125b779c0cf6e9b0662e122c74aa80eb1837b (diff)
Call hooks when terminating a definition proof (bug #4663).
Also register properly the kind of definition.
-rw-r--r--test-suite/bugs/closed/4663.v3
-rw-r--r--toplevel/vernacentries.ml4
2 files changed, 5 insertions, 2 deletions
diff --git a/test-suite/bugs/closed/4663.v b/test-suite/bugs/closed/4663.v
new file mode 100644
index 000000000..b76619882
--- /dev/null
+++ b/test-suite/bugs/closed/4663.v
@@ -0,0 +1,3 @@
+Coercion foo (n : nat) : Set.
+Admitted.
+Check (0 : Set).
diff --git a/toplevel/vernacentries.ml b/toplevel/vernacentries.ml
index ee11d356d..c76432ae3 100644
--- a/toplevel/vernacentries.ml
+++ b/toplevel/vernacentries.ml
@@ -463,8 +463,8 @@ let vernac_definition locality p (local,k) ((loc,id as lid),pl) def =
in
(match def with
| ProveBody (bl,t) -> (* local binders, typ *)
- start_proof_and_print (local,p,DefinitionBody Definition)
- [Some (lid,pl), (bl,t,None)] no_hook
+ start_proof_and_print (local,p,DefinitionBody k)
+ [Some (lid,pl), (bl,t,None)] hook
| DefineBody (bl,red_option,c,typ_opt) ->
let red_option = match red_option with
| None -> None