public IBool eq(IValue x, IValue y) {
return vf.bool(x.isEqual(y));
}
public IValue make(IValue type, IString name, IList args) {
TypeStore store = new TypeStore();
org.eclipse.imp.pdb.facts.type.Type t = new TypeReifier(vf).valueToType((IConstructor) type, store);
IValue[] children = new IValue[args.length()];
org.eclipse.imp.pdb.facts.type.Type[] argsTypes = new org.eclipse.imp.pdb.facts.type.Type[args.length()];
for (int i = 0; i < args.length(); i++) {
children[i] = args.get(i);
argsTypes[i] = children[i].getType();
}
try {
org.eclipse.imp.pdb.facts.type.Type constructor
= store.lookupConstructor(t, name.getValue(), TypeFactory.getInstance().tupleType(argsTypes));
if (constructor == null) {
// TODO: improve error messaging, using specialized exception
throw RuntimeExceptionFactory.illegalArgument(type, null, null);
}