groups-generic: Generically derive Group instances.

[ algebra, bsd3, library, math ] [ Propose Tags ]

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

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1.0.0, 0.2.0.0, 0.3.0.0, 0.3.1.0 (info)
Change log changelog.md
Dependencies base (>=4.12 && <4.18), generic-data (>=0.8.0.0 && <0.10), groups (>=0.4.0.0 && <0.6) [details]
License BSD-3-Clause
Author Sam Derbyshire
Maintainer Sam Derbyshire
Category Algebra, Math
Home page https://github.com/sheaf/groups-generic
Bug tracker https://github.com/sheaf/groups-generic/issues
Source repo head: git clone git://github.com/sheaf/generic-groups.git
Uploaded by sheaf at 2022-12-04T15:25:39Z
Distributions NixOS:0.3.1.0
Downloads 423 total (15 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2022-12-04 [all 1 reports]