use of catdata.fql.decl.SigExp.Exp in project fql by CategoricalData.
the class MapExpChecker method visit.
@Override
public Pair<SigExp, SigExp> visit(FQLProgram env, Curry e) {
Pair<SigExp, SigExp> ft = e.f.accept(env, this);
if (!(ft.first instanceof Times)) {
throw new RuntimeException("Not a product: " + ft.first + " in " + e);
}
Times t = (Times) ft.first;
return new Pair<>(t.a, new Exp(ft.second, t.b));
}
use of catdata.fql.decl.SigExp.Exp in project fql by CategoricalData.
the class MapExpChecker method visit.
@Override
public Pair<SigExp, SigExp> visit(FQLProgram env, Apply e) {
SigExp s = e.s.typeOf(env);
SigExp t = e.t.typeOf(env);
return new Pair<>(new Times(new Exp(s, t), t), s);
}