diff options
Diffstat (limited to 'tactics/tacenv.ml')
| -rw-r--r-- | tactics/tacenv.ml | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tactics/tacenv.ml b/tactics/tacenv.ml new file mode 100644 index 0000000000..1a277c7405 --- /dev/null +++ b/tactics/tacenv.ml @@ -0,0 +1,24 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* <O___,, * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2012 *) +(* \VV/ **************************************************************) +(* // * This file is distributed under the terms of the *) +(* * GNU Lesser General Public License Version 2.1 *) +(************************************************************************) + +open Util +open Pp +open Names +open Tacexpr + +type alias = KerName.t + +let alias_map = Summary.ref ~name:"tactic-alias" + (KNmap.empty : (DirPath.t * glob_tactic_expr) KNmap.t) + +let register_alias key dp tac = + alias_map := KNmap.add key (dp, tac) !alias_map + +let interp_alias key = + try KNmap.find key !alias_map + with Not_found -> Errors.anomaly (str "Unknown tactic alias: " ++ KerName.print key) |
