reducers-3.12.2: Semigroups, specialized containers and a general map/reduce framework

Copyright | (c) Edward Kmett 2009-2011
License | BSD-style
Maintainer | ekmett@gmail.com
Stability | experimental
Portability | non-portable (MPTCs)
Safe Haskell | Safe
Language | Haskell98

Data.Semigroup.Reducer.With

Description

Synopsis

- newtype WithReducer m c = WithReducer {
  - withoutReducer :: c
  }

# Documentation

newtype WithReducer m c Source #

If `m` is a `c`-Reducer, then m is `(c `WithReducer` m)`-Reducer This can be used to quickly select a Reducer for use as a `FingerTree` `measure`.

Constructors

WithReducer |

Fields

- withoutReducer :: c

Instances

(Monoid m, Reducer c m) => Measured m (WithReducer m c) Source # |
Methods measure :: WithReducer m c -> m #
Functor (WithReducer m) Source # |
Methods fmap :: (a -> b) -> WithReducer m a -> WithReducer m b # (<$) :: a -> WithReducer m b -> WithReducer m a #
Foldable (WithReducer m) Source # |

Methods

fold :: Monoid m => WithReducer m m -> m #

foldMap :: Monoid m => (a -> m) -> WithReducer m a -> m #

foldr :: (a -> b -> b) -> b -> WithReducer m a -> b #

foldr' :: (a -> b -> b) -> b -> WithReducer m a -> b #

foldl :: (b -> a -> b) -> b -> WithReducer m a -> b #

foldl' :: (b -> a -> b) -> b -> WithReducer m a -> b #

foldr1 :: (a -> a -> a) -> WithReducer m a -> a #

foldl1 :: (a -> a -> a) -> WithReducer m a -> a #

toList :: WithReducer m a -> [a] #

null :: WithReducer m a -> Bool #

length :: WithReducer m a -> Int #

elem :: Eq a => a -> WithReducer m a -> Bool #

maximum :: Ord a => WithReducer m a -> a #

minimum :: Ord a => WithReducer m a -> a #

sum :: Num a => WithReducer m a -> a #

product :: Num a => WithReducer m a -> a #

Traversable (WithReducer m) Source # |
Methods traverse :: Applicative f => (a -> f b) -> WithReducer m a -> f (WithReducer m b) # sequenceA :: Applicative f => WithReducer m (f a) -> f (WithReducer m a) # mapM :: Monad m => (a -> m b) -> WithReducer m a -> m (WithReducer m b) # sequence :: Monad m => WithReducer m (m a) -> m (WithReducer m a) #
Traversable1 (WithReducer m) Source # |
Methods traverse1 :: Apply f => (a -> f b) -> WithReducer m a -> f (WithReducer m b) # sequence1 :: Apply f => WithReducer m (f b) -> f (WithReducer m b) #
Foldable1 (WithReducer m) Source # |
Methods fold1 :: Semigroup m => WithReducer m m -> m # foldMap1 :: Semigroup m => (a -> m) -> WithReducer m a -> m # toNonEmpty :: WithReducer m a -> NonEmpty a #
Eq c => Eq (WithReducer m c) Source # |
Methods (==) :: WithReducer m c -> WithReducer m c -> Bool # (/=) :: WithReducer m c -> WithReducer m c -> Bool #
Ord c => Ord (WithReducer m c) Source # |

Methods

compare :: WithReducer m c -> WithReducer m c -> Ordering #

(<) :: WithReducer m c -> WithReducer m c -> Bool #

(<=) :: WithReducer m c -> WithReducer m c -> Bool #

(>) :: WithReducer m c -> WithReducer m c -> Bool #

(>=) :: WithReducer m c -> WithReducer m c -> Bool #

max :: WithReducer m c -> WithReducer m c -> WithReducer m c #

min :: WithReducer m c -> WithReducer m c -> WithReducer m c #

Read c => Read (WithReducer m c) Source # |
Methods readsPrec :: Int -> ReadS (WithReducer m c) # readList :: ReadS [WithReducer m c] # readPrec :: ReadPrec (WithReducer m c) # readListPrec :: ReadPrec [WithReducer m c] #
Show c => Show (WithReducer m c) Source # |
Methods showsPrec :: Int -> WithReducer m c -> ShowS # show :: WithReducer m c -> String # showList :: [WithReducer m c] -> ShowS #
Hashable c => Hashable (WithReducer m c) Source # |
Methods hashWithSalt :: Int -> WithReducer m c -> Int # hash :: WithReducer m c -> Int #
Reducer c m => Reducer (WithReducer m c) m Source # |
Methods unit :: WithReducer m c -> m Source # snoc :: m -> WithReducer m c -> m Source # cons :: WithReducer m c -> m -> m Source #