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);
for (DataDecl.TypeConstructor tyCon : listConstructors) {
res.define(tyCon.name, Type.TyCon(tyCon, list));
}
return res;