Пример #1
0
 @Override
 public Functor visit(FQLProgram env, Curry e) {
   Functor f = e.f.accept(env, this);
   if (!f.source.isInfinite() && f.target.equals(FinSet.FinSet)) {
     return Inst.CURRY(f);
   }
   return FinCat.FinCat.curry(f);
 }
Пример #2
0
 @Override
 public Transform visit(FQLProgram env, fql_lib.decl.TransExp.Curry e) {
   Transform t = e.f.accept(env, this);
   if (t.source.source.isInfinite() || !t.source.target.equals(FinSet.FinSet)) {
     throw new RuntimeException("Cannot curry " + t);
   }
   if (e.useInst) {
     return Inst.get(t.source.source).curry(t);
   } else {
     return Inst.CURRY(t);
   }
 }