@hackage groups-generic0.3.1.0

Generically derive Group instances.

Generically derive group instances:

{-# LANGUAGE DeriveGeneric, DerivingVia #-}
import GHC.Generics ( Generic, Generically (..) )

data MyRecord
  = MyRecord
  { field1 :: Sum Double
  , field2 :: Product Double
  , field3 :: ( Sum Int, Sum Int )
  }
  deriving Generic
  deriving ( Semigroup, Monoid, Group )
    via Generically MyRecord