Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Synopsis
- genericMappend :: (Generic a, MappendProduct (Rep a)) => a -> a -> a
- newtype GenericSemigroup a = GenericSemigroup a
Documentation
genericMappend :: (Generic a, MappendProduct (Rep a)) => a -> a -> a Source #
newtype GenericSemigroup a Source #
A newtype which allows you to using the DerivingVia
extension
to reduce boilerplate.
data X = X [Int] String deriving (Generic, Show) deriving Semigroup via GenericSemigroup X
Instances
(Generic a, MappendProduct (Rep a)) => Semigroup (GenericSemigroup a) Source # | |
Defined in Data.Semigroup.Generic (<>) :: GenericSemigroup a -> GenericSemigroup a -> GenericSemigroup a # sconcat :: NonEmpty (GenericSemigroup a) -> GenericSemigroup a # stimes :: Integral b => b -> GenericSemigroup a -> GenericSemigroup a # |