aboutsummaryrefslogtreecommitdiff
path: root/plugins/ltac/tacentries.ml
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2018-07-11 22:57:57 +0200
committerPierre-Marie Pédrot2018-07-12 13:53:22 +0200
commitb9ff36b39eb193757ce57a89afe138cd09e759d7 (patch)
tree5c692d9cad8ce9db00c9d7c127750650cd7b26a8 /plugins/ltac/tacentries.ml
parent270ceed48217797e99ec845cc5d1c599b5729bc2 (diff)
Statically typecheck the VERNAC EXTEND wrapper.
This moves the typing code from the macro expansion to the extension registering mechanism, bringing in more static safety. We also seize the opportunity to remove dead code in the macro.
Diffstat (limited to 'plugins/ltac/tacentries.ml')
-rw-r--r--plugins/ltac/tacentries.ml11
1 files changed, 1 insertions, 10 deletions
diff --git a/plugins/ltac/tacentries.ml b/plugins/ltac/tacentries.ml
index fac464a628..463d8633cf 100644
--- a/plugins/ltac/tacentries.ml
+++ b/plugins/ltac/tacentries.ml
@@ -592,15 +592,6 @@ let rec clause_of_sign : type a. a ty_sig -> Genarg.ArgT.any Extend.user_symbol
let clause_of_ty_ml = function
| TyML (t,_) -> clause_of_sign t
-let rec prj : type a b c. (a,b,c) Extend.ty_user_symbol -> (a,b,c) genarg_type = function
- | TUentry a -> ExtraArg a
- | TUentryl (a,l) -> ExtraArg a
- | TUopt(o) -> OptArg (prj o)
- | TUlist1 l -> ListArg (prj l)
- | TUlist1sep (l,_) -> ListArg (prj l)
- | TUlist0 l -> ListArg (prj l)
- | TUlist0sep (l,_) -> ListArg (prj l)
-
let rec eval_sign : type a. a ty_sig -> a -> Geninterp.Val.t list -> Geninterp.interp_sign -> unit Proofview.tactic =
fun sign tac ->
match sign with
@@ -615,7 +606,7 @@ let rec eval_sign : type a. a ty_sig -> a -> Geninterp.Val.t list -> Geninterp.i
begin fun tac vals ist -> match vals with
| [] -> assert false
| v :: vals ->
- let v' = Taccoerce.Value.cast (topwit (prj a)) v in
+ let v' = Taccoerce.Value.cast (topwit (Egramml.proj_symbol a)) v in
f (tac v') vals ist
end tac
| TyAnonArg (a, sig') -> eval_sign sig' tac