Copyright | (C) 2012-2016 Edward Kmett |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | Edward Kmett <ekmett@gmail.com> |
Stability | experimental |
Portability | non-portable |
Safe Haskell | Safe |
Language | Haskell98 |
Synopsis
- newtype Folding f a = Folding {
- getFolding :: f a
- newtype Traversed a f = Traversed {
- getTraversed :: f a
- newtype Sequenced a m = Sequenced {
- getSequenced :: m a
- data Max a
- getMax :: Max a -> Maybe a
- data Min a
- getMin :: Min a -> Maybe a
- data Leftmost a
- getLeftmost :: Leftmost a -> Maybe a
- data Rightmost a
- getRightmost :: Rightmost a -> Maybe a
- data ReifiedMonoid a = ReifiedMonoid {
- reifiedMappend :: a -> a -> a
- reifiedMempty :: a
- newtype NonEmptyDList a = NonEmptyDList {
- getNonEmptyDList :: [a] -> NonEmpty a
Monoids for folding
A Monoid
for a Contravariant
Applicative
.
Folding | |
|
Instances
(Contravariant f, Apply f) => Semigroup (Folding f a) Source # | |
(Contravariant f, Applicative f) => Monoid (Folding f a) Source # | |
newtype Traversed a f Source #
Used internally by traverseOf_
and the like.
The argument a
of the result should not be used!
Traversed | |
|
newtype Sequenced a m Source #
Used internally by mapM_
and the like.
The argument a
of the result should not be used!
Sequenced | |
|
Used for maximumOf
.
Used for minimumOf
.
getLeftmost :: Leftmost a -> Maybe a Source #
getRightmost :: Rightmost a -> Maybe a Source #
data ReifiedMonoid a #
ReifiedMonoid | |
|
Semigroups for folding
newtype NonEmptyDList a Source #
NonEmptyDList | |
|
Instances
Semigroup (NonEmptyDList a) Source # | |
(<>) :: NonEmptyDList a -> NonEmptyDList a -> NonEmptyDList a # sconcat :: NonEmpty (NonEmptyDList a) -> NonEmptyDList a # stimes :: Integral b => b -> NonEmptyDList a -> NonEmptyDList a # |