[Nice-commit] Nice/src/nice/tools/typing PrimitiveType.java,1.1,1.2 Types.java,1.10,1.11
Brought to you by:
bonniot
From: Arjan B. <ar...@us...> - 2004-12-01 02:44:04
|
Update of /cvsroot/nice/Nice/src/nice/tools/typing In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14421/F:/nice/src/nice/tools/typing Modified Files: PrimitiveType.java Types.java Log Message: Make nice.tools.typing not depend on bossa.syntax. Index: Types.java =================================================================== RCS file: /cvsroot/nice/Nice/src/nice/tools/typing/Types.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Types.java 1 Dec 2004 02:00:30 -0000 1.10 --- Types.java 1 Dec 2004 02:43:53 -0000 1.11 *************** *** 111,114 **** --- 111,120 ---- } + public static mlsub.typing.Monotype sureMonotype(mlsub.typing.Monotype type) + { + return new mlsub.typing.MonotypeConstructor + (PrimitiveType.sureTC, new mlsub.typing.Monotype[]{type}); + } + /**************************************************************** * Functional types *************** *** 149,153 **** return new Polytype (type.getConstraint(), ! bossa.syntax.Monotype.sure(type.getMonotype())); } --- 155,159 ---- return new Polytype (type.getConstraint(), ! Types.sureMonotype(type.getMonotype())); } Index: PrimitiveType.java =================================================================== RCS file: /cvsroot/nice/Nice/src/nice/tools/typing/PrimitiveType.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PrimitiveType.java 1 Dec 2004 02:00:30 -0000 1.1 --- PrimitiveType.java 1 Dec 2004 02:43:53 -0000 1.2 *************** *** 36,40 **** { charTC = tc; ! charType = sureMonotype(new MonotypeConstructor(tc, null)); return SpecialTypes.charType; } --- 36,40 ---- { charTC = tc; ! charType = Types.sureMonotype(new MonotypeConstructor(tc, null)); return SpecialTypes.charType; } *************** *** 43,47 **** { byteTC = tc; ! byteType = sureMonotype(new MonotypeConstructor(tc, null)); bytePolytype = new Polytype(byteType); return SpecialTypes.byteType; --- 43,47 ---- { byteTC = tc; ! byteType = Types.sureMonotype(new MonotypeConstructor(tc, null)); bytePolytype = new Polytype(byteType); return SpecialTypes.byteType; *************** *** 51,55 **** { shortTC = tc; ! shortType = sureMonotype(new MonotypeConstructor(tc, null)); shortPolytype = new Polytype(shortType); return SpecialTypes.shortType; --- 51,55 ---- { shortTC = tc; ! shortType = Types.sureMonotype(new MonotypeConstructor(tc, null)); shortPolytype = new Polytype(shortType); return SpecialTypes.shortType; *************** *** 59,63 **** { intTC = tc; ! intType = sureMonotype(new MonotypeConstructor(tc, null)); intPolytype = new Polytype(intType); return SpecialTypes.intType; --- 59,63 ---- { intTC = tc; ! intType = Types.sureMonotype(new MonotypeConstructor(tc, null)); intPolytype = new Polytype(intType); return SpecialTypes.intType; *************** *** 67,71 **** { longTC = tc; ! longType = sureMonotype(new MonotypeConstructor(tc, null)); longPolytype = new Polytype(longType); return SpecialTypes.longType; --- 67,71 ---- { longTC = tc; ! longType = Types.sureMonotype(new MonotypeConstructor(tc, null)); longPolytype = new Polytype(longType); return SpecialTypes.longType; *************** *** 75,79 **** { boolTC = tc; ! boolType = sureMonotype(new MonotypeConstructor(tc, null)); boolPolytype = new Polytype(boolType); return SpecialTypes.booleanType; --- 75,79 ---- { boolTC = tc; ! boolType = Types.sureMonotype(new MonotypeConstructor(tc, null)); boolPolytype = new Polytype(boolType); return SpecialTypes.booleanType; *************** *** 83,87 **** { doubleTC = tc; ! doubleType = sureMonotype(new MonotypeConstructor(tc, null)); return SpecialTypes.doubleType; } --- 83,87 ---- { doubleTC = tc; ! doubleType = Types.sureMonotype(new MonotypeConstructor(tc, null)); return SpecialTypes.doubleType; } *************** *** 90,94 **** { floatTC = tc; ! floatType = sureMonotype(new MonotypeConstructor(tc, null)); return SpecialTypes.floatType; } --- 90,94 ---- { floatTC = tc; ! floatType = Types.sureMonotype(new MonotypeConstructor(tc, null)); return SpecialTypes.floatType; } *************** *** 98,102 **** voidTC = tc; mlsub.typing.lowlevel.Engine.setTop(tc); ! voidType = sureMonotype(new MonotypeConstructor(tc, null)); voidPolytype = new Polytype(Constraint.True, voidType); return SpecialTypes.voidType; --- 98,102 ---- voidTC = tc; mlsub.typing.lowlevel.Engine.setTop(tc); ! voidType = Types.sureMonotype(new MonotypeConstructor(tc, null)); voidPolytype = new Polytype(Constraint.True, voidType); return SpecialTypes.voidType; *************** *** 141,150 **** } - private static mlsub.typing.Monotype sureMonotype(mlsub.typing.Monotype type) - { - return new mlsub.typing.MonotypeConstructor - (PrimitiveType.sureTC, new mlsub.typing.Monotype[]{type}); - } - public static TypeConstructor byteTC, charTC, intTC, longTC, boolTC, shortTC, doubleTC, floatTC, arrayTC, voidTC; --- 141,144 ---- *************** *** 157,161 **** if (objectPolytype == null) objectPolytype = new Polytype(mlsub.typing.Constraint.True, ! sureMonotype(TopMonotype.instance)); return objectPolytype; --- 151,155 ---- if (objectPolytype == null) objectPolytype = new Polytype(mlsub.typing.Constraint.True, ! Types.sureMonotype(TopMonotype.instance)); return objectPolytype; *************** *** 177,181 **** throwableType = new Polytype (Constraint.True, ! sureMonotype(new MonotypeConstructor(throwableTC, null))); } return throwableType; --- 171,175 ---- throwableType = new Polytype (Constraint.True, ! Types.sureMonotype(new MonotypeConstructor(throwableTC, null))); } return throwableType; |