res.define("int2str", Type.Function(Type.INT, Type.STR));
res.define("print", Type.Function(Type.STR, Type.UNIT));
res.define("error", Type.Function(Type.STR, new Type.Variable()));
Type.Variable b = new Type.Variable();
Type listType = Type.List(b);
List<DataDecl.TypeConstructor> listConstructors = new ArrayList<DataDecl.TypeConstructor>();
List<Type> listVars = Arrays.<Type>asList(b);
listConstructors.add(new DataDecl.TypeConstructor("Cons", Arrays.asList(b, listType)));
listConstructors.add(new DataDecl.TypeConstructor("Nil"));
DataDecl list = new DataDecl("List", listType, Arrays.asList(b), listConstructors);