| Copyright | (c) Ross Paterson 2024 |
|---|---|
| License | BSD-style (see the file LICENSE) |
| Maintainer | R.Paterson@city.ac.uk |
| Stability | provisional |
| Portability | portable |
| Safe Haskell | None |
| Language | Haskell2010 |
Data.YAP.MonoidAdaptors
Description
Generalized versions of the monoid adaptor types from Data.Semigroup.
Documentation
A redefinition of the Sum adaptor from Data.Semigroup with
more general instances.
Constructors
| Sum a |
Instances
| Foldable Sum Source # | |||||
Defined in Data.YAP.MonoidAdaptors Methods fold :: Monoid m => Sum m -> m # foldMap :: Monoid m => (a -> m) -> Sum a -> m # foldMap' :: Monoid m => (a -> m) -> Sum a -> m # foldr :: (a -> b -> b) -> b -> Sum a -> b # foldr' :: (a -> b -> b) -> b -> Sum a -> b # foldl :: (b -> a -> b) -> b -> Sum a -> b # foldl' :: (b -> a -> b) -> b -> Sum a -> b # foldr1 :: (a -> a -> a) -> Sum a -> a # foldl1 :: (a -> a -> a) -> Sum a -> a # elem :: Eq a => a -> Sum a -> Bool # maximum :: Ord a => Sum a -> a # | |||||
| Traversable Sum Source # | |||||
| Applicative Sum Source # | |||||
| Functor Sum Source # | |||||
| Monad Sum Source # | |||||
| Generic1 Sum Source # | |||||
Defined in Data.YAP.MonoidAdaptors Associated Types
| |||||
| Data a => Data (Sum a) Source # | |||||
Defined in Data.YAP.MonoidAdaptors Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Sum a -> c (Sum a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Sum a) # dataTypeOf :: Sum a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Sum a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Sum a)) # gmapT :: (forall b. Data b => b -> b) -> Sum a -> Sum a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Sum a -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Sum a -> r # gmapQ :: (forall d. Data d => d -> u) -> Sum a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Sum a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Sum a -> m (Sum a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Sum a -> m (Sum a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Sum a -> m (Sum a) # | |||||
| AdditiveMonoid a => Monoid (Sum a) Source # | |||||
| AdditiveMonoid a => Semigroup (Sum a) Source # | |||||
| Bounded a => Bounded (Sum a) Source # | |||||
| Generic (Sum a) Source # | |||||
Defined in Data.YAP.MonoidAdaptors Associated Types
| |||||
| Read a => Read (Sum a) Source # | |||||
| Show a => Show (Sum a) Source # | |||||
| Eq a => Eq (Sum a) Source # | |||||
| Ord a => Ord (Sum a) Source # | |||||
| AbelianGroup a => AbelianGroup (Sum a) Source # | |||||
| AdditiveMonoid a => AdditiveMonoid (Sum a) Source # | |||||
| Num a => Num (Sum a) Source # | |||||
| Ring a => Ring (Sum a) Source # | |||||
Defined in Data.YAP.MonoidAdaptors Methods fromInteger :: Integer -> Sum a Source # | |||||
| Semiring a => Semiring (Sum a) Source # | |||||
| ToRational a => ToRational (Sum a) Source # | |||||
Defined in Data.YAP.MonoidAdaptors Methods toRational :: Sum a -> Rational Source # | |||||
| type Rep1 Sum Source # | |||||
Defined in Data.YAP.MonoidAdaptors | |||||
| type Rep (Sum a) Source # | |||||
Defined in Data.YAP.MonoidAdaptors | |||||
A redefinition of the Product adaptor from Data.Semigroup with
more general instances.
Constructors
| Product a |
Instances
| Foldable Product Source # | |||||
Defined in Data.YAP.MonoidAdaptors Methods fold :: Monoid m => Product m -> m # foldMap :: Monoid m => (a -> m) -> Product a -> m # foldMap' :: Monoid m => (a -> m) -> Product a -> m # foldr :: (a -> b -> b) -> b -> Product a -> b # foldr' :: (a -> b -> b) -> b -> Product a -> b # foldl :: (b -> a -> b) -> b -> Product a -> b # foldl' :: (b -> a -> b) -> b -> Product a -> b # foldr1 :: (a -> a -> a) -> Product a -> a # foldl1 :: (a -> a -> a) -> Product a -> a # elem :: Eq a => a -> Product a -> Bool # maximum :: Ord a => Product a -> a # minimum :: Ord a => Product a -> a # | |||||
| Traversable Product Source # | |||||
| Applicative Product Source # | |||||
| Functor Product Source # | |||||
| Monad Product Source # | |||||
| Generic1 Product Source # | |||||
Defined in Data.YAP.MonoidAdaptors Associated Types
| |||||
| Data a => Data (Product a) Source # | |||||
Defined in Data.YAP.MonoidAdaptors Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Product a -> c (Product a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Product a) # toConstr :: Product a -> Constr # dataTypeOf :: Product a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Product a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Product a)) # gmapT :: (forall b. Data b => b -> b) -> Product a -> Product a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Product a -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Product a -> r # gmapQ :: (forall d. Data d => d -> u) -> Product a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Product a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Product a -> m (Product a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Product a -> m (Product a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Product a -> m (Product a) # | |||||
| Semiring a => Monoid (Product a) Source # | |||||
| Semiring a => Semigroup (Product a) Source # | |||||
| Bounded a => Bounded (Product a) Source # | |||||
| Generic (Product a) Source # | |||||
Defined in Data.YAP.MonoidAdaptors Associated Types
| |||||
| Read a => Read (Product a) Source # | |||||
| Show a => Show (Product a) Source # | |||||
| Eq a => Eq (Product a) Source # | |||||
| Ord a => Ord (Product a) Source # | |||||
| AbelianGroup a => AbelianGroup (Product a) Source # | |||||
| AdditiveMonoid a => AdditiveMonoid (Product a) Source # | |||||
| Num a => Num (Product a) Source # | |||||
| Ring a => Ring (Product a) Source # | |||||
Defined in Data.YAP.MonoidAdaptors Methods fromInteger :: Integer -> Product a Source # | |||||
| Semiring a => Semiring (Product a) Source # | |||||
| ToRational a => ToRational (Product a) Source # | |||||
Defined in Data.YAP.MonoidAdaptors Methods toRational :: Product a -> Rational Source # | |||||
| type Rep1 Product Source # | |||||
Defined in Data.YAP.MonoidAdaptors | |||||
| type Rep (Product a) Source # | |||||
Defined in Data.YAP.MonoidAdaptors | |||||