reducers-3.12.3: 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 | Trustworthy
Language | Haskell98

Data.Semigroup.Alt

Description

A semigroup for working `Alt` or `Plus`

Synopsis

- newtype Alter f a = Alter {
  - getAlter :: f a
  }

# Documentation

newtype Alter f a Source #

A `Alter` turns any `Alt` instance into a `Semigroup`.

Constructors

Alter |

Fields

- getAlter :: f a

#### Instances

Instances details

Functor f => Functor (Alter f) Source # |
Instance details Defined in Data.Semigroup.Alt Methods fmap :: (a -> b) -> Alter f a -> Alter f b # (<$) :: a -> Alter f b -> Alter f a #
Plus f => Plus (Alter f) Source # |
Instance details Defined in Data.Semigroup.Alt Methods zero :: Alter f a Source #
Alt f => Alt (Alter f) Source # |
Instance details Defined in Data.Semigroup.Alt Methods (<!>) :: Alter f a -> Alter f a -> Alter f a Source # some :: Applicative (Alter f) => Alter f a -> Alter f [a] Source # many :: Applicative (Alter f) => Alter f a -> Alter f [a] Source #
Alt f => Reducer (f a) (Alter f a) Source # |
Instance details Defined in Data.Semigroup.Alt Methods unit :: f a -> Alter f a Source # snoc :: Alter f a -> f a -> Alter f a Source # cons :: f a -> Alter f a -> Alter f a Source #
Alt f => Semigroup (Alter f a) Source # |
Instance details Defined in Data.Semigroup.Alt Methods (<>) :: Alter f a -> Alter f a -> Alter f a sconcat :: NonEmpty (Alter f a) -> Alter f a stimes :: Integral b => b -> Alter f a -> Alter f a
Plus f => Monoid (Alter f a) Source # |
Instance details Defined in Data.Semigroup.Alt Methods mempty :: Alter f a mappend :: Alter f a -> Alter f a -> Alter f a mconcat :: [Alter f a] -> Alter f a