diff options
| author | Maxime Dénès | 2017-10-23 14:27:04 +0200 |
|---|---|---|
| committer | Maxime Dénès | 2018-03-08 17:16:08 +0100 |
| commit | b16633a5dc044e5d95c73b4c912ec7232f9caf12 (patch) | |
| tree | 848f64b9dde07bec3244a2c0137f7dc72b5c06b7 /plugins/ltac/tacentries.mli | |
| parent | 3875a525ee1e075be9f0eb1f17c74726e9f38b43 (diff) | |
Make most of TACTIC EXTEND macros runtime calls.
Today, TACTIC EXTEND generates ad-hoc ML code that registers the tactic
and its parsing rule. Instead, we make it generate a typed AST that is
passed to the parser and a generic tactic execution routine.
PMP has written a small parser that can generate the same typed ASTs
without relying on camlp5, which is overkill for such simple macros.
Diffstat (limited to 'plugins/ltac/tacentries.mli')
| -rw-r--r-- | plugins/ltac/tacentries.mli | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/plugins/ltac/tacentries.mli b/plugins/ltac/tacentries.mli index 02e2f0f60e..3f804ee8d1 100644 --- a/plugins/ltac/tacentries.mli +++ b/plugins/ltac/tacentries.mli @@ -67,3 +67,15 @@ val print_ltacs : unit -> unit val print_located_tactic : Libnames.reference -> unit (** Display the absolute name of a tactic. *) + +type _ ty_sig = +| TyNil : (Geninterp.interp_sign -> unit Proofview.tactic) ty_sig +| TyIdent : string * 'r ty_sig -> 'r ty_sig +| TyArg : + (('a, 'b, 'c) Extend.ty_user_symbol * Names.Id.t) Loc.located * 'r ty_sig -> ('c -> 'r) ty_sig +| TyAnonArg : + ('a, 'b, 'c) Extend.ty_user_symbol Loc.located * 'r ty_sig -> 'r ty_sig + +type ty_ml = TyML : 'r ty_sig * 'r -> ty_ml + +val tactic_extend : string -> string -> level:Int.t -> ty_ml list -> unit |
