reducers-3.12.4: 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-Inferred
Language | Haskell2010

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

Instances details

(Monoid m, Reducer c m) => Measured m (WithReducer m c) Source # |
Instance details Defined in Data.Semigroup.Reducer.With Methods measure :: WithReducer m c -> m Source #
Foldable (WithReducer m) Source # |

Instance details

Defined in Data.Semigroup.Reducer.With

Methods

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

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

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

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

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

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

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

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

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

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

null :: WithReducer m a -> Bool Source #

length :: WithReducer m a -> Int Source #

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

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

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

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

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

Traversable (WithReducer m) Source # |
Instance details Defined in Data.Semigroup.Reducer.With Methods traverse :: Applicative f => (a -> f b) -> WithReducer m a -> f (WithReducer m b) Source # sequenceA :: Applicative f => WithReducer m (f a) -> f (WithReducer m a) Source # mapM :: Monad m0 => (a -> m0 b) -> WithReducer m a -> m0 (WithReducer m b) Source # sequence :: Monad m0 => WithReducer m (m0 a) -> m0 (WithReducer m a) Source #
Functor (WithReducer m) Source # |
Instance details Defined in Data.Semigroup.Reducer.With Methods fmap :: (a -> b) -> WithReducer m a -> WithReducer m b Source # (<$) :: a -> WithReducer m b -> WithReducer m a Source #
Foldable1 (WithReducer m) Source # |
Instance details Defined in Data.Semigroup.Reducer.With Methods fold1 :: Semigroup m0 => WithReducer m m0 -> m0 Source # foldMap1 :: Semigroup m0 => (a -> m0) -> WithReducer m a -> m0 Source # toNonEmpty :: WithReducer m a -> NonEmpty a Source #
Traversable1 (WithReducer m) Source # |
Instance details Defined in Data.Semigroup.Reducer.With Methods traverse1 :: Apply f => (a -> f b) -> WithReducer m a -> f (WithReducer m b) Source # sequence1 :: Apply f => WithReducer m (f b) -> f (WithReducer m b) Source #
Read c => Read (WithReducer m c) Source # |
Instance details Defined in Data.Semigroup.Reducer.With Methods readsPrec :: Int -> ReadS (WithReducer m c) Source # readList :: ReadS [WithReducer m c] Source # readPrec :: ReadPrec (WithReducer m c) Source # readListPrec :: ReadPrec [WithReducer m c] Source #
Show c => Show (WithReducer m c) Source # |
Instance details Defined in Data.Semigroup.Reducer.With Methods showsPrec :: Int -> WithReducer m c -> ShowS Source # show :: WithReducer m c -> String Source # showList :: [WithReducer m c] -> ShowS Source #
Eq c => Eq (WithReducer m c) Source # |
Instance details Defined in Data.Semigroup.Reducer.With Methods (==) :: WithReducer m c -> WithReducer m c -> Bool Source # (/=) :: WithReducer m c -> WithReducer m c -> Bool Source #
Ord c => Ord (WithReducer m c) Source # |

Instance details

Defined in Data.Semigroup.Reducer.With

Methods

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

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

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

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

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

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

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

Hashable c => Hashable (WithReducer m c) Source # |
Instance details Defined in Data.Semigroup.Reducer.With Methods hashWithSalt :: Int -> WithReducer m c -> Int Source # hash :: WithReducer m c -> Int Source #
Reducer c m => Reducer (WithReducer m c) m Source # |
Instance details Defined in Data.Semigroup.Reducer.With Methods unit :: WithReducer m c -> m Source # snoc :: m -> WithReducer m c -> m Source # cons :: WithReducer m c -> m -> m Source #