aboutsummaryrefslogtreecommitdiff
path: root/interp/constrextern.ml
diff options
context:
space:
mode:
authorherbelin2008-03-30 21:42:58 +0000
committerherbelin2008-03-30 21:42:58 +0000
commit90e5407fcfc59dce5ea592aeae6195183a2b4ad2 (patch)
treea30c7aebc8d840b87d702b972fbbff16714e4b6d /interp/constrextern.ml
parent0b6924f05ef6beb775345f3fb2ad21a009ab3baa (diff)
Ajout d'abbréviations/notations paramétriques
Example: "Notation reflexive R := (forall x, R x x)." git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@10730 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'interp/constrextern.ml')
-rw-r--r--interp/constrextern.ml7
1 files changed, 6 insertions, 1 deletions
diff --git a/interp/constrextern.ml b/interp/constrextern.ml
index 11cd87763f..0e30e5db58 100644
--- a/interp/constrextern.ml
+++ b/interp/constrextern.ml
@@ -853,7 +853,12 @@ and extern_symbol (tmp_scope,scopes as allscopes) vars t = function
subst in
insert_delimiters (make_notation loc ntn l) key)
| SynDefRule kn ->
- CRef (Qualid (loc, shortest_qualid_of_syndef vars kn)) in
+ let l =
+ List.map (fun (c,(scopt,scl)) ->
+ extern true (scopt,scl@scopes) vars c, None)
+ subst in
+ let a = CRef (Qualid (loc, shortest_qualid_of_syndef vars kn)) in
+ if l = [] then a else CApp (loc,(None,a),l) in
if args = [] then e
else
(* TODO: compute scopt for the extra args, in case, head is a ref *)