fn = "Difference";
break;
default:
fn = ""; // deadcode
}
NameID nid = new NameID(WYCS_CORE_SET,fn);
SemanticType.Tuple argType = SemanticType.Tuple(type, type);
SemanticType.Function funType = SemanticType.Function(argType,
type, ((SemanticType.Set)type).element());
Code argument = Code.Nary(argType, Code.Op.TUPLE, new Code[] {
lhs,rhs });
return Code.FunCall(funType, argument, nid,
attributes(e));
}
case LISTAPPEND: {
NameID nid = new NameID(WYCS_CORE_LIST,"Append");
SemanticType.Tuple argType = SemanticType.Tuple(type,type);
SemanticType[] generics = bindGenerics(nid,argType,e);
SemanticType.Function funType = SemanticType.Function(argType,
type,generics);
Code argument = Code.Nary(argType, Code.Op.TUPLE, new Code[] {
lhs,rhs });
return Code.FunCall(funType, argument, nid,
attributes(e));
}
case RANGE: {
NameID nid = new NameID(WYCS_CORE_LIST,"Range");
SemanticType.Tuple argType = SemanticType.Tuple(SemanticType.Int,SemanticType.Int);
SemanticType.Function funType = SemanticType.Function(argType,
type);
Code argument = Code.Nary(argType, Code.Op.TUPLE, new Code[] {
lhs,rhs });