homepage: ''
changelog-type: markdown
hash: 00d1a7b7ff0890a3e3cba4032be24fe377c26e5e45d73afcacd42c98abb3b7e3
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.13'
all-versions:
- '0.1.0.0'
author: Luke Clifton
latest: '0.1.0.0'
description-type: markdown
description: ! "# Generic Monoid (and Semigroup)\n\nThis library provides a method
  of deriving `Semigroup` and `Monoid` instances\nfor your large product types. It
  does this using GHC generics, and can provides\na mechanism for using the `DerivingVia`
  extension to reduce boilerplate.\n\nIt only works if each field of your product
  type is itself a `Semigroup`/`Monoid`.\n\n```haskell\n{-# LANGUAGE DerivingStrategies
  #-}\n{-# LANGUAGE DerivingVia        #-}\n{-# LANGUAGE DeriveGeneric      #-}\n\nimport
  GHC.Generics\nimport Data.Monoid.Generic\n\ndata BigProduct = BigProduct\n    {
  theList   :: [Int]\n    , theSum    :: Sum Double\n    , theString :: String\n    }
  deriving (Generic, Eq)\n    deriving Semigroup via GenericSemigroup BigProduct\n
  \   deriving Monoid    via GenericMonoid BigProduct\n\nuseIt :: Bool\nuseIt = (mempty
  <> mempty) == BigProduct [] 0 \"\"\n```\n"
license-name: BSD3

Update from Hackage at 2018-12-12T04:13:30Z
Update from Hackage at 2018-12-12T04:13:30Z
