The Sql DBEq a constraint on the return type of the aggregator was wrong. It also isn't quite right to have a EqTable i constraint on the input type of the Aggregator, because technically what we want is a Sql DBEq constraint on whichever column(s) within i are used by aggregation functions, but we don't know which columns were used at this point. We could give distinctAggregate a type like Sql DBEq i => Aggregator (Expr i) a and make people run it through lmap manually, but that makes it impractical to use with ListTable without exposing more machinery. So we just drop the equality constraint for now.
The
Sql DBEq a
constraint on the return type of the aggregator was wrong. It also isn't quite right to have aEqTable i
constraint on the input type of theAggregator
, because technically what we want is aSql DBEq
constraint on whichever column(s) withini
are used by aggregation functions, but we don't know which columns were used at this point. We could givedistinctAggregate
a type likeSql DBEq i => Aggregator (Expr i) a
and make people run it throughlmap
manually, but that makes it impractical to use withListTable
without exposing more machinery. So we just drop the equality constraint for now.