homepage: ''
changelog-type: markdown
hash: 5af8a7d43a97fa9f148ef614f7fe5e8b01c9c487110732015e77834ee07efdc7
test-bench-deps: {}
maintainer: lukec@themk.net
synopsis: Derive monoid instances for product types.
changelog: |
  # Revision history for generic-monoid

  ## 0.1.0.0  -- 2018-12-12

  * Initial release.
basic-deps:
  base: '>=4.12 && <4.15'
all-versions:
- 0.1.0.0
author: Luke Clifton
latest: 0.1.0.0
description-type: markdown
description: |
  # Generic Monoid (and Semigroup)

  This library provides a method of deriving `Semigroup` and `Monoid` instances
  for your large product types. It does this using GHC generics, and can provides
  a mechanism for using the `DerivingVia` extension to reduce boilerplate.

  It only works if each field of your product type is itself a `Semigroup`/`Monoid`.

  ```haskell
  {-# LANGUAGE DerivingStrategies #-}
  {-# LANGUAGE DerivingVia        #-}
  {-# LANGUAGE DeriveGeneric      #-}

  import GHC.Generics
  import Data.Monoid.Generic

  data BigProduct = BigProduct
      { theList   :: [Int]
      , theSum    :: Sum Double
      , theString :: String
      } deriving (Generic, Eq)
      deriving Semigroup via GenericSemigroup BigProduct
      deriving Monoid    via GenericMonoid BigProduct

  useIt :: Bool
  useIt = (mempty <> mempty) == BigProduct [] 0 ""
  ```
license-name: BSD-3-Clause

homepage: ''
changelog-type: markdown
hash: d2ddcb359d05156e5654a309759dbf1de887e591d9afdabfb343b2e66403890c
test-bench-deps: {}
maintainer: lukec@themk.net
synopsis: Derive monoid instances for product types.
changelog: |
  # Revision history for generic-monoid

  ## 0.1.0.1  -- 2020-06-14

  * Support GHC 8.4

  ## 0.1.0.0  -- 2018-12-12

  * Initial release.
basic-deps:
  base: '>=4.11 && <4.15'
all-versions:
- 0.1.0.0
- 0.1.0.1
author: Luke Clifton
latest: 0.1.0.1
description-type: haddock
description: Using GHC's generics, allow for deriving `Monoid` and `Semigroup` instances
  for your product types.
license-name: BSD-3-Clause

Update from Hackage at 2020-06-14T01:09:07Z
Update from Hackage at 2020-06-14T01:09:07Z
