@@ -23,6 +23,11 @@ import qualified Opaleye.Internal.PackMap as Opaleye
23import Data.Functor.Apply ( Apply, WrappedApplicative(..) )
23import Data.Functor.Apply ( Apply, WrappedApplicative(..) )
26+-- | An @Aggregate a@ describes how to aggregate @Table@s of type @a@. You can
27+-- unpack an @Aggregate@ back to @a@ by running it with 'aggregate'. As
28+-- @Aggregate@ is almost an 'Applicative' functor - but there is no 'pure'
29+-- operation. This means 'Aggregate' is an instance of 'Apply', and you can
30+-- combine @Aggregate@s using the @<.>@ combinator.
26type Aggregate :: Type -> Type
31type Aggregate :: Type -> Type
27newtype Aggregate a = Aggregate (Opaleye.Aggregator () a)
32newtype Aggregate a = Aggregate (Opaleye.Aggregator () a)
28 deriving newtype Functor
33 deriving newtype Functor