You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've come up with a concept of "super" aggregator which is the same as our current Aggregator but with slightly nicer structure. In particular it allows us to write countAll :: Aggregator () (Wire Int64) which was impossible with the old approach (see #76).
Once I've implemented everything, it should be API compatible with the old Aggregator module with one exception. The type off aggregate has changed from
aggregate :: Aggregator a b -> Query a -> Query b
to
aggregate :: (D.Default (PP.PPOfContravariant U.Unpackspec) a a,
D.Default (PP.PPOfContravariant U.Unpackspec) b b)
=> Aggregator a b -> Query a -> Query b
The new version is a bit more messy, but we're used to this sort of use of the Default typeclass by now. In pretty much all uses the new version will still work because we will have suitable instances for our a and b.
Should I just go ahead and replace the old module with the new one?
The text was updated successfully, but these errors were encountered:
I've come up with a concept of "super" aggregator which is the same as our current
Aggregator
but with slightly nicer structure. In particular it allows us to writecountAll :: Aggregator () (Wire Int64)
which was impossible with the old approach (see #76).(Example usage of the super aggregator)
Once I've implemented everything, it should be API compatible with the old
Aggregator
module with one exception. The type offaggregate
has changed fromto
The new version is a bit more messy, but we're used to this sort of use of the
Default
typeclass by now. In pretty much all uses the new version will still work because we will have suitable instances for oura
andb
.Should I just go ahead and replace the old module with the new one?
The text was updated successfully, but these errors were encountered: