Copyright | (C) 2014-2015 Edward Kmett Eric Mertens |
---|---|

License | BSD-style (see the file LICENSE) |

Maintainer | Edward Kmett <ekmett@gmail.com> |

Stability | provisional |

Portability | portable |

Safe Haskell | Safe |

Language | Haskell98 |

This module provides generic deriving tools for monoids and semigroups for product-like structures.

## Synopsis

- class GSemigroup f
- gmappend :: (Generic a, GSemigroup (Rep a)) => a -> a -> a
- class GSemigroup f => GMonoid f
- gmempty :: (Generic a, GMonoid (Rep a)) => a

# Documentation

class GSemigroup f #

gmappend'

## Instances

GSemigroup (V1 :: Type -> Type) # | |

Defined in Data.Semigroup.Generic | |

GSemigroup (U1 :: Type -> Type) # | |

Defined in Data.Semigroup.Generic | |

Semigroup a => GSemigroup (K1 i a :: Type -> Type) # | |

Defined in Data.Semigroup.Generic | |

(GSemigroup f, GSemigroup g) => GSemigroup (f :*: g) # | |

Defined in Data.Semigroup.Generic | |

GSemigroup f => GSemigroup (M1 i c f) # | |

Defined in Data.Semigroup.Generic |

gmappend :: (Generic a, GSemigroup (Rep a)) => a -> a -> a #

class GSemigroup f => GMonoid f #

gmempty'

## Instances

GMonoid (U1 :: Type -> Type) # | |

Defined in Data.Semigroup.Generic | |

(Semigroup a, Monoid a) => GMonoid (K1 i a :: Type -> Type) # | |

Defined in Data.Semigroup.Generic | |

(GMonoid f, GMonoid g) => GMonoid (f :*: g) # | |

Defined in Data.Semigroup.Generic | |

GMonoid f => GMonoid (M1 i c f) # | |

Defined in Data.Semigroup.Generic |