private AExplicitFunctionDefinition getRelDef(PRelation node, ATypeDefinition typedef, ILexNameToken fname) {
ILexLocation loc = node.getLhsPattern().getLocation();
List<PPattern> params = new Vector<PPattern>();
params.add(node.getLhsPattern().clone());
params.add(node.getRhsPattern().clone());
List<List<PPattern>> parameters = new Vector<List<PPattern>>();
parameters.add(params);
PTypeList ptypes = getPTypes(typedef);
AFunctionType ftype = AstFactory.newAFunctionType(loc, false, ptypes, AstFactory.newABooleanBasicType(loc));
AExplicitFunctionDefinition def = AstFactory.newAExplicitFunctionDefinition(fname, NameScope.GLOBAL, null, ftype, parameters,
node.getRelExp(), null, null, false, null);
def.setAccess(typedef.getAccess().clone());
def.setClassDefinition(typedef.getClassDefinition());
return def;
}