[Nice-commit] Nice/src/bossa/syntax typecheck.nice,1.99,1.100
Brought to you by:
bonniot
From: Daniel B. <bo...@us...> - 2004-03-24 23:55:07
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2614/src/bossa/syntax Modified Files: typecheck.nice Log Message: When checking polytype <: monotype, do not rigidify, since there are no need type variables introduced before. This should be slightly faster, and most importantly it allows existential type variables to be further constrained. This also means that we should _not_ discard changes after the test. Index: typecheck.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/typecheck.nice,v retrieving revision 1.99 retrieving revision 1.100 diff -C2 -d -r1.99 -r1.100 *** typecheck.nice 24 Mar 2004 18:19:50 -0000 1.99 --- typecheck.nice 24 Mar 2004 23:44:25 -0000 1.100 *************** *** 923,928 **** void checkAssignment(mlsub.typing.Polytype left, Expression right) { ! typecheck(right); ! Typing.leq(right.getType(), left); } --- 923,933 ---- void checkAssignment(mlsub.typing.Polytype left, Expression right) { ! if (left.isMonomorphic) ! checkAssignment(left.getMonotype(), right); ! else ! { ! typecheck(right); ! Typing.leq(right.getType(), left); ! } } |