generic-deriving-1.12.2: Generic programming library for generalised deriving.

Safe HaskellSafe
LanguageHaskell2010

Generics.Deriving.Semigroup

Contents

Synopsis

Generic semigroup class

class GSemigroup a where #

Methods

gsappend :: a -> a -> a infixr 6 #

gsappend :: (Generic a, GSemigroup' (Rep a)) => a -> a -> a infixr 6 #

gstimes :: Integral b => b -> a -> a #

gsconcat :: NonEmpty a -> a #

Only available with base-4.9 or later

Instances
GSemigroup Ordering # 
Instance details

Defined in Generics.Deriving.Semigroup

GSemigroup () # 
Instance details

Defined in Generics.Deriving.Semigroup

Methods

gsappend :: () -> () -> () #

gstimes :: Integral b => b -> () -> () #

gsconcat :: NonEmpty () -> () #

GSemigroup Void # 
Instance details

Defined in Generics.Deriving.Semigroup

Methods

gsappend :: Void -> Void -> Void #

gstimes :: Integral b => b -> Void -> Void #

gsconcat :: NonEmpty Void -> Void #

GSemigroup All # 
Instance details

Defined in Generics.Deriving.Semigroup

Methods

gsappend :: All -> All -> All #

gstimes :: Integral b => b -> All -> All #

gsconcat :: NonEmpty All -> All #

GSemigroup Any # 
Instance details

Defined in Generics.Deriving.Semigroup

Methods

gsappend :: Any -> Any -> Any #

gstimes :: Integral b => b -> Any -> Any #

gsconcat :: NonEmpty Any -> Any #

GSemigroup [a] # 
Instance details

Defined in Generics.Deriving.Semigroup

Methods

gsappend :: [a] -> [a] -> [a] #

gstimes :: Integral b => b -> [a] -> [a] #

gsconcat :: NonEmpty [a] -> [a] #

GSemigroup a => GSemigroup (Maybe a) # 
Instance details

Defined in Generics.Deriving.Semigroup

Methods

gsappend :: Maybe a -> Maybe a -> Maybe a #

gstimes :: Integral b => b -> Maybe a -> Maybe a #

gsconcat :: NonEmpty (Maybe a) -> Maybe a #

Ord a => GSemigroup (Min a) # 
Instance details

Defined in Generics.Deriving.Semigroup

Methods

gsappend :: Min a -> Min a -> Min a #

gstimes :: Integral b => b -> Min a -> Min a #

gsconcat :: NonEmpty (Min a) -> Min a #

Ord a => GSemigroup (Max a) # 
Instance details

Defined in Generics.Deriving.Semigroup

Methods

gsappend :: Max a -> Max a -> Max a #

gstimes :: Integral b => b -> Max a -> Max a #

gsconcat :: NonEmpty (Max a) -> Max a #

GSemigroup (First a) # 
Instance details

Defined in Generics.Deriving.Semigroup

Methods

gsappend :: First a -> First a -> First a #

gstimes :: Integral b => b -> First a -> First a #

gsconcat :: NonEmpty (First a) -> First a #

GSemigroup (Last a) # 
Instance details

Defined in Generics.Deriving.Semigroup

Methods

gsappend :: Last a -> Last a -> Last a #

gstimes :: Integral b => b -> Last a -> Last a #

gsconcat :: NonEmpty (Last a) -> Last a #

GMonoid m => GSemigroup (WrappedMonoid m) # 
Instance details

Defined in Generics.Deriving.Semigroup

GSemigroup a => GSemigroup (Option a) # 
Instance details

Defined in Generics.Deriving.Semigroup

Methods

gsappend :: Option a -> Option a -> Option a #

gstimes :: Integral b => b -> Option a -> Option a #

gsconcat :: NonEmpty (Option a) -> Option a #

GSemigroup a => GSemigroup (Identity a) # 
Instance details

Defined in Generics.Deriving.Semigroup

Methods

gsappend :: Identity a -> Identity a -> Identity a #

gstimes :: Integral b => b -> Identity a -> Identity a #

gsconcat :: NonEmpty (Identity a) -> Identity a #

GSemigroup (First a) # 
Instance details

Defined in Generics.Deriving.Semigroup

Methods

gsappend :: First a -> First a -> First a #

gstimes :: Integral b => b -> First a -> First a #

gsconcat :: NonEmpty (First a) -> First a #

GSemigroup (Last a) # 
Instance details

Defined in Generics.Deriving.Semigroup

Methods

gsappend :: Last a -> Last a -> Last a #

gstimes :: Integral b => b -> Last a -> Last a #

gsconcat :: NonEmpty (Last a) -> Last a #

GSemigroup a => GSemigroup (Dual a) # 
Instance details

Defined in Generics.Deriving.Semigroup

Methods

gsappend :: Dual a -> Dual a -> Dual a #

gstimes :: Integral b => b -> Dual a -> Dual a #

gsconcat :: NonEmpty (Dual a) -> Dual a #

GSemigroup (Endo a) # 
Instance details

Defined in Generics.Deriving.Semigroup

Methods

gsappend :: Endo a -> Endo a -> Endo a #

gstimes :: Integral b => b -> Endo a -> Endo a #

gsconcat :: NonEmpty (Endo a) -> Endo a #

Num a => GSemigroup (Sum a) # 
Instance details

Defined in Generics.Deriving.Semigroup

Methods

gsappend :: Sum a -> Sum a -> Sum a #

gstimes :: Integral b => b -> Sum a -> Sum a #

gsconcat :: NonEmpty (Sum a) -> Sum a #

Num a => GSemigroup (Product a) # 
Instance details

Defined in Generics.Deriving.Semigroup

Methods

gsappend :: Product a -> Product a -> Product a #

gstimes :: Integral b => b -> Product a -> Product a #

gsconcat :: NonEmpty (Product a) -> Product a #

GSemigroup a => GSemigroup (Down a) # 
Instance details

Defined in Generics.Deriving.Semigroup

Methods

gsappend :: Down a -> Down a -> Down a #

gstimes :: Integral b => b -> Down a -> Down a #

gsconcat :: NonEmpty (Down a) -> Down a #

GSemigroup (NonEmpty a) # 
Instance details

Defined in Generics.Deriving.Semigroup

Methods

gsappend :: NonEmpty a -> NonEmpty a -> NonEmpty a #

gstimes :: Integral b => b -> NonEmpty a -> NonEmpty a #

gsconcat :: NonEmpty (NonEmpty a) -> NonEmpty a #

GSemigroup b => GSemigroup (a -> b) # 
Instance details

Defined in Generics.Deriving.Semigroup

Methods

gsappend :: (a -> b) -> (a -> b) -> a -> b #

gstimes :: Integral b0 => b0 -> (a -> b) -> a -> b #

gsconcat :: NonEmpty (a -> b) -> a -> b #

GSemigroup (Either a b) # 
Instance details

Defined in Generics.Deriving.Semigroup

Methods

gsappend :: Either a b -> Either a b -> Either a b #

gstimes :: Integral b0 => b0 -> Either a b -> Either a b #

gsconcat :: NonEmpty (Either a b) -> Either a b #

(GSemigroup a, GSemigroup b) => GSemigroup (a, b) # 
Instance details

Defined in Generics.Deriving.Semigroup

Methods

gsappend :: (a, b) -> (a, b) -> (a, b) #

gstimes :: Integral b0 => b0 -> (a, b) -> (a, b) #

gsconcat :: NonEmpty (a, b) -> (a, b) #

GSemigroup (Proxy s) # 
Instance details

Defined in Generics.Deriving.Semigroup

Methods

gsappend :: Proxy s -> Proxy s -> Proxy s #

gstimes :: Integral b => b -> Proxy s -> Proxy s #

gsconcat :: NonEmpty (Proxy s) -> Proxy s #

(GSemigroup a, GSemigroup b, GSemigroup c) => GSemigroup (a, b, c) # 
Instance details

Defined in Generics.Deriving.Semigroup

Methods

gsappend :: (a, b, c) -> (a, b, c) -> (a, b, c) #

gstimes :: Integral b0 => b0 -> (a, b, c) -> (a, b, c) #

gsconcat :: NonEmpty (a, b, c) -> (a, b, c) #

GSemigroup a => GSemigroup (Const a b) # 
Instance details

Defined in Generics.Deriving.Semigroup

Methods

gsappend :: Const a b -> Const a b -> Const a b #

gstimes :: Integral b0 => b0 -> Const a b -> Const a b #

gsconcat :: NonEmpty (Const a b) -> Const a b #

Alternative f => GSemigroup (Alt f a) # 
Instance details

Defined in Generics.Deriving.Semigroup

Methods

gsappend :: Alt f a -> Alt f a -> Alt f a #

gstimes :: Integral b => b -> Alt f a -> Alt f a #

gsconcat :: NonEmpty (Alt f a) -> Alt f a #

(GSemigroup a, GSemigroup b, GSemigroup c, GSemigroup d) => GSemigroup (a, b, c, d) # 
Instance details

Defined in Generics.Deriving.Semigroup

Methods

gsappend :: (a, b, c, d) -> (a, b, c, d) -> (a, b, c, d) #

gstimes :: Integral b0 => b0 -> (a, b, c, d) -> (a, b, c, d) #

gsconcat :: NonEmpty (a, b, c, d) -> (a, b, c, d) #

(GSemigroup a, GSemigroup b, GSemigroup c, GSemigroup d, GSemigroup e) => GSemigroup (a, b, c, d, e) # 
Instance details

Defined in Generics.Deriving.Semigroup

Methods

gsappend :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) #

gstimes :: Integral b0 => b0 -> (a, b, c, d, e) -> (a, b, c, d, e) #

gsconcat :: NonEmpty (a, b, c, d, e) -> (a, b, c, d, e) #

(GSemigroup a, GSemigroup b, GSemigroup c, GSemigroup d, GSemigroup e, GSemigroup f) => GSemigroup (a, b, c, d, e, f) # 
Instance details

Defined in Generics.Deriving.Semigroup

Methods

gsappend :: (a, b, c, d, e, f) -> (a, b, c, d, e, f) -> (a, b, c, d, e, f) #

gstimes :: Integral b0 => b0 -> (a, b, c, d, e, f) -> (a, b, c, d, e, f) #

gsconcat :: NonEmpty (a, b, c, d, e, f) -> (a, b, c, d, e, f) #

(GSemigroup a, GSemigroup b, GSemigroup c, GSemigroup d, GSemigroup e, GSemigroup f, GSemigroup g) => GSemigroup (a, b, c, d, e, f, g) # 
Instance details

Defined in Generics.Deriving.Semigroup

Methods

gsappend :: (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) #

gstimes :: Integral b0 => b0 -> (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) #

gsconcat :: NonEmpty (a, b, c, d, e, f, g) -> (a, b, c, d, e, f, g) #

(GSemigroup a, GSemigroup b, GSemigroup c, GSemigroup d, GSemigroup e, GSemigroup f, GSemigroup g, GSemigroup h) => GSemigroup (a, b, c, d, e, f, g, h) # 
Instance details

Defined in Generics.Deriving.Semigroup

Methods

gsappend :: (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) #

gstimes :: Integral b0 => b0 -> (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) #

gsconcat :: NonEmpty (a, b, c, d, e, f, g, h) -> (a, b, c, d, e, f, g, h) #

Default definition

gsappenddefault :: (Generic a, GSemigroup' (Rep a)) => a -> a -> a infixr 6 #

Internal semigroup class

class GSemigroup' f where #

Minimal complete definition

gsappend'

Methods

gsappend' :: f x -> f x -> f x infixr 6 #

Instances
GSemigroup' (U1 :: k -> *) # 
Instance details

Defined in Generics.Deriving.Semigroup

Methods

gsappend' :: U1 x -> U1 x -> U1 x #

(GSemigroup' f, GSemigroup' g) => GSemigroup' (f :*: g :: k -> *) # 
Instance details

Defined in Generics.Deriving.Semigroup

Methods

gsappend' :: (f :*: g) x -> (f :*: g) x -> (f :*: g) x #

GSemigroup a => GSemigroup' (K1 i a :: k -> *) # 
Instance details

Defined in Generics.Deriving.Semigroup

Methods

gsappend' :: K1 i a x -> K1 i a x -> K1 i a x #

GSemigroup' f => GSemigroup' (M1 i c f :: k -> *) # 
Instance details

Defined in Generics.Deriving.Semigroup

Methods

gsappend' :: M1 i c f x -> M1 i c f x -> M1 i c f x #