diff options
| author | herbelin | 2009-09-11 17:53:30 +0000 |
|---|---|---|
| committer | herbelin | 2009-09-11 17:53:30 +0000 |
| commit | ea85f46dc0cc34db149c24bb2da8f3130e191fc1 (patch) | |
| tree | 3b8fa67f3f1dc5bb2815b38c1040a3ea192c88fe /interp/genarg.ml | |
| parent | 7131609a82198080421b15e2c7a0d8f3b6cbd3de (diff) | |
Generalized the possibility to refer to a global name by a notation
string in most commands expecting a global name (e.g. 'Print "+"' for
an infix notation or 'Print "{ _ } + { _ }"' for a misfix notation,
possibly surrounded by a scope delimiter). Support for such smart
globals in VERNAC EXTEND to do.
Added a file smartlocate.ml for high-level globalization functions.
Mini-nettoyage metasyntax.ml.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@12323 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'interp/genarg.ml')
| -rw-r--r-- | interp/genarg.ml | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/interp/genarg.ml b/interp/genarg.ml index 8724b0bfd6..c6dc12164e 100644 --- a/interp/genarg.ml +++ b/interp/genarg.ml @@ -47,7 +47,11 @@ type argument_type = type 'a and_short_name = 'a * identifier located option type 'a or_by_notation = | AN of 'a - | ByNotation of loc * string * Notation.delimiters option + | ByNotation of (loc * string * Notation.delimiters option) + +let loc_of_or_by_notation f = function + | AN c -> f c + | ByNotation (loc,s,_) -> loc type rawconstr_and_expr = rawconstr * constr_expr option type open_constr_expr = unit * constr_expr |
