[Nice-commit] Nice/src/mlsub/typing Polytype.java,1.19,1.20
Brought to you by:
bonniot
From: <bo...@us...> - 2003-12-08 19:43:24
|
Update of /cvsroot/nice/Nice/src/mlsub/typing In directory sc8-pr-cvs1:/tmp/cvs-serv14452/src/mlsub/typing Modified Files: Polytype.java Log Message: Guarantee that simplified polytypes are simpler than the original. Index: Polytype.java =================================================================== RCS file: /cvsroot/nice/Nice/src/mlsub/typing/Polytype.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** Polytype.java 26 Jul 2003 22:29:47 -0000 1.19 --- Polytype.java 8 Dec 2003 19:43:21 -0000 1.20 *************** *** 285,291 **** } monotype = monotype.canonify(); - int nbinders = binders.size(), natoms = atoms.size(); constraint = Constraint.create (nbinders == 0 ? null --- 285,300 ---- } + int nbinders = binders.size(), natoms = atoms.size(); + + if (nbinders >= constraint.binders().length) + { + // The "simplified" version is longer than the original, so we + // keep the original. + simplified = true; + return; + } + monotype = monotype.canonify(); constraint = Constraint.create (nbinders == 0 ? null |