aboutsummaryrefslogtreecommitdiffhomepage
path: root/interp/constrextern.ml
diff options
context:
space:
mode:
authorGravatar msozeau <msozeau@85f007b7-540e-0410-9357-904b9bb8a0f7>2007-03-19 16:54:25 +0000
committerGravatar msozeau <msozeau@85f007b7-540e-0410-9357-904b9bb8a0f7>2007-03-19 16:54:25 +0000
commit38ff8d2b59a481ba489400ea194fdd78c6c2d5e1 (patch)
treeb0c539c86860a372b7356e6245e8db4fa50df16a /interp/constrextern.ml
parent293675b06262698ba3b1ba30db8595bedd5c55ae (diff)
Add a parameter to QuestionMark evar kind to say it can be turned into an obligations (even an opaque one).
Change cast_type to include the converted-to type or nothing in case of a Coerce cast, required much minor changes. Various little subtac changes. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@9718 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'interp/constrextern.ml')
-rw-r--r--interp/constrextern.ml14
1 files changed, 9 insertions, 5 deletions
diff --git a/interp/constrextern.ml b/interp/constrextern.ml
index 96548df71..4fbf57e07 100644
--- a/interp/constrextern.ml
+++ b/interp/constrextern.ml
@@ -204,9 +204,11 @@ let rec check_same_type ty1 ty2 =
| CHole _, CHole _ -> ()
| CPatVar(_,i1), CPatVar(_,i2) when i1=i2 -> ()
| CSort(_,s1), CSort(_,s2) when s1=s2 -> ()
- | CCast(_,a1,_,b1), CCast(_,a2,_,b2) ->
+ | CCast(_,a1,CastConv (_,b1)), CCast(_,a2, CastConv(_,b2)) ->
check_same_type a1 a2;
check_same_type b1 b2
+ | CCast(_,a1,CastCoerce), CCast(_,a2, CastCoerce) ->
+ check_same_type a1 a2
| CNotation(_,n1,e1), CNotation(_,n2,e2) when n1=n2 ->
List.iter2 check_same_type e1 e2
| CPrim(_,i1), CPrim(_,i2) when i1=i2 -> ()
@@ -296,8 +298,8 @@ let rec same_raw c d =
| RSort(_,s1), RSort(_,s2) -> if s1<>s2 then failwith "RSort"
| RHole _, _ -> ()
| _, RHole _ -> ()
- | RCast(_,c1,_,_),r2 -> same_raw c1 r2
- | r1, RCast(_,c2,_,_) -> same_raw r1 c2
+ | RCast(_,c1,_),r2 -> same_raw c1 r2
+ | r1, RCast(_,c2,_) -> same_raw r1 c2
| RDynamic(_,d1), RDynamic(_,d2) -> if d1<>d2 then failwith"RDynamic"
| _ -> failwith "same_raw"
@@ -757,8 +759,10 @@ let rec extern inctx scopes vars r =
| RHole (loc,e) -> CHole loc
- | RCast (loc,c,k,t) ->
- CCast (loc,sub_extern true scopes vars c,k,extern_typ scopes vars t)
+ | RCast (loc,c, CastConv (k,t)) ->
+ CCast (loc,sub_extern true scopes vars c, CastConv (k,extern_typ scopes vars t))
+ | RCast (loc,c, CastCoerce) ->
+ CCast (loc,sub_extern true scopes vars c, CastCoerce)
| RDynamic (loc,d) -> CDynamic (loc,d)