aboutsummaryrefslogtreecommitdiff
path: root/parsing
diff options
context:
space:
mode:
authorbgregoir2006-07-22 17:42:45 +0000
committerbgregoir2006-07-22 17:42:45 +0000
commitfff07f8260867740f1f8d8b09bd26baa5f99e5c6 (patch)
treec222eddef1770307a3d097faa8d928228ef61629 /parsing
parent66b674a1d41d9349f4c64543eda5ef005617e3a0 (diff)
- Ajout d'un cast vm dans la syntaxe : x <: t
Part contre ces cas sont detruis dans les "Definition" (pas dans les "Lemma") je comprends pas ou ils sont enlev'e... Si une id'ee ... - Correction d'un bug dans vm_compute plusieurs fois signal'e par Roland. - Meilleur compilation des coinductifs, on utilise maintenant vraimment du lazy. - Enfin un peu plus de doc dans le code de la vm. Benjamin git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@9058 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'parsing')
-rw-r--r--parsing/g_constr.ml410
-rw-r--r--parsing/ppconstr.ml5
2 files changed, 11 insertions, 4 deletions
diff --git a/parsing/g_constr.ml4 b/parsing/g_constr.ml4
index 641abe2f71..9c8632a6d3 100644
--- a/parsing/g_constr.ml4
+++ b/parsing/g_constr.ml4
@@ -155,8 +155,14 @@ GEXTEND Gram
[ "200" RIGHTA
[ c = binder_constr -> c ]
| "100" RIGHTA
- [ c1 = operconstr; ":"; c2 = binder_constr -> CCast(loc,c1, CastConv DEFAULTcast,c2)
- | c1 = operconstr; ":"; c2 = SELF -> CCast(loc,c1,CastConv DEFAULTcast,c2) ]
+ [ c1 = operconstr; "<:"; c2 = binder_constr ->
+ CCast(loc,c1, CastConv VMcast,c2)
+ | c1 = operconstr; "<:"; c2 = SELF ->
+ CCast(loc,c1, CastConv VMcast,c2)
+ | c1 = operconstr; ":";c2 = binder_constr ->
+ CCast(loc,c1, CastConv DEFAULTcast,c2)
+ | c1 = operconstr; ":"; c2 = SELF ->
+ CCast(loc,c1, CastConv DEFAULTcast,c2) ]
| "99" RIGHTA [ ]
| "90" RIGHTA
[ c1 = operconstr; "->"; c2 = binder_constr -> CArrow(loc,c1,c2)
diff --git a/parsing/ppconstr.ml b/parsing/ppconstr.ml
index 92b07e08b1..ea4a263088 100644
--- a/parsing/ppconstr.ml
+++ b/parsing/ppconstr.ml
@@ -566,8 +566,9 @@ let rec pr sep inherited a =
| CEvar (_,n) -> str (Evd.string_of_existential n), latom
| CPatVar (_,(_,p)) -> str "?" ++ pr_patvar p, latom
| CSort (_,s) -> pr_rawsort s, latom
- | CCast (_,a,_,b) ->
- hv 0 (pr mt (lcast,L) a ++ cut () ++ str ":" ++ pr mt (-lcast,E) b),
+ | CCast (_,a,k,b) ->
+ let s = match k with CastConv VMcast -> "<:" | _ -> ":" in
+ hv 0 (pr mt (lcast,L) a ++ cut () ++ str s ++ pr mt (-lcast,E) b),
lcast
| CNotation (_,"( _ )",[t]) ->
pr (fun()->str"(") (max_int,L) t ++ str")", latom