diff options
Diffstat (limited to 'parsing')
| -rw-r--r-- | parsing/g_constr.ml4 | 10 | ||||
| -rw-r--r-- | parsing/ppconstr.ml | 5 |
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 |
