[Nice-commit] Nice/src/bossa/syntax PrimitiveType.java,1.7,1.8
Brought to you by:
bonniot
From: <bo...@us...> - 2003-12-05 17:52:33
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1:/tmp/cvs-serv27181/src/bossa/syntax Modified Files: PrimitiveType.java Log Message: Minor (use more imports to simplify code). Index: PrimitiveType.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/PrimitiveType.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** PrimitiveType.java 31 Aug 2003 00:32:56 -0000 1.7 --- PrimitiveType.java 5 Dec 2003 17:52:30 -0000 1.8 *************** *** 20,23 **** --- 20,25 ---- import mlsub.typing.TypeConstructor; import mlsub.typing.MonotypeConstructor; + import mlsub.typing.Polytype; + import mlsub.typing.Constraint; import nice.tools.code.SpecialTypes; *************** *** 62,66 **** byteTC = tc; byteType = Monotype.sure(new MonotypeConstructor(tc, null)); ! bytePolytype = new mlsub.typing.Polytype(byteType); return SpecialTypes.byteType; } --- 64,68 ---- byteTC = tc; byteType = Monotype.sure(new MonotypeConstructor(tc, null)); ! bytePolytype = new Polytype(byteType); return SpecialTypes.byteType; } *************** *** 70,74 **** shortTC = tc; shortType = Monotype.sure(new MonotypeConstructor(tc, null)); ! shortPolytype = new mlsub.typing.Polytype(shortType); return SpecialTypes.shortType; } --- 72,76 ---- shortTC = tc; shortType = Monotype.sure(new MonotypeConstructor(tc, null)); ! shortPolytype = new Polytype(shortType); return SpecialTypes.shortType; } *************** *** 78,82 **** intTC = tc; intType = Monotype.sure(new MonotypeConstructor(tc, null)); ! intPolytype = new mlsub.typing.Polytype(intType); return SpecialTypes.intType; } --- 80,84 ---- intTC = tc; intType = Monotype.sure(new MonotypeConstructor(tc, null)); ! intPolytype = new Polytype(intType); return SpecialTypes.intType; } *************** *** 86,90 **** longTC = tc; longType = Monotype.sure(new MonotypeConstructor(tc, null)); ! longPolytype = new mlsub.typing.Polytype(longType); return SpecialTypes.longType; } --- 88,92 ---- longTC = tc; longType = Monotype.sure(new MonotypeConstructor(tc, null)); ! longPolytype = new Polytype(longType); return SpecialTypes.longType; } *************** *** 96,100 **** falseBoolTC = new TypeConstructor("false"); boolType = Monotype.sure(new MonotypeConstructor(tc, null)); ! boolPolytype = new mlsub.typing.Polytype(boolType); return SpecialTypes.booleanType; } --- 98,102 ---- falseBoolTC = new TypeConstructor("false"); boolType = Monotype.sure(new MonotypeConstructor(tc, null)); ! boolPolytype = new Polytype(boolType); return SpecialTypes.booleanType; } *************** *** 119,124 **** mlsub.typing.lowlevel.Engine.setTop(tc); voidType = Monotype.sure(new MonotypeConstructor(tc, null)); ! voidPolytype = new mlsub.typing.Polytype ! (mlsub.typing.Constraint.True, voidType); synVoidType = Monotype.create(voidType); return SpecialTypes.voidType; --- 121,125 ---- mlsub.typing.lowlevel.Engine.setTop(tc); voidType = Monotype.sure(new MonotypeConstructor(tc, null)); ! voidPolytype = new Polytype(Constraint.True, voidType); synVoidType = Monotype.create(voidType); return SpecialTypes.voidType; *************** *** 169,173 **** public static mlsub.typing.Monotype byteType, charType, intType, longType, boolType, shortType, doubleType, floatType, voidType; ! static mlsub.typing.Polytype voidPolytype, boolPolytype, bytePolytype, shortPolytype, intPolytype, longPolytype; public static TypeConstructor maybeTC, sureTC, nullTC; --- 170,174 ---- public static mlsub.typing.Monotype byteType, charType, intType, longType, boolType, shortType, doubleType, floatType, voidType; ! static Polytype voidPolytype, boolPolytype, bytePolytype, shortPolytype, intPolytype, longPolytype; public static TypeConstructor maybeTC, sureTC, nullTC; *************** *** 183,193 **** } ! private static mlsub.typing.Polytype throwableType; ! static mlsub.typing.Polytype throwableType() { if (throwableType == null) { ! throwableType = new mlsub.typing.Polytype ! (mlsub.typing.Constraint.True, Monotype.sure(new MonotypeConstructor(throwableTC(), null))); } --- 184,194 ---- } ! private static Polytype throwableType; ! static Polytype throwableType() { if (throwableType == null) { ! throwableType = new Polytype ! (Constraint.True, Monotype.sure(new MonotypeConstructor(throwableTC(), null))); } |