[Nice-commit] Nice/src/bossa/syntax tools.nice,1.70,1.71 tuple.nice,1.1,1.2 TupleType.java,1.7,NONE
Brought to you by:
bonniot
From: Arjan B. <ar...@us...> - 2004-12-14 18:58:18
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9072/F:/nice/src/bossa/syntax Modified Files: tools.nice tuple.nice Removed Files: TupleType.java Log Message: Converted TupleType. (by Luc Perrin) Index: tools.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/tools.nice,v retrieving revision 1.70 retrieving revision 1.71 diff -C2 -d -r1.70 -r1.71 *** tools.nice 8 Dec 2004 23:03:37 -0000 1.70 --- tools.nice 14 Dec 2004 18:58:08 -0000 1.71 *************** *** 253,256 **** --- 253,260 ---- ?String getParentFor(AtomicConstraint, mlsub.typing.TypeConstructor) = native String AtomicConstraint.getParentFor(mlsub.typing.TypeConstructor); mlsub.typing.AtomicConstraint resolve(AtomicConstraint, TypeScope) = native mlsub.typing.AtomicConstraint AtomicConstraint.resolve(TypeScope); + bossa.syntax.Monotype substitute(bossa.syntax.Monotype,Map<String,bossa.syntax.Monotype>) = native bossa.syntax.Monotype bossa.syntax.Monotype.substitute(Map); + List<bossa.syntax.Monotype> substitute(Map<String,bossa.syntax.Monotype>,Collection<bossa.syntax.Monotype>) = native List bossa.syntax.Monotype.substitute(Map,Collection); + boolean containsAlike(List<bossa.syntax.Monotype>) = native boolean bossa.syntax.Monotype.containsAlike(List); + mlsub.typing.Monotype[] rawResolve(TypeMap,Collection<bossa.syntax.Monotype>) = native mlsub.typing.Monotype[] bossa.syntax.Monotype.rawResolve(TypeMap, Collection); // Retypings needed since java types are not strict. Index: tuple.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/tuple.nice,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tuple.nice 28 Jul 2004 14:40:33 -0000 1.1 --- tuple.nice 14 Dec 2004 18:58:08 -0000 1.2 *************** *** 16,22 **** /** ! Creation of a tuple. */ public class TupleExp extends bossa.syntax.Expression { --- 16,47 ---- /** ! A tuple of types. */ + public class TupleType extends bossa.syntax.Monotype + { + List<Monotype> types; + Location location; + + rawResolve(typeMap) = new mlsub.typing.TupleType + (bossa.syntax.Monotype.rawResolve(notNull(typeMap), types)); + substitute(map) + { + bossa.syntax.Monotype res = new bossa.syntax.TupleType + ( types : bossa.syntax.Monotype.substitute(map, types), location : location); + res.nullness = this.nullness; + return res; + } + + containsAlike() = bossa.syntax.Monotype.containsAlike(types); + + location() = location; + + toString() = Util.map("(", ", " ,")", types); + } + + /** + Creation of a tuple. + */ public class TupleExp extends bossa.syntax.Expression { --- TupleType.java DELETED --- |