[Nice-commit] Nice/src/mlsub/typing Typing.java,1.37,1.38
Brought to you by:
bonniot
From: Daniel B. <bo...@us...> - 2004-03-24 14:12:50
|
Update of /cvsroot/nice/Nice/src/mlsub/typing In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv618/src/mlsub/typing Modified Files: Typing.java Log Message: Handle typing checks that need rigidification while in existential mode (by appropriate backtracking). Index: Typing.java =================================================================== RCS file: /cvsroot/nice/Nice/src/mlsub/typing/Typing.java,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** Typing.java 23 Mar 2004 20:28:43 -0000 1.37 --- Typing.java 24 Mar 2004 14:02:11 -0000 1.38 *************** *** 296,301 **** Debug.println("Polytype leq: "+t1+" <: "+t2); ! int l; ! if(dbg) l=enter("#"); else l=enter(); try{ --- 296,302 ---- Debug.println("Polytype leq: "+t1+" <: "+t2); ! // The additions we are going to make should be discarded at the end, ! // so as not to influence existential type variables in the context. ! int l = enter(true); try{ *************** *** 308,312 **** } finally{ ! if(leave() != l) throw new InternalError("Unmatched enters and leaves"); } --- 309,313 ---- } finally{ ! if(leave(true, false) != l) throw new InternalError("Unmatched enters and leaves"); } *************** *** 326,331 **** Debug.println("Polytype leq: "+t1+" <: "+m2); ! int l; ! if(dbg) l=enter("#"); else l=enter(); try{ --- 327,333 ---- Debug.println("Polytype leq: "+t1+" <: "+m2); ! // The additions we are going to make should be discarded at the end, ! // so as not to influence existential type variables in the context. ! int l = enter(true); try{ *************** *** 336,340 **** } finally{ ! if(leave() != l) throw new InternalError("Unmatched enters and leaves"); } --- 338,342 ---- } finally{ ! if(leave(true, false) != l) throw new InternalError("Unmatched enters and leaves"); } *************** *** 470,474 **** } ! enter(); try{ Constraint.enter(d1.getConstraint()); --- 472,478 ---- } ! // The additions we are going to make should be discarded at the end, ! // so as not to influence existential type variables in the context. ! enter(true); try{ Constraint.enter(d1.getConstraint()); *************** *** 480,484 **** } finally{ ! leave(); } } --- 484,488 ---- } finally{ ! leave(true, false); } } |