| 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-Inferred |
| Language | Haskell2010 |
Control.Lens.Internal.Fold
Description
Synopsis
- newtype Folding (f :: Type -> Type) a = Folding {
- getFolding :: f a
- newtype Traversed a (f :: Type -> Type) = Traversed {
- getTraversed :: f a
- newtype TraversedF a (f :: Type -> Type) = TraversedF {
- getTraversedF :: f a
- newtype Sequenced a (m :: Type -> Type) = Sequenced {
- getSequenced :: m 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
newtype Folding (f :: Type -> Type) a Source #
A Monoid for a Contravariant Applicative.
Constructors
| Folding | |
Fields
| |
Instances
| (Contravariant f, Applicative f) => Monoid (Folding f a) Source # | |
| (Contravariant f, Applicative f) => Semigroup (Folding f a) Source # | |
newtype Traversed a (f :: Type -> Type) Source #
Used internally by traverseOf_ and the like.
The argument a of the result should not be used!
Constructors
| Traversed | |
Fields
| |
Instances
| Applicative f => Monoid (Traversed a f) Source # | |
| Applicative f => Semigroup (Traversed a f) Source # | |
newtype TraversedF a (f :: Type -> Type) Source #
Used internally by traverse1Of_ and the like.
Since: 4.16
Constructors
| TraversedF | |
Fields
| |
Instances
| (Apply f, Applicative f) => Monoid (TraversedF a f) Source # | |
Defined in Control.Lens.Internal.Fold Methods mempty :: TraversedF a f # mappend :: TraversedF a f -> TraversedF a f -> TraversedF a f # mconcat :: [TraversedF a f] -> TraversedF a f # | |
| Apply f => Semigroup (TraversedF a f) Source # | |
Defined in Control.Lens.Internal.Fold Methods (<>) :: TraversedF a f -> TraversedF a f -> TraversedF a f # sconcat :: NonEmpty (TraversedF a f) -> TraversedF a f # stimes :: Integral b => b -> TraversedF a f -> TraversedF a f # | |
newtype Sequenced a (m :: Type -> Type) Source #
Used internally by mapM_ and the like.
The argument a of the result should not be used!
See 4.16 Changelog entry for the explanation of "why not Apply f =>"?
Constructors
| Sequenced | |
Fields
| |
getLeftmost :: Leftmost a -> Maybe a Source #
getRightmost :: Rightmost a -> Maybe a Source #
data ReifiedMonoid a Source #
Constructors
| ReifiedMonoid | |
Fields
| |
Semigroups for folding
newtype NonEmptyDList a Source #
Constructors
| NonEmptyDList | |
Fields
| |
Instances
| Semigroup (NonEmptyDList a) Source # | |
Defined in Control.Lens.Internal.Fold Methods (<>) :: NonEmptyDList a -> NonEmptyDList a -> NonEmptyDList a # sconcat :: NonEmpty (NonEmptyDList a) -> NonEmptyDList a # stimes :: Integral b => b -> NonEmptyDList a -> NonEmptyDList a # | |