foldl-1.4.18: Composable, streaming, and efficient left folds

Safe Haskell | None
Language | Haskell2010

Control.Foldl.ByteString

Contents

- Folding
- Folds
- Re-exports

Description

Folds for byte streams

Synopsis

- fold :: Fold ByteString a -> ByteString -> a
- foldM :: Monad m => FoldM m ByteString a -> ByteString -> m a
- head :: Fold ByteString (Maybe Word8)
- last :: Fold ByteString (Maybe Word8)
- null :: Fold ByteString Bool
- length :: Num n => Fold ByteString n
- any :: (Word8 -> Bool) -> Fold ByteString Bool
- all :: (Word8 -> Bool) -> Fold ByteString Bool
- maximum :: Fold ByteString (Maybe Word8)
- minimum :: Fold ByteString (Maybe Word8)
- elem :: Word8 -> Fold ByteString Bool
- notElem :: Word8 -> Fold ByteString Bool
- find :: (Word8 -> Bool) -> Fold ByteString (Maybe Word8)
- index :: Integral n => n -> Fold ByteString (Maybe Word8)
- elemIndex :: Num n => Word8 -> Fold ByteString (Maybe n)
- findIndex :: Num n => (Word8 -> Bool) -> Fold ByteString (Maybe n)
- count :: Num n => Word8 -> Fold ByteString n
- lazy :: Fold ByteString ByteString
- class Foldable (t :: Type -> Type)
- data Fold a b
- data FoldM (m :: Type -> Type) a b
- data ByteString
- data Word8

# Folding

fold :: Fold ByteString a -> ByteString -> a #

Apply a strict left `Fold` to a lazy bytestring

foldM :: Monad m => FoldM m ByteString a -> ByteString -> m a #

Apply a strict monadic left `FoldM` to a lazy bytestring

# Folds

head :: Fold ByteString (Maybe Word8) #

Get the first byte of a byte stream or return `Nothing` if the stream is empty

last :: Fold ByteString (Maybe Word8) #

Get the last byte of a byte stream or return `Nothing` if the byte stream is empty

null :: Fold ByteString Bool #

Returns `True` if the byte stream is empty, `False` otherwise

length :: Num n => Fold ByteString n #

Return the length of the byte stream in bytes

any :: (Word8 -> Bool) -> Fold ByteString Bool #

`(any predicate)` returns `True` if any byte satisfies the predicate, `False` otherwise

all :: (Word8 -> Bool) -> Fold ByteString Bool #

`(all predicate)` returns `True` if all bytes satisfy the predicate, `False` otherwise

maximum :: Fold ByteString (Maybe Word8) #

Computes the maximum byte

minimum :: Fold ByteString (Maybe Word8) #

Computes the minimum byte

elem :: Word8 -> Fold ByteString Bool #

`(elem w8)` returns `True` if the byte stream has a byte equal to `w8`, `False` otherwise

notElem :: Word8 -> Fold ByteString Bool #

`(notElem w8)` returns `False` if the byte stream has a byte equal to `w8`, `True` otherwise

find :: (Word8 -> Bool) -> Fold ByteString (Maybe Word8) #

`(find predicate)` returns the first byte that satisfies the predicate or `Nothing` if no byte satisfies the predicate

index :: Integral n => n -> Fold ByteString (Maybe Word8) #

`(index n)` returns the `n`th byte of the byte stream, or `Nothing` if the stream has an insufficient number of bytes

elemIndex :: Num n => Word8 -> Fold ByteString (Maybe n) #

`(elemIndex w8)` returns the index of the first byte that equals `w8`, or `Nothing` if no byte matches

findIndex :: Num n => (Word8 -> Bool) -> Fold ByteString (Maybe n) #

`(findIndex predicate)` returns the index of the first byte that satisfies the predicate, or `Nothing` if no byte satisfies the predicate

count :: Num n => Word8 -> Fold ByteString n #

`count w8` returns the number of times `w8` appears

lazy :: Fold ByteString ByteString #

Combine all the strict `ByteString` chunks to build a lazy `ByteString`

# Re-exports

Control.Foldl re-exports the `Fold` type

`Data.ByteString` re-exports the `ByteString` type

`Data.Word` re-exports the `Word8` type

class Foldable (t :: Type -> Type) #

The Foldable class represents data structures that can be reduced to a summary value one element at a time. Strict left-associative folds are a good fit for space-efficient reduction, while lazy right-associative folds are a good fit for corecursive iteration, or for folds that short-circuit after processing an initial subsequence of the structure's elements.

Instances can be derived automatically by enabling the `DeriveFoldable` extension. For example, a derived instance for a binary tree might be:

    {-# LANGUAGE DeriveFoldable #-}
    data Tree a = Empty
                | Leaf a
                | Node (Tree a) a (Tree a)
        deriving Foldable

A more detailed description can be found in the Overview section of Data.Foldable.

For the class laws see the Laws section of Data.Foldable.

Minimal complete definition

foldMap | foldr

#### Instances

Instances details

Foldable Complex | Since: base-4.9.0.0
Instance details Defined in Data.Complex Methods fold :: Monoid m => Complex m -> m # foldMap :: Monoid m => (a -> m) -> Complex a -> m # foldMap' :: Monoid m => (a -> m) -> Complex a -> m # foldr :: (a -> b -> b) -> b -> Complex a -> b # foldr' :: (a -> b -> b) -> b -> Complex a -> b # foldl :: (b -> a -> b) -> b -> Complex a -> b # foldl' :: (b -> a -> b) -> b -> Complex a -> b # foldr1 :: (a -> a -> a) -> Complex a -> a # foldl1 :: (a -> a -> a) -> Complex a -> a # toList :: Complex a -> [a] # null :: Complex a -> Bool # length :: Complex a -> Int # elem :: Eq a => a -> Complex a -> Bool # maximum :: Ord a => Complex a -> a # minimum :: Ord a => Complex a -> a # sum :: Num a => Complex a -> a # product :: Num a => Complex a -> a #
Foldable First | Since: base-4.9.0.0
Instance details Defined in Data.Semigroup Methods fold :: Monoid m => First m -> m # foldMap :: Monoid m => (a -> m) -> First a -> m # foldMap' :: Monoid m => (a -> m) -> First a -> m # foldr :: (a -> b -> b) -> b -> First a -> b # foldr' :: (a -> b -> b) -> b -> First a -> b # foldl :: (b -> a -> b) -> b -> First a -> b # foldl' :: (b -> a -> b) -> b -> First a -> b # foldr1 :: (a -> a -> a) -> First a -> a # foldl1 :: (a -> a -> a) -> First a -> a # toList :: First a -> [a] # null :: First a -> Bool # length :: First a -> Int # elem :: Eq a => a -> First a -> Bool # maximum :: Ord a => First a -> a # minimum :: Ord a => First a -> a # sum :: Num a => First a -> a # product :: Num a => First a -> a #
Foldable Last | Since: base-4.9.0.0
Instance details Defined in Data.Semigroup Methods fold :: Monoid m => Last m -> m # foldMap :: Monoid m => (a -> m) -> Last a -> m # foldMap' :: Monoid m => (a -> m) -> Last a -> m # foldr :: (a -> b -> b) -> b -> Last a -> b # foldr' :: (a -> b -> b) -> b -> Last a -> b # foldl :: (b -> a -> b) -> b -> Last a -> b # foldl' :: (b -> a -> b) -> b -> Last a -> b # foldr1 :: (a -> a -> a) -> Last a -> a # foldl1 :: (a -> a -> a) -> Last a -> a # toList :: Last a -> [a] # null :: Last a -> Bool # length :: Last a -> Int # elem :: Eq a => a -> Last a -> Bool # maximum :: Ord a => Last a -> a # minimum :: Ord a => Last a -> a # sum :: Num a => Last a -> a # product :: Num a => Last a -> a #
Foldable Max | Since: base-4.9.0.0
Instance details Defined in Data.Semigroup Methods fold :: Monoid m => Max m -> m # foldMap :: Monoid m => (a -> m) -> Max a -> m # foldMap' :: Monoid m => (a -> m) -> Max a -> m # foldr :: (a -> b -> b) -> b -> Max a -> b # foldr' :: (a -> b -> b) -> b -> Max a -> b # foldl :: (b -> a -> b) -> b -> Max a -> b # foldl' :: (b -> a -> b) -> b -> Max a -> b # foldr1 :: (a -> a -> a) -> Max a -> a # foldl1 :: (a -> a -> a) -> Max a -> a # toList :: Max a -> [a] # null :: Max a -> Bool # length :: Max a -> Int # elem :: Eq a => a -> Max a -> Bool # maximum :: Ord a => Max a -> a # minimum :: Ord a => Max a -> a # sum :: Num a => Max a -> a # product :: Num a => Max a -> a #
Foldable Min | Since: base-4.9.0.0
Instance details Defined in Data.Semigroup Methods fold :: Monoid m => Min m -> m # foldMap :: Monoid m => (a -> m) -> Min a -> m # foldMap' :: Monoid m => (a -> m) -> Min a -> m # foldr :: (a -> b -> b) -> b -> Min a -> b # foldr' :: (a -> b -> b) -> b -> Min a -> b # foldl :: (b -> a -> b) -> b -> Min a -> b # foldl' :: (b -> a -> b) -> b -> Min a -> b # foldr1 :: (a -> a -> a) -> Min a -> a # foldl1 :: (a -> a -> a) -> Min a -> a # toList :: Min a -> [a] # null :: Min a -> Bool # length :: Min a -> Int # elem :: Eq a => a -> Min a -> Bool # maximum :: Ord a => Min a -> a # minimum :: Ord a => Min a -> a # sum :: Num a => Min a -> a # product :: Num a => Min a -> a #
Foldable SCC | Since: containers-0.5.9
Instance details Defined in Data.Graph Methods fold :: Monoid m => SCC m -> m # foldMap :: Monoid m => (a -> m) -> SCC a -> m # foldMap' :: Monoid m => (a -> m) -> SCC a -> m # foldr :: (a -> b -> b) -> b -> SCC a -> b # foldr' :: (a -> b -> b) -> b -> SCC a -> b # foldl :: (b -> a -> b) -> b -> SCC a -> b # foldl' :: (b -> a -> b) -> b -> SCC a -> b # foldr1 :: (a -> a -> a) -> SCC a -> a # foldl1 :: (a -> a -> a) -> SCC a -> a # toList :: SCC a -> [a] # null :: SCC a -> Bool # length :: SCC a -> Int # elem :: Eq a => a -> SCC a -> Bool # maximum :: Ord a => SCC a -> a # minimum :: Ord a => SCC a -> a # sum :: Num a => SCC a -> a # product :: Num a => SCC a -> a #
Foldable IntMap | Folds in order of increasing key.
Instance details Defined in Data.IntMap.Internal Methods fold :: Monoid m => IntMap m -> m # foldMap :: Monoid m => (a -> m) -> IntMap a -> m # foldMap' :: Monoid m => (a -> m) -> IntMap a -> m # foldr :: (a -> b -> b) -> b -> IntMap a -> b # foldr' :: (a -> b -> b) -> b -> IntMap a -> b # foldl :: (b -> a -> b) -> b -> IntMap a -> b # foldl' :: (b -> a -> b) -> b -> IntMap a -> b # foldr1 :: (a -> a -> a) -> IntMap a -> a # foldl1 :: (a -> a -> a) -> IntMap a -> a # toList :: IntMap a -> [a] # null :: IntMap a -> Bool # length :: IntMap a -> Int # elem :: Eq a => a -> IntMap a -> Bool # maximum :: Ord a => IntMap a -> a # minimum :: Ord a => IntMap a -> a # sum :: Num a => IntMap a -> a # product :: Num a => IntMap a -> a #
Foldable Digit |
Instance details Defined in Data.Sequence.Internal Methods fold :: Monoid m => Digit m -> m # foldMap :: Monoid m => (a -> m) -> Digit a -> m # foldMap' :: Monoid m => (a -> m) -> Digit a -> m # foldr :: (a -> b -> b) -> b -> Digit a -> b # foldr' :: (a -> b -> b) -> b -> Digit a -> b # foldl :: (b -> a -> b) -> b -> Digit a -> b # foldl' :: (b -> a -> b) -> b -> Digit a -> b # foldr1 :: (a -> a -> a) -> Digit a -> a # foldl1 :: (a -> a -> a) -> Digit a -> a # toList :: Digit a -> [a] # null :: Digit a -> Bool # length :: Digit a -> Int # elem :: Eq a => a -> Digit a -> Bool # maximum :: Ord a => Digit a -> a # minimum :: Ord a => Digit a -> a # sum :: Num a => Digit a -> a # product :: Num a => Digit a -> a #
Foldable Elem |
Instance details Defined in Data.Sequence.Internal Methods fold :: Monoid m => Elem m -> m # foldMap :: Monoid m => (a -> m) -> Elem a -> m # foldMap' :: Monoid m => (a -> m) -> Elem a -> m # foldr :: (a -> b -> b) -> b -> Elem a -> b # foldr' :: (a -> b -> b) -> b -> Elem a -> b # foldl :: (b -> a -> b) -> b -> Elem a -> b # foldl' :: (b -> a -> b) -> b -> Elem a -> b # foldr1 :: (a -> a -> a) -> Elem a -> a # foldl1 :: (a -> a -> a) -> Elem a -> a # toList :: Elem a -> [a] # null :: Elem a -> Bool # length :: Elem a -> Int # elem :: Eq a => a -> Elem a -> Bool # maximum :: Ord a => Elem a -> a # minimum :: Ord a => Elem a -> a # sum :: Num a => Elem a -> a # product :: Num a => Elem a -> a #
Foldable FingerTree |
Instance details Defined in Data.Sequence.Internal Methods fold :: Monoid m => FingerTree m -> m # foldMap :: Monoid m => (a -> m) -> FingerTree a -> m # foldMap' :: Monoid m => (a -> m) -> FingerTree a -> m # foldr :: (a -> b -> b) -> b -> FingerTree a -> b # foldr' :: (a -> b -> b) -> b -> FingerTree a -> b # foldl :: (b -> a -> b) -> b -> FingerTree a -> b # foldl' :: (b -> a -> b) -> b -> FingerTree a -> b # foldr1 :: (a -> a -> a) -> FingerTree a -> a # foldl1 :: (a -> a -> a) -> FingerTree a -> a # toList :: FingerTree a -> [a] # null :: FingerTree a -> Bool # length :: FingerTree a -> Int # elem :: Eq a => a -> FingerTree a -> Bool # maximum :: Ord a => FingerTree a -> a # minimum :: Ord a => FingerTree a -> a # sum :: Num a => FingerTree a -> a # product :: Num a => FingerTree a -> a #
Foldable Node |
Instance details Defined in Data.Sequence.Internal Methods fold :: Monoid m => Node m -> m # foldMap :: Monoid m => (a -> m) -> Node a -> m # foldMap' :: Monoid m => (a -> m) -> Node a -> m # foldr :: (a -> b -> b) -> b -> Node a -> b # foldr' :: (a -> b -> b) -> b -> Node a -> b # foldl :: (b -> a -> b) -> b -> Node a -> b # foldl' :: (b -> a -> b) -> b -> Node a -> b # foldr1 :: (a -> a -> a) -> Node a -> a # foldl1 :: (a -> a -> a) -> Node a -> a # toList :: Node a -> [a] # null :: Node a -> Bool # length :: Node a -> Int # elem :: Eq a => a -> Node a -> Bool # maximum :: Ord a => Node a -> a # minimum :: Ord a => Node a -> a # sum :: Num a => Node a -> a # product :: Num a => Node a -> a #
Foldable Seq |
Instance details Defined in Data.Sequence.Internal Methods fold :: Monoid m => Seq m -> m # foldMap :: Monoid m => (a -> m) -> Seq a -> m # foldMap' :: Monoid m => (a -> m) -> Seq a -> m # foldr :: (a -> b -> b) -> b -> Seq a -> b # foldr' :: (a -> b -> b) -> b -> Seq a -> b # foldl :: (b -> a -> b) -> b -> Seq a -> b # foldl' :: (b -> a -> b) -> b -> Seq a -> b # foldr1 :: (a -> a -> a) -> Seq a -> a # foldl1 :: (a -> a -> a) -> Seq a -> a # toList :: Seq a -> [a] # null :: Seq a -> Bool # length :: Seq a -> Int # elem :: Eq a => a -> Seq a -> Bool # maximum :: Ord a => Seq a -> a # minimum :: Ord a => Seq a -> a # sum :: Num a => Seq a -> a # product :: Num a => Seq a -> a #
Foldable ViewL |
Instance details Defined in Data.Sequence.Internal Methods fold :: Monoid m => ViewL m -> m # foldMap :: Monoid m => (a -> m) -> ViewL a -> m # foldMap' :: Monoid m => (a -> m) -> ViewL a -> m # foldr :: (a -> b -> b) -> b -> ViewL a -> b # foldr' :: (a -> b -> b) -> b -> ViewL a -> b # foldl :: (b -> a -> b) -> b -> ViewL a -> b # foldl' :: (b -> a -> b) -> b -> ViewL a -> b # foldr1 :: (a -> a -> a) -> ViewL a -> a # foldl1 :: (a -> a -> a) -> ViewL a -> a # toList :: ViewL a -> [a] # null :: ViewL a -> Bool # length :: ViewL a -> Int # elem :: Eq a => a -> ViewL a -> Bool # maximum :: Ord a => ViewL a -> a # minimum :: Ord a => ViewL a -> a # sum :: Num a => ViewL a -> a # product :: Num a => ViewL a -> a #
Foldable ViewR |
Instance details Defined in Data.Sequence.Internal Methods fold :: Monoid m => ViewR m -> m # foldMap :: Monoid m => (a -> m) -> ViewR a -> m # foldMap' :: Monoid m => (a -> m) -> ViewR a -> m # foldr :: (a -> b -> b) -> b -> ViewR a -> b # foldr' :: (a -> b -> b) -> b -> ViewR a -> b # foldl :: (b -> a -> b) -> b -> ViewR a -> b # foldl' :: (b -> a -> b) -> b -> ViewR a -> b # foldr1 :: (a -> a -> a) -> ViewR a -> a # foldl1 :: (a -> a -> a) -> ViewR a -> a # toList :: ViewR a -> [a] # null :: ViewR a -> Bool # length :: ViewR a -> Int # elem :: Eq a => a -> ViewR a -> Bool # maximum :: Ord a => ViewR a -> a # minimum :: Ord a => ViewR a -> a # sum :: Num a => ViewR a -> a # product :: Num a => ViewR a -> a #
Foldable Set | Folds in order of increasing key.
Instance details Defined in Data.Set.Internal Methods fold :: Monoid m => Set m -> m # foldMap :: Monoid m => (a -> m) -> Set a -> m # foldMap' :: Monoid m => (a -> m) -> Set a -> m # foldr :: (a -> b -> b) -> b -> Set a -> b # foldr' :: (a -> b -> b) -> b -> Set a -> b # foldl :: (b -> a -> b) -> b -> Set a -> b # foldl' :: (b -> a -> b) -> b -> Set a -> b # foldr1 :: (a -> a -> a) -> Set a -> a # foldl1 :: (a -> a -> a) -> Set a -> a # toList :: Set a -> [a] # null :: Set a -> Bool # length :: Set a -> Int # elem :: Eq a => a -> Set a -> Bool # maximum :: Ord a => Set a -> a # minimum :: Ord a => Set a -> a # sum :: Num a => Set a -> a # product :: Num a => Set a -> a #
Foldable Tree | Folds in preorder
Instance details Defined in Data.Tree Methods fold :: Monoid m => Tree m -> m # foldMap :: Monoid m => (a -> m) -> Tree a -> m # foldMap' :: Monoid m => (a -> m) -> Tree a -> m # foldr :: (a -> b -> b) -> b -> Tree a -> b # foldr' :: (a -> b -> b) -> b -> Tree a -> b # foldl :: (b -> a -> b) -> b -> Tree a -> b # foldl' :: (b -> a -> b) -> b -> Tree a -> b # foldr1 :: (a -> a -> a) -> Tree a -> a # foldl1 :: (a -> a -> a) -> Tree a -> a # toList :: Tree a -> [a] # null :: Tree a -> Bool # length :: Tree a -> Int # elem :: Eq a => a -> Tree a -> Bool # maximum :: Ord a => Tree a -> a # minimum :: Ord a => Tree a -> a # sum :: Num a => Tree a -> a # product :: Num a => Tree a -> a #
Foldable NonEmpty | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Foldable Methods fold :: Monoid m => NonEmpty m -> m # foldMap :: Monoid m => (a -> m) -> NonEmpty a -> m # foldMap' :: Monoid m => (a -> m) -> NonEmpty a -> m # foldr :: (a -> b -> b) -> b -> NonEmpty a -> b # foldr' :: (a -> b -> b) -> b -> NonEmpty a -> b # foldl :: (b -> a -> b) -> b -> NonEmpty a -> b # foldl' :: (b -> a -> b) -> b -> NonEmpty a -> b # foldr1 :: (a -> a -> a) -> NonEmpty a -> a # foldl1 :: (a -> a -> a) -> NonEmpty a -> a # toList :: NonEmpty a -> [a] # null :: NonEmpty a -> Bool # length :: NonEmpty a -> Int # elem :: Eq a => a -> NonEmpty a -> Bool # maximum :: Ord a => NonEmpty a -> a # minimum :: Ord a => NonEmpty a -> a # sum :: Num a => NonEmpty a -> a # product :: Num a => NonEmpty a -> a #
Foldable Identity | @since base-4.8.0.0
Instance details Defined in GHC.Internal.Data.Functor.Identity Methods fold :: Monoid m => Identity m -> m # foldMap :: Monoid m => (a -> m) -> Identity a -> m # foldMap' :: Monoid m => (a -> m) -> Identity a -> m # foldr :: (a -> b -> b) -> b -> Identity a -> b # foldr' :: (a -> b -> b) -> b -> Identity a -> b # foldl :: (b -> a -> b) -> b -> Identity a -> b # foldl' :: (b -> a -> b) -> b -> Identity a -> b # foldr1 :: (a -> a -> a) -> Identity a -> a # foldl1 :: (a -> a -> a) -> Identity a -> a # toList :: Identity a -> [a] # null :: Identity a -> Bool # length :: Identity a -> Int # elem :: Eq a => a -> Identity a -> Bool # maximum :: Ord a => Identity a -> a # minimum :: Ord a => Identity a -> a # sum :: Num a => Identity a -> a # product :: Num a => Identity a -> a #
Foldable First | @since base-4.8.0.0
Instance details Defined in GHC.Internal.Data.Foldable Methods fold :: Monoid m => First m -> m # foldMap :: Monoid m => (a -> m) -> First a -> m # foldMap' :: Monoid m => (a -> m) -> First a -> m # foldr :: (a -> b -> b) -> b -> First a -> b # foldr' :: (a -> b -> b) -> b -> First a -> b # foldl :: (b -> a -> b) -> b -> First a -> b # foldl' :: (b -> a -> b) -> b -> First a -> b # foldr1 :: (a -> a -> a) -> First a -> a # foldl1 :: (a -> a -> a) -> First a -> a # toList :: First a -> [a] # null :: First a -> Bool # length :: First a -> Int # elem :: Eq a => a -> First a -> Bool # maximum :: Ord a => First a -> a # minimum :: Ord a => First a -> a # sum :: Num a => First a -> a # product :: Num a => First a -> a #
Foldable Last | @since base-4.8.0.0
Instance details Defined in GHC.Internal.Data.Foldable Methods fold :: Monoid m => Last m -> m # foldMap :: Monoid m => (a -> m) -> Last a -> m # foldMap' :: Monoid m => (a -> m) -> Last a -> m # foldr :: (a -> b -> b) -> b -> Last a -> b # foldr' :: (a -> b -> b) -> b -> Last a -> b # foldl :: (b -> a -> b) -> b -> Last a -> b # foldl' :: (b -> a -> b) -> b -> Last a -> b # foldr1 :: (a -> a -> a) -> Last a -> a # foldl1 :: (a -> a -> a) -> Last a -> a # toList :: Last a -> [a] # null :: Last a -> Bool # length :: Last a -> Int # elem :: Eq a => a -> Last a -> Bool # maximum :: Ord a => Last a -> a # minimum :: Ord a => Last a -> a # sum :: Num a => Last a -> a # product :: Num a => Last a -> a #
Foldable Down | @since base-4.12.0.0
Instance details Defined in GHC.Internal.Data.Foldable Methods fold :: Monoid m => Down m -> m # foldMap :: Monoid m => (a -> m) -> Down a -> m # foldMap' :: Monoid m => (a -> m) -> Down a -> m # foldr :: (a -> b -> b) -> b -> Down a -> b # foldr' :: (a -> b -> b) -> b -> Down a -> b # foldl :: (b -> a -> b) -> b -> Down a -> b # foldl' :: (b -> a -> b) -> b -> Down a -> b # foldr1 :: (a -> a -> a) -> Down a -> a # foldl1 :: (a -> a -> a) -> Down a -> a # toList :: Down a -> [a] # null :: Down a -> Bool # length :: Down a -> Int # elem :: Eq a => a -> Down a -> Bool # maximum :: Ord a => Down a -> a # minimum :: Ord a => Down a -> a # sum :: Num a => Down a -> a # product :: Num a => Down a -> a #
Foldable Dual | @since base-4.8.0.0
Instance details Defined in GHC.Internal.Data.Foldable Methods fold :: Monoid m => Dual m -> m # foldMap :: Monoid m => (a -> m) -> Dual a -> m # foldMap' :: Monoid m => (a -> m) -> Dual a -> m # foldr :: (a -> b -> b) -> b -> Dual a -> b # foldr' :: (a -> b -> b) -> b -> Dual a -> b # foldl :: (b -> a -> b) -> b -> Dual a -> b # foldl' :: (b -> a -> b) -> b -> Dual a -> b # foldr1 :: (a -> a -> a) -> Dual a -> a # foldl1 :: (a -> a -> a) -> Dual a -> a # toList :: Dual a -> [a] # null :: Dual a -> Bool # length :: Dual a -> Int # elem :: Eq a => a -> Dual a -> Bool # maximum :: Ord a => Dual a -> a # minimum :: Ord a => Dual a -> a # sum :: Num a => Dual a -> a # product :: Num a => Dual a -> a #
Foldable Product | @since base-4.8.0.0
Instance details Defined in GHC.Internal.Data.Foldable Methods fold :: Monoid m => Product m -> m # foldMap :: Monoid m => (a -> m) -> Product a -> m # foldMap' :: Monoid m => (a -> m) -> Product a -> m # foldr :: (a -> b -> b) -> b -> Product a -> b # foldr' :: (a -> b -> b) -> b -> Product a -> b # foldl :: (b -> a -> b) -> b -> Product a -> b # foldl' :: (b -> a -> b) -> b -> Product a -> b # foldr1 :: (a -> a -> a) -> Product a -> a # foldl1 :: (a -> a -> a) -> Product a -> a # toList :: Product a -> [a] # null :: Product a -> Bool # length :: Product a -> Int # elem :: Eq a => a -> Product a -> Bool # maximum :: Ord a => Product a -> a # minimum :: Ord a => Product a -> a # sum :: Num a => Product a -> a # product :: Num a => Product a -> a #
Foldable Sum | @since base-4.8.0.0
Instance details Defined in GHC.Internal.Data.Foldable Methods fold :: Monoid m => Sum m -> m # foldMap :: Monoid m => (a -> m) -> Sum a -> m # foldMap' :: Monoid m => (a -> m) -> Sum a -> m # foldr :: (a -> b -> b) -> b -> Sum a -> b # foldr' :: (a -> b -> b) -> b -> Sum a -> b # foldl :: (b -> a -> b) -> b -> Sum a -> b # foldl' :: (b -> a -> b) -> b -> Sum a -> b # foldr1 :: (a -> a -> a) -> Sum a -> a # foldl1 :: (a -> a -> a) -> Sum a -> a # toList :: Sum a -> [a] # null :: Sum a -> Bool # length :: Sum a -> Int # elem :: Eq a => a -> Sum a -> Bool # maximum :: Ord a => Sum a -> a # minimum :: Ord a => Sum a -> a # sum :: Num a => Sum a -> a # product :: Num a => Sum a -> a #
Foldable Par1 | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Foldable Methods fold :: Monoid m => Par1 m -> m # foldMap :: Monoid m => (a -> m) -> Par1 a -> m # foldMap' :: Monoid m => (a -> m) -> Par1 a -> m # foldr :: (a -> b -> b) -> b -> Par1 a -> b # foldr' :: (a -> b -> b) -> b -> Par1 a -> b # foldl :: (b -> a -> b) -> b -> Par1 a -> b # foldl' :: (b -> a -> b) -> b -> Par1 a -> b # foldr1 :: (a -> a -> a) -> Par1 a -> a # foldl1 :: (a -> a -> a) -> Par1 a -> a # toList :: Par1 a -> [a] # null :: Par1 a -> Bool # length :: Par1 a -> Int # elem :: Eq a => a -> Par1 a -> Bool # maximum :: Ord a => Par1 a -> a # minimum :: Ord a => Par1 a -> a # sum :: Num a => Par1 a -> a # product :: Num a => Par1 a -> a #
Foldable Hashed |
Instance details Defined in Data.Hashable.Class Methods fold :: Monoid m => Hashed m -> m # foldMap :: Monoid m => (a -> m) -> Hashed a -> m # foldMap' :: Monoid m => (a -> m) -> Hashed a -> m # foldr :: (a -> b -> b) -> b -> Hashed a -> b # foldr' :: (a -> b -> b) -> b -> Hashed a -> b # foldl :: (b -> a -> b) -> b -> Hashed a -> b # foldl' :: (b -> a -> b) -> b -> Hashed a -> b # foldr1 :: (a -> a -> a) -> Hashed a -> a # foldl1 :: (a -> a -> a) -> Hashed a -> a # toList :: Hashed a -> [a] # null :: Hashed a -> Bool # length :: Hashed a -> Int # elem :: Eq a => a -> Hashed a -> Bool # maximum :: Ord a => Hashed a -> a # minimum :: Ord a => Hashed a -> a # sum :: Num a => Hashed a -> a # product :: Num a => Hashed a -> a #
Foldable Array |
Instance details Defined in Data.Primitive.Array Methods fold :: Monoid m => Array m -> m # foldMap :: Monoid m => (a -> m) -> Array a -> m # foldMap' :: Monoid m => (a -> m) -> Array a -> m # foldr :: (a -> b -> b) -> b -> Array a -> b # foldr' :: (a -> b -> b) -> b -> Array a -> b # foldl :: (b -> a -> b) -> b -> Array a -> b # foldl' :: (b -> a -> b) -> b -> Array a -> b # foldr1 :: (a -> a -> a) -> Array a -> a # foldl1 :: (a -> a -> a) -> Array a -> a # toList :: Array a -> [a] # null :: Array a -> Bool # length :: Array a -> Int # elem :: Eq a => a -> Array a -> Bool # maximum :: Ord a => Array a -> a # minimum :: Ord a => Array a -> a # sum :: Num a => Array a -> a # product :: Num a => Array a -> a #
Foldable SmallArray |
Instance details Defined in Data.Primitive.SmallArray Methods fold :: Monoid m => SmallArray m -> m # foldMap :: Monoid m => (a -> m) -> SmallArray a -> m # foldMap' :: Monoid m => (a -> m) -> SmallArray a -> m # foldr :: (a -> b -> b) -> b -> SmallArray a -> b # foldr' :: (a -> b -> b) -> b -> SmallArray a -> b # foldl :: (b -> a -> b) -> b -> SmallArray a -> b # foldl' :: (b -> a -> b) -> b -> SmallArray a -> b # foldr1 :: (a -> a -> a) -> SmallArray a -> a # foldl1 :: (a -> a -> a) -> SmallArray a -> a # toList :: SmallArray a -> [a] # null :: SmallArray a -> Bool # length :: SmallArray a -> Int # elem :: Eq a => a -> SmallArray a -> Bool # maximum :: Ord a => SmallArray a -> a # minimum :: Ord a => SmallArray a -> a # sum :: Num a => SmallArray a -> a # product :: Num a => SmallArray a -> a #
Foldable HashSet |
Instance details Defined in Data.HashSet.Internal Methods fold :: Monoid m => HashSet m -> m # foldMap :: Monoid m => (a -> m) -> HashSet a -> m # foldMap' :: Monoid m => (a -> m) -> HashSet a -> m # foldr :: (a -> b -> b) -> b -> HashSet a -> b # foldr' :: (a -> b -> b) -> b -> HashSet a -> b # foldl :: (b -> a -> b) -> b -> HashSet a -> b # foldl' :: (b -> a -> b) -> b -> HashSet a -> b # foldr1 :: (a -> a -> a) -> HashSet a -> a # foldl1 :: (a -> a -> a) -> HashSet a -> a # toList :: HashSet a -> [a] # null :: HashSet a -> Bool # length :: HashSet a -> Int # elem :: Eq a => a -> HashSet a -> Bool # maximum :: Ord a => HashSet a -> a # minimum :: Ord a => HashSet a -> a # sum :: Num a => HashSet a -> a # product :: Num a => HashSet a -> a #
Foldable Vector |
Instance details Defined in Data.Vector Methods fold :: Monoid m => Vector m -> m # foldMap :: Monoid m => (a -> m) -> Vector a -> m # foldMap' :: Monoid m => (a -> m) -> Vector a -> m # foldr :: (a -> b -> b) -> b -> Vector a -> b # foldr' :: (a -> b -> b) -> b -> Vector a -> b # foldl :: (b -> a -> b) -> b -> Vector a -> b # foldl' :: (b -> a -> b) -> b -> Vector a -> b # foldr1 :: (a -> a -> a) -> Vector a -> a # foldl1 :: (a -> a -> a) -> Vector a -> a # toList :: Vector a -> [a] # null :: Vector a -> Bool # length :: Vector a -> Int # elem :: Eq a => a -> Vector a -> Bool # maximum :: Ord a => Vector a -> a # minimum :: Ord a => Vector a -> a # sum :: Num a => Vector a -> a # product :: Num a => Vector a -> a #
Foldable Vector |
Instance details Defined in Data.Vector.Strict Methods fold :: Monoid m => Vector m -> m # foldMap :: Monoid m => (a -> m) -> Vector a -> m # foldMap' :: Monoid m => (a -> m) -> Vector a -> m # foldr :: (a -> b -> b) -> b -> Vector a -> b # foldr' :: (a -> b -> b) -> b -> Vector a -> b # foldl :: (b -> a -> b) -> b -> Vector a -> b # foldl' :: (b -> a -> b) -> b -> Vector a -> b # foldr1 :: (a -> a -> a) -> Vector a -> a # foldl1 :: (a -> a -> a) -> Vector a -> a # toList :: Vector a -> [a] # null :: Vector a -> Bool # length :: Vector a -> Int # elem :: Eq a => a -> Vector a -> Bool # maximum :: Ord a => Vector a -> a # minimum :: Ord a => Vector a -> a # sum :: Num a => Vector a -> a # product :: Num a => Vector a -> a #
Foldable Maybe | @since base-2.01
Instance details Defined in GHC.Internal.Data.Foldable Methods fold :: Monoid m => Maybe m -> m # foldMap :: Monoid m => (a -> m) -> Maybe a -> m # foldMap' :: Monoid m => (a -> m) -> Maybe a -> m # foldr :: (a -> b -> b) -> b -> Maybe a -> b # foldr' :: (a -> b -> b) -> b -> Maybe a -> b # foldl :: (b -> a -> b) -> b -> Maybe a -> b # foldl' :: (b -> a -> b) -> b -> Maybe a -> b # foldr1 :: (a -> a -> a) -> Maybe a -> a # foldl1 :: (a -> a -> a) -> Maybe a -> a # toList :: Maybe a -> [a] # null :: Maybe a -> Bool # length :: Maybe a -> Int # elem :: Eq a => a -> Maybe a -> Bool # maximum :: Ord a => Maybe a -> a # minimum :: Ord a => Maybe a -> a # sum :: Num a => Maybe a -> a # product :: Num a => Maybe a -> a #
Foldable Solo | @since base-4.15
Instance details Defined in GHC.Internal.Data.Foldable Methods fold :: Monoid m => Solo m -> m # foldMap :: Monoid m => (a -> m) -> Solo a -> m # foldMap' :: Monoid m => (a -> m) -> Solo a -> m # foldr :: (a -> b -> b) -> b -> Solo a -> b # foldr' :: (a -> b -> b) -> b -> Solo a -> b # foldl :: (b -> a -> b) -> b -> Solo a -> b # foldl' :: (b -> a -> b) -> b -> Solo a -> b # foldr1 :: (a -> a -> a) -> Solo a -> a # foldl1 :: (a -> a -> a) -> Solo a -> a # toList :: Solo a -> [a] # null :: Solo a -> Bool # length :: Solo a -> Int # elem :: Eq a => a -> Solo a -> Bool # maximum :: Ord a => Solo a -> a # minimum :: Ord a => Solo a -> a # sum :: Num a => Solo a -> a # product :: Num a => Solo a -> a #
Foldable [] | @since base-2.01
Instance details Defined in GHC.Internal.Data.Foldable Methods fold :: Monoid m => [m] -> m # foldMap :: Monoid m => (a -> m) -> [a] -> m # foldMap' :: Monoid m => (a -> m) -> [a] -> m # foldr :: (a -> b -> b) -> b -> [a] -> b # foldr' :: (a -> b -> b) -> b -> [a] -> b # foldl :: (b -> a -> b) -> b -> [a] -> b # foldl' :: (b -> a -> b) -> b -> [a] -> b # foldr1 :: (a -> a -> a) -> [a] -> a # foldl1 :: (a -> a -> a) -> [a] -> a # toList :: [a] -> [a] # null :: [a] -> Bool # length :: [a] -> Int # elem :: Eq a => a -> [a] -> Bool # maximum :: Ord a => [a] -> a # minimum :: Ord a => [a] -> a # sum :: Num a => [a] -> a # product :: Num a => [a] -> a #
Foldable (Arg a) | Since: base-4.9.0.0
Instance details Defined in Data.Semigroup Methods fold :: Monoid m => Arg a m -> m # foldMap :: Monoid m => (a0 -> m) -> Arg a a0 -> m # foldMap' :: Monoid m => (a0 -> m) -> Arg a a0 -> m # foldr :: (a0 -> b -> b) -> b -> Arg a a0 -> b # foldr' :: (a0 -> b -> b) -> b -> Arg a a0 -> b # foldl :: (b -> a0 -> b) -> b -> Arg a a0 -> b # foldl' :: (b -> a0 -> b) -> b -> Arg a a0 -> b # foldr1 :: (a0 -> a0 -> a0) -> Arg a a0 -> a0 # foldl1 :: (a0 -> a0 -> a0) -> Arg a a0 -> a0 # toList :: Arg a a0 -> [a0] # null :: Arg a a0 -> Bool # length :: Arg a a0 -> Int # elem :: Eq a0 => a0 -> Arg a a0 -> Bool # maximum :: Ord a0 => Arg a a0 -> a0 # minimum :: Ord a0 => Arg a a0 -> a0 # sum :: Num a0 => Arg a a0 -> a0 # product :: Num a0 => Arg a a0 -> a0 #
Foldable (Map k) | Folds in order of increasing key.
Instance details Defined in Data.Map.Internal Methods fold :: Monoid m => Map k m -> m # foldMap :: Monoid m => (a -> m) -> Map k a -> m # foldMap' :: Monoid m => (a -> m) -> Map k a -> m # foldr :: (a -> b -> b) -> b -> Map k a -> b # foldr' :: (a -> b -> b) -> b -> Map k a -> b # foldl :: (b -> a -> b) -> b -> Map k a -> b # foldl' :: (b -> a -> b) -> b -> Map k a -> b # foldr1 :: (a -> a -> a) -> Map k a -> a # foldl1 :: (a -> a -> a) -> Map k a -> a # toList :: Map k a -> [a] # null :: Map k a -> Bool # length :: Map k a -> Int # elem :: Eq a => a -> Map k a -> Bool # maximum :: Ord a => Map k a -> a # minimum :: Ord a => Map k a -> a # sum :: Num a => Map k a -> a # product :: Num a => Map k a -> a #
Foldable (Array i) | @since base-4.8.0.0
Instance details Defined in GHC.Internal.Data.Foldable Methods fold :: Monoid m => Array i m -> m # foldMap :: Monoid m => (a -> m) -> Array i a -> m # foldMap' :: Monoid m => (a -> m) -> Array i a -> m # foldr :: (a -> b -> b) -> b -> Array i a -> b # foldr' :: (a -> b -> b) -> b -> Array i a -> b # foldl :: (b -> a -> b) -> b -> Array i a -> b # foldl' :: (b -> a -> b) -> b -> Array i a -> b # foldr1 :: (a -> a -> a) -> Array i a -> a # foldl1 :: (a -> a -> a) -> Array i a -> a # toList :: Array i a -> [a] # null :: Array i a -> Bool # length :: Array i a -> Int # elem :: Eq a => a -> Array i a -> Bool # maximum :: Ord a => Array i a -> a # minimum :: Ord a => Array i a -> a # sum :: Num a => Array i a -> a # product :: Num a => Array i a -> a #
Foldable (Either a) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Data.Foldable Methods fold :: Monoid m => Either a m -> m # foldMap :: Monoid m => (a0 -> m) -> Either a a0 -> m # foldMap' :: Monoid m => (a0 -> m) -> Either a a0 -> m # foldr :: (a0 -> b -> b) -> b -> Either a a0 -> b # foldr' :: (a0 -> b -> b) -> b -> Either a a0 -> b # foldl :: (b -> a0 -> b) -> b -> Either a a0 -> b # foldl' :: (b -> a0 -> b) -> b -> Either a a0 -> b # foldr1 :: (a0 -> a0 -> a0) -> Either a a0 -> a0 # foldl1 :: (a0 -> a0 -> a0) -> Either a a0 -> a0 # toList :: Either a a0 -> [a0] # null :: Either a a0 -> Bool # length :: Either a a0 -> Int # elem :: Eq a0 => a0 -> Either a a0 -> Bool # maximum :: Ord a0 => Either a a0 -> a0 # minimum :: Ord a0 => Either a a0 -> a0 # sum :: Num a0 => Either a a0 -> a0 # product :: Num a0 => Either a a0 -> a0 #
Foldable (Proxy :: Type -> Type) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Data.Foldable Methods fold :: Monoid m => Proxy m -> m # foldMap :: Monoid m => (a -> m) -> Proxy a -> m # foldMap' :: Monoid m => (a -> m) -> Proxy a -> m # foldr :: (a -> b -> b) -> b -> Proxy a -> b # foldr' :: (a -> b -> b) -> b -> Proxy a -> b # foldl :: (b -> a -> b) -> b -> Proxy a -> b # foldl' :: (b -> a -> b) -> b -> Proxy a -> b # foldr1 :: (a -> a -> a) -> Proxy a -> a # foldl1 :: (a -> a -> a) -> Proxy a -> a # toList :: Proxy a -> [a] # null :: Proxy a -> Bool # length :: Proxy a -> Int # elem :: Eq a => a -> Proxy a -> Bool # maximum :: Ord a => Proxy a -> a # minimum :: Ord a => Proxy a -> a # sum :: Num a => Proxy a -> a # product :: Num a => Proxy a -> a #
Foldable (U1 :: Type -> Type) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Foldable Methods fold :: Monoid m => U1 m -> m # foldMap :: Monoid m => (a -> m) -> U1 a -> m # foldMap' :: Monoid m => (a -> m) -> U1 a -> m # foldr :: (a -> b -> b) -> b -> U1 a -> b # foldr' :: (a -> b -> b) -> b -> U1 a -> b # foldl :: (b -> a -> b) -> b -> U1 a -> b # foldl' :: (b -> a -> b) -> b -> U1 a -> b # foldr1 :: (a -> a -> a) -> U1 a -> a # foldl1 :: (a -> a -> a) -> U1 a -> a # toList :: U1 a -> [a] # null :: U1 a -> Bool # length :: U1 a -> Int # elem :: Eq a => a -> U1 a -> Bool # maximum :: Ord a => U1 a -> a # minimum :: Ord a => U1 a -> a # sum :: Num a => U1 a -> a # product :: Num a => U1 a -> a #
Foldable (UAddr :: Type -> Type) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Foldable Methods fold :: Monoid m => UAddr m -> m # foldMap :: Monoid m => (a -> m) -> UAddr a -> m # foldMap' :: Monoid m => (a -> m) -> UAddr a -> m # foldr :: (a -> b -> b) -> b -> UAddr a -> b # foldr' :: (a -> b -> b) -> b -> UAddr a -> b # foldl :: (b -> a -> b) -> b -> UAddr a -> b # foldl' :: (b -> a -> b) -> b -> UAddr a -> b # foldr1 :: (a -> a -> a) -> UAddr a -> a # foldl1 :: (a -> a -> a) -> UAddr a -> a # toList :: UAddr a -> [a] # null :: UAddr a -> Bool # length :: UAddr a -> Int # elem :: Eq a => a -> UAddr a -> Bool # maximum :: Ord a => UAddr a -> a # minimum :: Ord a => UAddr a -> a # sum :: Num a => UAddr a -> a # product :: Num a => UAddr a -> a #
Foldable (UChar :: Type -> Type) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Foldable Methods fold :: Monoid m => UChar m -> m # foldMap :: Monoid m => (a -> m) -> UChar a -> m # foldMap' :: Monoid m => (a -> m) -> UChar a -> m # foldr :: (a -> b -> b) -> b -> UChar a -> b # foldr' :: (a -> b -> b) -> b -> UChar a -> b # foldl :: (b -> a -> b) -> b -> UChar a -> b # foldl' :: (b -> a -> b) -> b -> UChar a -> b # foldr1 :: (a -> a -> a) -> UChar a -> a # foldl1 :: (a -> a -> a) -> UChar a -> a # toList :: UChar a -> [a] # null :: UChar a -> Bool # length :: UChar a -> Int # elem :: Eq a => a -> UChar a -> Bool # maximum :: Ord a => UChar a -> a # minimum :: Ord a => UChar a -> a # sum :: Num a => UChar a -> a # product :: Num a => UChar a -> a #
Foldable (UDouble :: Type -> Type) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Foldable Methods fold :: Monoid m => UDouble m -> m # foldMap :: Monoid m => (a -> m) -> UDouble a -> m # foldMap' :: Monoid m => (a -> m) -> UDouble a -> m # foldr :: (a -> b -> b) -> b -> UDouble a -> b # foldr' :: (a -> b -> b) -> b -> UDouble a -> b # foldl :: (b -> a -> b) -> b -> UDouble a -> b # foldl' :: (b -> a -> b) -> b -> UDouble a -> b # foldr1 :: (a -> a -> a) -> UDouble a -> a # foldl1 :: (a -> a -> a) -> UDouble a -> a # toList :: UDouble a -> [a] # null :: UDouble a -> Bool # length :: UDouble a -> Int # elem :: Eq a => a -> UDouble a -> Bool # maximum :: Ord a => UDouble a -> a # minimum :: Ord a => UDouble a -> a # sum :: Num a => UDouble a -> a # product :: Num a => UDouble a -> a #
Foldable (UFloat :: Type -> Type) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Foldable Methods fold :: Monoid m => UFloat m -> m # foldMap :: Monoid m => (a -> m) -> UFloat a -> m # foldMap' :: Monoid m => (a -> m) -> UFloat a -> m # foldr :: (a -> b -> b) -> b -> UFloat a -> b # foldr' :: (a -> b -> b) -> b -> UFloat a -> b # foldl :: (b -> a -> b) -> b -> UFloat a -> b # foldl' :: (b -> a -> b) -> b -> UFloat a -> b # foldr1 :: (a -> a -> a) -> UFloat a -> a # foldl1 :: (a -> a -> a) -> UFloat a -> a # toList :: UFloat a -> [a] # null :: UFloat a -> Bool # length :: UFloat a -> Int # elem :: Eq a => a -> UFloat a -> Bool # maximum :: Ord a => UFloat a -> a # minimum :: Ord a => UFloat a -> a # sum :: Num a => UFloat a -> a # product :: Num a => UFloat a -> a #
Foldable (UInt :: Type -> Type) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Foldable Methods fold :: Monoid m => UInt m -> m # foldMap :: Monoid m => (a -> m) -> UInt a -> m # foldMap' :: Monoid m => (a -> m) -> UInt a -> m # foldr :: (a -> b -> b) -> b -> UInt a -> b # foldr' :: (a -> b -> b) -> b -> UInt a -> b # foldl :: (b -> a -> b) -> b -> UInt a -> b # foldl' :: (b -> a -> b) -> b -> UInt a -> b # foldr1 :: (a -> a -> a) -> UInt a -> a # foldl1 :: (a -> a -> a) -> UInt a -> a # toList :: UInt a -> [a] # null :: UInt a -> Bool # length :: UInt a -> Int # elem :: Eq a => a -> UInt a -> Bool # maximum :: Ord a => UInt a -> a # minimum :: Ord a => UInt a -> a # sum :: Num a => UInt a -> a # product :: Num a => UInt a -> a #
Foldable (UWord :: Type -> Type) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Foldable Methods fold :: Monoid m => UWord m -> m # foldMap :: Monoid m => (a -> m) -> UWord a -> m # foldMap' :: Monoid m => (a -> m) -> UWord a -> m # foldr :: (a -> b -> b) -> b -> UWord a -> b # foldr' :: (a -> b -> b) -> b -> UWord a -> b # foldl :: (b -> a -> b) -> b -> UWord a -> b # foldl' :: (b -> a -> b) -> b -> UWord a -> b # foldr1 :: (a -> a -> a) -> UWord a -> a # foldl1 :: (a -> a -> a) -> UWord a -> a # toList :: UWord a -> [a] # null :: UWord a -> Bool # length :: UWord a -> Int # elem :: Eq a => a -> UWord a -> Bool # maximum :: Ord a => UWord a -> a # minimum :: Ord a => UWord a -> a # sum :: Num a => UWord a -> a # product :: Num a => UWord a -> a #
Foldable (V1 :: Type -> Type) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Foldable Methods fold :: Monoid m => V1 m -> m # foldMap :: Monoid m => (a -> m) -> V1 a -> m # foldMap' :: Monoid m => (a -> m) -> V1 a -> m # foldr :: (a -> b -> b) -> b -> V1 a -> b # foldr' :: (a -> b -> b) -> b -> V1 a -> b # foldl :: (b -> a -> b) -> b -> V1 a -> b # foldl' :: (b -> a -> b) -> b -> V1 a -> b # foldr1 :: (a -> a -> a) -> V1 a -> a # foldl1 :: (a -> a -> a) -> V1 a -> a # toList :: V1 a -> [a] # null :: V1 a -> Bool # length :: V1 a -> Int # elem :: Eq a => a -> V1 a -> Bool # maximum :: Ord a => V1 a -> a # minimum :: Ord a => V1 a -> a # sum :: Num a => V1 a -> a # product :: Num a => V1 a -> a #
Foldable f => Foldable (Lift f) |
Instance details Defined in Control.Applicative.Lift Methods fold :: Monoid m => Lift f m -> m # foldMap :: Monoid m => (a -> m) -> Lift f a -> m # foldMap' :: Monoid m => (a -> m) -> Lift f a -> m # foldr :: (a -> b -> b) -> b -> Lift f a -> b # foldr' :: (a -> b -> b) -> b -> Lift f a -> b # foldl :: (b -> a -> b) -> b -> Lift f a -> b # foldl' :: (b -> a -> b) -> b -> Lift f a -> b # foldr1 :: (a -> a -> a) -> Lift f a -> a # foldl1 :: (a -> a -> a) -> Lift f a -> a # toList :: Lift f a -> [a] # null :: Lift f a -> Bool # length :: Lift f a -> Int # elem :: Eq a => a -> Lift f a -> Bool # maximum :: Ord a => Lift f a -> a # minimum :: Ord a => Lift f a -> a # sum :: Num a => Lift f a -> a # product :: Num a => Lift f a -> a #
Foldable f => Foldable (MaybeT f) |
Instance details Defined in Control.Monad.Trans.Maybe Methods fold :: Monoid m => MaybeT f m -> m # foldMap :: Monoid m => (a -> m) -> MaybeT f a -> m # foldMap' :: Monoid m => (a -> m) -> MaybeT f a -> m # foldr :: (a -> b -> b) -> b -> MaybeT f a -> b # foldr' :: (a -> b -> b) -> b -> MaybeT f a -> b # foldl :: (b -> a -> b) -> b -> MaybeT f a -> b # foldl' :: (b -> a -> b) -> b -> MaybeT f a -> b # foldr1 :: (a -> a -> a) -> MaybeT f a -> a # foldl1 :: (a -> a -> a) -> MaybeT f a -> a # toList :: MaybeT f a -> [a] # null :: MaybeT f a -> Bool # length :: MaybeT f a -> Int # elem :: Eq a => a -> MaybeT f a -> Bool # maximum :: Ord a => MaybeT f a -> a # minimum :: Ord a => MaybeT f a -> a # sum :: Num a => MaybeT f a -> a # product :: Num a => MaybeT f a -> a #
Foldable (HashMap k) |
Instance details Defined in Data.HashMap.Internal Methods fold :: Monoid m => HashMap k m -> m # foldMap :: Monoid m => (a -> m) -> HashMap k a -> m # foldMap' :: Monoid m => (a -> m) -> HashMap k a -> m # foldr :: (a -> b -> b) -> b -> HashMap k a -> b # foldr' :: (a -> b -> b) -> b -> HashMap k a -> b # foldl :: (b -> a -> b) -> b -> HashMap k a -> b # foldl' :: (b -> a -> b) -> b -> HashMap k a -> b # foldr1 :: (a -> a -> a) -> HashMap k a -> a # foldl1 :: (a -> a -> a) -> HashMap k a -> a # toList :: HashMap k a -> [a] # null :: HashMap k a -> Bool # length :: HashMap k a -> Int # elem :: Eq a => a -> HashMap k a -> Bool # maximum :: Ord a => HashMap k a -> a # minimum :: Ord a => HashMap k a -> a # sum :: Num a => HashMap k a -> a # product :: Num a => HashMap k a -> a #
Foldable ((,) a) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Data.Foldable Methods fold :: Monoid m => (a, m) -> m # foldMap :: Monoid m => (a0 -> m) -> (a, a0) -> m # foldMap' :: Monoid m => (a0 -> m) -> (a, a0) -> m # foldr :: (a0 -> b -> b) -> b -> (a, a0) -> b # foldr' :: (a0 -> b -> b) -> b -> (a, a0) -> b # foldl :: (b -> a0 -> b) -> b -> (a, a0) -> b # foldl' :: (b -> a0 -> b) -> b -> (a, a0) -> b # foldr1 :: (a0 -> a0 -> a0) -> (a, a0) -> a0 # foldl1 :: (a0 -> a0 -> a0) -> (a, a0) -> a0 # toList :: (a, a0) -> [a0] # null :: (a, a0) -> Bool # length :: (a, a0) -> Int # elem :: Eq a0 => a0 -> (a, a0) -> Bool # maximum :: Ord a0 => (a, a0) -> a0 # minimum :: Ord a0 => (a, a0) -> a0 # sum :: Num a0 => (a, a0) -> a0 # product :: Num a0 => (a, a0) -> a0 #
Bifoldable p => Foldable (Join p) |
Instance details Defined in Data.Bifunctor.Join Methods fold :: Monoid m => Join p m -> m # foldMap :: Monoid m => (a -> m) -> Join p a -> m # foldMap' :: Monoid m => (a -> m) -> Join p a -> m # foldr :: (a -> b -> b) -> b -> Join p a -> b # foldr' :: (a -> b -> b) -> b -> Join p a -> b # foldl :: (b -> a -> b) -> b -> Join p a -> b # foldl' :: (b -> a -> b) -> b -> Join p a -> b # foldr1 :: (a -> a -> a) -> Join p a -> a # foldl1 :: (a -> a -> a) -> Join p a -> a # toList :: Join p a -> [a] # null :: Join p a -> Bool # length :: Join p a -> Int # elem :: Eq a => a -> Join p a -> Bool # maximum :: Ord a => Join p a -> a # minimum :: Ord a => Join p a -> a # sum :: Num a => Join p a -> a # product :: Num a => Join p a -> a #
Foldable w => Foldable (EnvT e w) |
Instance details Defined in Control.Comonad.Trans.Env Methods fold :: Monoid m => EnvT e w m -> m # foldMap :: Monoid m => (a -> m) -> EnvT e w a -> m # foldMap' :: Monoid m => (a -> m) -> EnvT e w a -> m # foldr :: (a -> b -> b) -> b -> EnvT e w a -> b # foldr' :: (a -> b -> b) -> b -> EnvT e w a -> b # foldl :: (b -> a -> b) -> b -> EnvT e w a -> b # foldl' :: (b -> a -> b) -> b -> EnvT e w a -> b # foldr1 :: (a -> a -> a) -> EnvT e w a -> a # foldl1 :: (a -> a -> a) -> EnvT e w a -> a # toList :: EnvT e w a -> [a] # null :: EnvT e w a -> Bool # length :: EnvT e w a -> Int # elem :: Eq a => a -> EnvT e w a -> Bool # maximum :: Ord a => EnvT e w a -> a # minimum :: Ord a => EnvT e w a -> a # sum :: Num a => EnvT e w a -> a # product :: Num a => EnvT e w a -> a #
Foldable (Const m :: Type -> Type) | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Data.Functor.Const Methods fold :: Monoid m0 => Const m m0 -> m0 # foldMap :: Monoid m0 => (a -> m0) -> Const m a -> m0 # foldMap' :: Monoid m0 => (a -> m0) -> Const m a -> m0 # foldr :: (a -> b -> b) -> b -> Const m a -> b # foldr' :: (a -> b -> b) -> b -> Const m a -> b # foldl :: (b -> a -> b) -> b -> Const m a -> b # foldl' :: (b -> a -> b) -> b -> Const m a -> b # foldr1 :: (a -> a -> a) -> Const m a -> a # foldl1 :: (a -> a -> a) -> Const m a -> a # toList :: Const m a -> [a] # null :: Const m a -> Bool # length :: Const m a -> Int # elem :: Eq a => a -> Const m a -> Bool # maximum :: Ord a => Const m a -> a # minimum :: Ord a => Const m a -> a # sum :: Num a => Const m a -> a # product :: Num a => Const m a -> a #
Foldable f => Foldable (Ap f) | @since base-4.12.0.0
Instance details Defined in GHC.Internal.Data.Foldable Methods fold :: Monoid m => Ap f m -> m # foldMap :: Monoid m => (a -> m) -> Ap f a -> m # foldMap' :: Monoid m => (a -> m) -> Ap f a -> m # foldr :: (a -> b -> b) -> b -> Ap f a -> b # foldr' :: (a -> b -> b) -> b -> Ap f a -> b # foldl :: (b -> a -> b) -> b -> Ap f a -> b # foldl' :: (b -> a -> b) -> b -> Ap f a -> b # foldr1 :: (a -> a -> a) -> Ap f a -> a # foldl1 :: (a -> a -> a) -> Ap f a -> a # toList :: Ap f a -> [a] # null :: Ap f a -> Bool # length :: Ap f a -> Int # elem :: Eq a => a -> Ap f a -> Bool # maximum :: Ord a => Ap f a -> a # minimum :: Ord a => Ap f a -> a # sum :: Num a => Ap f a -> a # product :: Num a => Ap f a -> a #
Foldable f => Foldable (Alt f) | @since base-4.12.0.0
Instance details Defined in GHC.Internal.Data.Foldable Methods fold :: Monoid m => Alt f m -> m # foldMap :: Monoid m => (a -> m) -> Alt f a -> m # foldMap' :: Monoid m => (a -> m) -> Alt f a -> m # foldr :: (a -> b -> b) -> b -> Alt f a -> b # foldr' :: (a -> b -> b) -> b -> Alt f a -> b # foldl :: (b -> a -> b) -> b -> Alt f a -> b # foldl' :: (b -> a -> b) -> b -> Alt f a -> b # foldr1 :: (a -> a -> a) -> Alt f a -> a # foldl1 :: (a -> a -> a) -> Alt f a -> a # toList :: Alt f a -> [a] # null :: Alt f a -> Bool # length :: Alt f a -> Int # elem :: Eq a => a -> Alt f a -> Bool # maximum :: Ord a => Alt f a -> a # minimum :: Ord a => Alt f a -> a # sum :: Num a => Alt f a -> a # product :: Num a => Alt f a -> a #
Foldable f => Foldable (Rec1 f) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Foldable Methods fold :: Monoid m => Rec1 f m -> m # foldMap :: Monoid m => (a -> m) -> Rec1 f a -> m # foldMap' :: Monoid m => (a -> m) -> Rec1 f a -> m # foldr :: (a -> b -> b) -> b -> Rec1 f a -> b # foldr' :: (a -> b -> b) -> b -> Rec1 f a -> b # foldl :: (b -> a -> b) -> b -> Rec1 f a -> b # foldl' :: (b -> a -> b) -> b -> Rec1 f a -> b # foldr1 :: (a -> a -> a) -> Rec1 f a -> a # foldl1 :: (a -> a -> a) -> Rec1 f a -> a # toList :: Rec1 f a -> [a] # null :: Rec1 f a -> Bool # length :: Rec1 f a -> Int # elem :: Eq a => a -> Rec1 f a -> Bool # maximum :: Ord a => Rec1 f a -> a # minimum :: Ord a => Rec1 f a -> a # sum :: Num a => Rec1 f a -> a # product :: Num a => Rec1 f a -> a #
Foldable (Baz t b) |
Instance details Defined in Data.Profunctor.Traversing Methods fold :: Monoid m => Baz t b m -> m # foldMap :: Monoid m => (a -> m) -> Baz t b a -> m # foldMap' :: Monoid m => (a -> m) -> Baz t b a -> m # foldr :: (a -> b0 -> b0) -> b0 -> Baz t b a -> b0 # foldr' :: (a -> b0 -> b0) -> b0 -> Baz t b a -> b0 # foldl :: (b0 -> a -> b0) -> b0 -> Baz t b a -> b0 # foldl' :: (b0 -> a -> b0) -> b0 -> Baz t b a -> b0 # foldr1 :: (a -> a -> a) -> Baz t b a -> a # foldl1 :: (a -> a -> a) -> Baz t b a -> a # toList :: Baz t b a -> [a] # null :: Baz t b a -> Bool # length :: Baz t b a -> Int # elem :: Eq a => a -> Baz t b a -> Bool # maximum :: Ord a => Baz t b a -> a # minimum :: Ord a => Baz t b a -> a # sum :: Num a => Baz t b a -> a # product :: Num a => Baz t b a -> a #
Foldable (Tagged s) |
Instance details Defined in Data.Tagged Methods fold :: Monoid m => Tagged s m -> m # foldMap :: Monoid m => (a -> m) -> Tagged s a -> m # foldMap' :: Monoid m => (a -> m) -> Tagged s a -> m # foldr :: (a -> b -> b) -> b -> Tagged s a -> b # foldr' :: (a -> b -> b) -> b -> Tagged s a -> b # foldl :: (b -> a -> b) -> b -> Tagged s a -> b # foldl' :: (b -> a -> b) -> b -> Tagged s a -> b # foldr1 :: (a -> a -> a) -> Tagged s a -> a # foldl1 :: (a -> a -> a) -> Tagged s a -> a # toList :: Tagged s a -> [a] # null :: Tagged s a -> Bool # length :: Tagged s a -> Int # elem :: Eq a => a -> Tagged s a -> Bool # maximum :: Ord a => Tagged s a -> a # minimum :: Ord a => Tagged s a -> a # sum :: Num a => Tagged s a -> a # product :: Num a => Tagged s a -> a #
Foldable f => Foldable (Backwards f) | Derived instance.
Instance details Defined in Control.Applicative.Backwards Methods fold :: Monoid m => Backwards f m -> m # foldMap :: Monoid m => (a -> m) -> Backwards f a -> m # foldMap' :: Monoid m => (a -> m) -> Backwards f a -> m # foldr :: (a -> b -> b) -> b -> Backwards f a -> b # foldr' :: (a -> b -> b) -> b -> Backwards f a -> b # foldl :: (b -> a -> b) -> b -> Backwards f a -> b # foldl' :: (b -> a -> b) -> b -> Backwards f a -> b # foldr1 :: (a -> a -> a) -> Backwards f a -> a # foldl1 :: (a -> a -> a) -> Backwards f a -> a # toList :: Backwards f a -> [a] # null :: Backwards f a -> Bool # length :: Backwards f a -> Int # elem :: Eq a => a -> Backwards f a -> Bool # maximum :: Ord a => Backwards f a -> a # minimum :: Ord a => Backwards f a -> a # sum :: Num a => Backwards f a -> a # product :: Num a => Backwards f a -> a #
Foldable f => Foldable (ExceptT e f) |
Instance details Defined in Control.Monad.Trans.Except Methods fold :: Monoid m => ExceptT e f m -> m # foldMap :: Monoid m => (a -> m) -> ExceptT e f a -> m # foldMap' :: Monoid m => (a -> m) -> ExceptT e f a -> m # foldr :: (a -> b -> b) -> b -> ExceptT e f a -> b # foldr' :: (a -> b -> b) -> b -> ExceptT e f a -> b # foldl :: (b -> a -> b) -> b -> ExceptT e f a -> b # foldl' :: (b -> a -> b) -> b -> ExceptT e f a -> b # foldr1 :: (a -> a -> a) -> ExceptT e f a -> a # foldl1 :: (a -> a -> a) -> ExceptT e f a -> a # toList :: ExceptT e f a -> [a] # null :: ExceptT e f a -> Bool # length :: ExceptT e f a -> Int # elem :: Eq a => a -> ExceptT e f a -> Bool # maximum :: Ord a => ExceptT e f a -> a # minimum :: Ord a => ExceptT e f a -> a # sum :: Num a => ExceptT e f a -> a # product :: Num a => ExceptT e f a -> a #
Foldable f => Foldable (IdentityT f) |
Instance details Defined in Control.Monad.Trans.Identity Methods fold :: Monoid m => IdentityT f m -> m # foldMap :: Monoid m => (a -> m) -> IdentityT f a -> m # foldMap' :: Monoid m => (a -> m) -> IdentityT f a -> m # foldr :: (a -> b -> b) -> b -> IdentityT f a -> b # foldr' :: (a -> b -> b) -> b -> IdentityT f a -> b # foldl :: (b -> a -> b) -> b -> IdentityT f a -> b # foldl' :: (b -> a -> b) -> b -> IdentityT f a -> b # foldr1 :: (a -> a -> a) -> IdentityT f a -> a # foldl1 :: (a -> a -> a) -> IdentityT f a -> a # toList :: IdentityT f a -> [a] # null :: IdentityT f a -> Bool # length :: IdentityT f a -> Int # elem :: Eq a => a -> IdentityT f a -> Bool # maximum :: Ord a => IdentityT f a -> a # minimum :: Ord a => IdentityT f a -> a # sum :: Num a => IdentityT f a -> a # product :: Num a => IdentityT f a -> a #
Foldable f => Foldable (WriterT w f) |
Instance details Defined in Control.Monad.Trans.Writer.Lazy Methods fold :: Monoid m => WriterT w f m -> m # foldMap :: Monoid m => (a -> m) -> WriterT w f a -> m # foldMap' :: Monoid m => (a -> m) -> WriterT w f a -> m # foldr :: (a -> b -> b) -> b -> WriterT w f a -> b # foldr' :: (a -> b -> b) -> b -> WriterT w f a -> b # foldl :: (b -> a -> b) -> b -> WriterT w f a -> b # foldl' :: (b -> a -> b) -> b -> WriterT w f a -> b # foldr1 :: (a -> a -> a) -> WriterT w f a -> a # foldl1 :: (a -> a -> a) -> WriterT w f a -> a # toList :: WriterT w f a -> [a] # null :: WriterT w f a -> Bool # length :: WriterT w f a -> Int # elem :: Eq a => a -> WriterT w f a -> Bool # maximum :: Ord a => WriterT w f a -> a # minimum :: Ord a => WriterT w f a -> a # sum :: Num a => WriterT w f a -> a # product :: Num a => WriterT w f a -> a #
Foldable f => Foldable (WriterT w f) |
Instance details Defined in Control.Monad.Trans.Writer.Strict Methods fold :: Monoid m => WriterT w f m -> m # foldMap :: Monoid m => (a -> m) -> WriterT w f a -> m # foldMap' :: Monoid m => (a -> m) -> WriterT w f a -> m # foldr :: (a -> b -> b) -> b -> WriterT w f a -> b # foldr' :: (a -> b -> b) -> b -> WriterT w f a -> b # foldl :: (b -> a -> b) -> b -> WriterT w f a -> b # foldl' :: (b -> a -> b) -> b -> WriterT w f a -> b # foldr1 :: (a -> a -> a) -> WriterT w f a -> a # foldl1 :: (a -> a -> a) -> WriterT w f a -> a # toList :: WriterT w f a -> [a] # null :: WriterT w f a -> Bool # length :: WriterT w f a -> Int # elem :: Eq a => a -> WriterT w f a -> Bool # maximum :: Ord a => WriterT w f a -> a # minimum :: Ord a => WriterT w f a -> a # sum :: Num a => WriterT w f a -> a # product :: Num a => WriterT w f a -> a #
Foldable (Constant a :: Type -> Type) |
Instance details Defined in Data.Functor.Constant Methods fold :: Monoid m => Constant a m -> m # foldMap :: Monoid m => (a0 -> m) -> Constant a a0 -> m # foldMap' :: Monoid m => (a0 -> m) -> Constant a a0 -> m # foldr :: (a0 -> b -> b) -> b -> Constant a a0 -> b # foldr' :: (a0 -> b -> b) -> b -> Constant a a0 -> b # foldl :: (b -> a0 -> b) -> b -> Constant a a0 -> b # foldl' :: (b -> a0 -> b) -> b -> Constant a a0 -> b # foldr1 :: (a0 -> a0 -> a0) -> Constant a a0 -> a0 # foldl1 :: (a0 -> a0 -> a0) -> Constant a a0 -> a0 # toList :: Constant a a0 -> [a0] # null :: Constant a a0 -> Bool # length :: Constant a a0 -> Int # elem :: Eq a0 => a0 -> Constant a a0 -> Bool # maximum :: Ord a0 => Constant a a0 -> a0 # minimum :: Ord a0 => Constant a a0 -> a0 # sum :: Num a0 => Constant a a0 -> a0 # product :: Num a0 => Constant a a0 -> a0 #
Foldable f => Foldable (Reverse f) | Fold from right to left.
Instance details Defined in Data.Functor.Reverse Methods fold :: Monoid m => Reverse f m -> m # foldMap :: Monoid m => (a -> m) -> Reverse f a -> m # foldMap' :: Monoid m => (a -> m) -> Reverse f a -> m # foldr :: (a -> b -> b) -> b -> Reverse f a -> b # foldr' :: (a -> b -> b) -> b -> Reverse f a -> b # foldl :: (b -> a -> b) -> b -> Reverse f a -> b # foldl' :: (b -> a -> b) -> b -> Reverse f a -> b # foldr1 :: (a -> a -> a) -> Reverse f a -> a # foldl1 :: (a -> a -> a) -> Reverse f a -> a # toList :: Reverse f a -> [a] # null :: Reverse f a -> Bool # length :: Reverse f a -> Int # elem :: Eq a => a -> Reverse f a -> Bool # maximum :: Ord a => Reverse f a -> a # minimum :: Ord a => Reverse f a -> a # sum :: Num a => Reverse f a -> a # product :: Num a => Reverse f a -> a #
(Foldable f, Foldable g) => Foldable (Product f g) | Since: base-4.9.0.0
Instance details Defined in Data.Functor.Product Methods fold :: Monoid m => Product f g m -> m # foldMap :: Monoid m => (a -> m) -> Product f g a -> m # foldMap' :: Monoid m => (a -> m) -> Product f g a -> m # foldr :: (a -> b -> b) -> b -> Product f g a -> b # foldr' :: (a -> b -> b) -> b -> Product f g a -> b # foldl :: (b -> a -> b) -> b -> Product f g a -> b # foldl' :: (b -> a -> b) -> b -> Product f g a -> b # foldr1 :: (a -> a -> a) -> Product f g a -> a # foldl1 :: (a -> a -> a) -> Product f g a -> a # toList :: Product f g a -> [a] # null :: Product f g a -> Bool # length :: Product f g a -> Int # elem :: Eq a => a -> Product f g a -> Bool # maximum :: Ord a => Product f g a -> a # minimum :: Ord a => Product f g a -> a # sum :: Num a => Product f g a -> a # product :: Num a => Product f g a -> a #
(Foldable f, Foldable g) => Foldable (Sum f g) | Since: base-4.9.0.0
Instance details Defined in Data.Functor.Sum Methods fold :: Monoid m => Sum f g m -> m # foldMap :: Monoid m => (a -> m) -> Sum f g a -> m # foldMap' :: Monoid m => (a -> m) -> Sum f g a -> m # foldr :: (a -> b -> b) -> b -> Sum f g a -> b # foldr' :: (a -> b -> b) -> b -> Sum f g a -> b # foldl :: (b -> a -> b) -> b -> Sum f g a -> b # foldl' :: (b -> a -> b) -> b -> Sum f g a -> b # foldr1 :: (a -> a -> a) -> Sum f g a -> a # foldl1 :: (a -> a -> a) -> Sum f g a -> a # toList :: Sum f g a -> [a] # null :: Sum f g a -> Bool # length :: Sum f g a -> Int # elem :: Eq a => a -> Sum f g a -> Bool # maximum :: Ord a => Sum f g a -> a # minimum :: Ord a => Sum f g a -> a # sum :: Num a => Sum f g a -> a # product :: Num a => Sum f g a -> a #
(Foldable f, Foldable g) => Foldable (f :*: g) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Foldable Methods fold :: Monoid m => (f :*: g) m -> m # foldMap :: Monoid m => (a -> m) -> (f :*: g) a -> m # foldMap' :: Monoid m => (a -> m) -> (f :*: g) a -> m # foldr :: (a -> b -> b) -> b -> (f :*: g) a -> b # foldr' :: (a -> b -> b) -> b -> (f :*: g) a -> b # foldl :: (b -> a -> b) -> b -> (f :*: g) a -> b # foldl' :: (b -> a -> b) -> b -> (f :*: g) a -> b # foldr1 :: (a -> a -> a) -> (f :*: g) a -> a # foldl1 :: (a -> a -> a) -> (f :*: g) a -> a # toList :: (f :*: g) a -> [a] # null :: (f :*: g) a -> Bool # length :: (f :*: g) a -> Int # elem :: Eq a => a -> (f :*: g) a -> Bool # maximum :: Ord a => (f :*: g) a -> a # minimum :: Ord a => (f :*: g) a -> a # sum :: Num a => (f :*: g) a -> a # product :: Num a => (f :*: g) a -> a #
(Foldable f, Foldable g) => Foldable (f :+: g) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Foldable Methods fold :: Monoid m => (f :+: g) m -> m # foldMap :: Monoid m => (a -> m) -> (f :+: g) a -> m # foldMap' :: Monoid m => (a -> m) -> (f :+: g) a -> m # foldr :: (a -> b -> b) -> b -> (f :+: g) a -> b # foldr' :: (a -> b -> b) -> b -> (f :+: g) a -> b # foldl :: (b -> a -> b) -> b -> (f :+: g) a -> b # foldl' :: (b -> a -> b) -> b -> (f :+: g) a -> b # foldr1 :: (a -> a -> a) -> (f :+: g) a -> a # foldl1 :: (a -> a -> a) -> (f :+: g) a -> a # toList :: (f :+: g) a -> [a] # null :: (f :+: g) a -> Bool # length :: (f :+: g) a -> Int # elem :: Eq a => a -> (f :+: g) a -> Bool # maximum :: Ord a => (f :+: g) a -> a # minimum :: Ord a => (f :+: g) a -> a # sum :: Num a => (f :+: g) a -> a # product :: Num a => (f :+: g) a -> a #
Foldable (K1 i c :: Type -> Type) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Foldable Methods fold :: Monoid m => K1 i c m -> m # foldMap :: Monoid m => (a -> m) -> K1 i c a -> m # foldMap' :: Monoid m => (a -> m) -> K1 i c a -> m # foldr :: (a -> b -> b) -> b -> K1 i c a -> b # foldr' :: (a -> b -> b) -> b -> K1 i c a -> b # foldl :: (b -> a -> b) -> b -> K1 i c a -> b # foldl' :: (b -> a -> b) -> b -> K1 i c a -> b # foldr1 :: (a -> a -> a) -> K1 i c a -> a # foldl1 :: (a -> a -> a) -> K1 i c a -> a # toList :: K1 i c a -> [a] # null :: K1 i c a -> Bool # length :: K1 i c a -> Int # elem :: Eq a => a -> K1 i c a -> Bool # maximum :: Ord a => K1 i c a -> a # minimum :: Ord a => K1 i c a -> a # sum :: Num a => K1 i c a -> a # product :: Num a => K1 i c a -> a #
Foldable (Forget r a :: Type -> Type) |
Instance details Defined in Data.Profunctor.Types Methods fold :: Monoid m => Forget r a m -> m # foldMap :: Monoid m => (a0 -> m) -> Forget r a a0 -> m # foldMap' :: Monoid m => (a0 -> m) -> Forget r a a0 -> m # foldr :: (a0 -> b -> b) -> b -> Forget r a a0 -> b # foldr' :: (a0 -> b -> b) -> b -> Forget r a a0 -> b # foldl :: (b -> a0 -> b) -> b -> Forget r a a0 -> b # foldl' :: (b -> a0 -> b) -> b -> Forget r a a0 -> b # foldr1 :: (a0 -> a0 -> a0) -> Forget r a a0 -> a0 # foldl1 :: (a0 -> a0 -> a0) -> Forget r a a0 -> a0 # toList :: Forget r a a0 -> [a0] # null :: Forget r a a0 -> Bool # length :: Forget r a a0 -> Int # elem :: Eq a0 => a0 -> Forget r a a0 -> Bool # maximum :: Ord a0 => Forget r a a0 -> a0 # minimum :: Ord a0 => Forget r a a0 -> a0 # sum :: Num a0 => Forget r a a0 -> a0 # product :: Num a0 => Forget r a a0 -> a0 #
(Foldable f, Foldable g) => Foldable (Compose f g) | Since: base-4.9.0.0
Instance details Defined in Data.Functor.Compose Methods fold :: Monoid m => Compose f g m -> m # foldMap :: Monoid m => (a -> m) -> Compose f g a -> m # foldMap' :: Monoid m => (a -> m) -> Compose f g a -> m # foldr :: (a -> b -> b) -> b -> Compose f g a -> b # foldr' :: (a -> b -> b) -> b -> Compose f g a -> b # foldl :: (b -> a -> b) -> b -> Compose f g a -> b # foldl' :: (b -> a -> b) -> b -> Compose f g a -> b # foldr1 :: (a -> a -> a) -> Compose f g a -> a # foldl1 :: (a -> a -> a) -> Compose f g a -> a # toList :: Compose f g a -> [a] # null :: Compose f g a -> Bool # length :: Compose f g a -> Int # elem :: Eq a => a -> Compose f g a -> Bool # maximum :: Ord a => Compose f g a -> a # minimum :: Ord a => Compose f g a -> a # sum :: Num a => Compose f g a -> a # product :: Num a => Compose f g a -> a #
Foldable (Clown f a :: Type -> Type) |
Instance details Defined in Data.Bifunctor.Clown Methods fold :: Monoid m => Clown f a m -> m # foldMap :: Monoid m => (a0 -> m) -> Clown f a a0 -> m # foldMap' :: Monoid m => (a0 -> m) -> Clown f a a0 -> m # foldr :: (a0 -> b -> b) -> b -> Clown f a a0 -> b # foldr' :: (a0 -> b -> b) -> b -> Clown f a a0 -> b # foldl :: (b -> a0 -> b) -> b -> Clown f a a0 -> b # foldl' :: (b -> a0 -> b) -> b -> Clown f a a0 -> b # foldr1 :: (a0 -> a0 -> a0) -> Clown f a a0 -> a0 # foldl1 :: (a0 -> a0 -> a0) -> Clown f a a0 -> a0 # toList :: Clown f a a0 -> [a0] # null :: Clown f a a0 -> Bool # length :: Clown f a a0 -> Int # elem :: Eq a0 => a0 -> Clown f a a0 -> Bool # maximum :: Ord a0 => Clown f a a0 -> a0 # minimum :: Ord a0 => Clown f a a0 -> a0 # sum :: Num a0 => Clown f a a0 -> a0 # product :: Num a0 => Clown f a a0 -> a0 #
Bifoldable p => Foldable (Flip p a) |
Instance details Defined in Data.Bifunctor.Flip Methods fold :: Monoid m => Flip p a m -> m # foldMap :: Monoid m => (a0 -> m) -> Flip p a a0 -> m # foldMap' :: Monoid m => (a0 -> m) -> Flip p a a0 -> m # foldr :: (a0 -> b -> b) -> b -> Flip p a a0 -> b # foldr' :: (a0 -> b -> b) -> b -> Flip p a a0 -> b # foldl :: (b -> a0 -> b) -> b -> Flip p a a0 -> b # foldl' :: (b -> a0 -> b) -> b -> Flip p a a0 -> b # foldr1 :: (a0 -> a0 -> a0) -> Flip p a a0 -> a0 # foldl1 :: (a0 -> a0 -> a0) -> Flip p a a0 -> a0 # toList :: Flip p a a0 -> [a0] # null :: Flip p a a0 -> Bool # length :: Flip p a a0 -> Int # elem :: Eq a0 => a0 -> Flip p a a0 -> Bool # maximum :: Ord a0 => Flip p a a0 -> a0 # minimum :: Ord a0 => Flip p a a0 -> a0 # sum :: Num a0 => Flip p a a0 -> a0 # product :: Num a0 => Flip p a a0 -> a0 #
Foldable g => Foldable (Joker g a) |
Instance details Defined in Data.Bifunctor.Joker Methods fold :: Monoid m => Joker g a m -> m # foldMap :: Monoid m => (a0 -> m) -> Joker g a a0 -> m # foldMap' :: Monoid m => (a0 -> m) -> Joker g a a0 -> m # foldr :: (a0 -> b -> b) -> b -> Joker g a a0 -> b # foldr' :: (a0 -> b -> b) -> b -> Joker g a a0 -> b # foldl :: (b -> a0 -> b) -> b -> Joker g a a0 -> b # foldl' :: (b -> a0 -> b) -> b -> Joker g a a0 -> b # foldr1 :: (a0 -> a0 -> a0) -> Joker g a a0 -> a0 # foldl1 :: (a0 -> a0 -> a0) -> Joker g a a0 -> a0 # toList :: Joker g a a0 -> [a0] # null :: Joker g a a0 -> Bool # length :: Joker g a a0 -> Int # elem :: Eq a0 => a0 -> Joker g a a0 -> Bool # maximum :: Ord a0 => Joker g a a0 -> a0 # minimum :: Ord a0 => Joker g a a0 -> a0 # sum :: Num a0 => Joker g a a0 -> a0 # product :: Num a0 => Joker g a a0 -> a0 #
Bifoldable p => Foldable (WrappedBifunctor p a) |
Instance details Defined in Data.Bifunctor.Wrapped Methods fold :: Monoid m => WrappedBifunctor p a m -> m # foldMap :: Monoid m => (a0 -> m) -> WrappedBifunctor p a a0 -> m # foldMap' :: Monoid m => (a0 -> m) -> WrappedBifunctor p a a0 -> m # foldr :: (a0 -> b -> b) -> b -> WrappedBifunctor p a a0 -> b # foldr' :: (a0 -> b -> b) -> b -> WrappedBifunctor p a a0 -> b # foldl :: (b -> a0 -> b) -> b -> WrappedBifunctor p a a0 -> b # foldl' :: (b -> a0 -> b) -> b -> WrappedBifunctor p a a0 -> b # foldr1 :: (a0 -> a0 -> a0) -> WrappedBifunctor p a a0 -> a0 # foldl1 :: (a0 -> a0 -> a0) -> WrappedBifunctor p a a0 -> a0 # toList :: WrappedBifunctor p a a0 -> [a0] # null :: WrappedBifunctor p a a0 -> Bool # length :: WrappedBifunctor p a a0 -> Int # elem :: Eq a0 => a0 -> WrappedBifunctor p a a0 -> Bool # maximum :: Ord a0 => WrappedBifunctor p a a0 -> a0 # minimum :: Ord a0 => WrappedBifunctor p a a0 -> a0 # sum :: Num a0 => WrappedBifunctor p a a0 -> a0 # product :: Num a0 => WrappedBifunctor p a a0 -> a0 #
(Foldable f, Foldable g) => Foldable (f :.: g) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Foldable Methods fold :: Monoid m => (f :.: g) m -> m # foldMap :: Monoid m => (a -> m) -> (f :.: g) a -> m # foldMap' :: Monoid m => (a -> m) -> (f :.: g) a -> m # foldr :: (a -> b -> b) -> b -> (f :.: g) a -> b # foldr' :: (a -> b -> b) -> b -> (f :.: g) a -> b # foldl :: (b -> a -> b) -> b -> (f :.: g) a -> b # foldl' :: (b -> a -> b) -> b -> (f :.: g) a -> b # foldr1 :: (a -> a -> a) -> (f :.: g) a -> a # foldl1 :: (a -> a -> a) -> (f :.: g) a -> a # toList :: (f :.: g) a -> [a] # null :: (f :.: g) a -> Bool # length :: (f :.: g) a -> Int # elem :: Eq a => a -> (f :.: g) a -> Bool # maximum :: Ord a => (f :.: g) a -> a # minimum :: Ord a => (f :.: g) a -> a # sum :: Num a => (f :.: g) a -> a # product :: Num a => (f :.: g) a -> a #
Foldable f => Foldable (M1 i c f) | @since base-4.9.0.0
Instance details Defined in GHC.Internal.Data.Foldable Methods fold :: Monoid m => M1 i c f m -> m # foldMap :: Monoid m => (a -> m) -> M1 i c f a -> m # foldMap' :: Monoid m => (a -> m) -> M1 i c f a -> m # foldr :: (a -> b -> b) -> b -> M1 i c f a -> b # foldr' :: (a -> b -> b) -> b -> M1 i c f a -> b # foldl :: (b -> a -> b) -> b -> M1 i c f a -> b # foldl' :: (b -> a -> b) -> b -> M1 i c f a -> b # foldr1 :: (a -> a -> a) -> M1 i c f a -> a # foldl1 :: (a -> a -> a) -> M1 i c f a -> a # toList :: M1 i c f a -> [a] # null :: M1 i c f a -> Bool # length :: M1 i c f a -> Int # elem :: Eq a => a -> M1 i c f a -> Bool # maximum :: Ord a => M1 i c f a -> a # minimum :: Ord a => M1 i c f a -> a # sum :: Num a => M1 i c f a -> a # product :: Num a => M1 i c f a -> a #
(Foldable (f a), Foldable (g a)) => Foldable (Product f g a) |
Instance details Defined in Data.Bifunctor.Product Methods fold :: Monoid m => Product f g a m -> m # foldMap :: Monoid m => (a0 -> m) -> Product f g a a0 -> m # foldMap' :: Monoid m => (a0 -> m) -> Product f g a a0 -> m # foldr :: (a0 -> b -> b) -> b -> Product f g a a0 -> b # foldr' :: (a0 -> b -> b) -> b -> Product f g a a0 -> b # foldl :: (b -> a0 -> b) -> b -> Product f g a a0 -> b # foldl' :: (b -> a0 -> b) -> b -> Product f g a a0 -> b # foldr1 :: (a0 -> a0 -> a0) -> Product f g a a0 -> a0 # foldl1 :: (a0 -> a0 -> a0) -> Product f g a a0 -> a0 # toList :: Product f g a a0 -> [a0] # null :: Product f g a a0 -> Bool # length :: Product f g a a0 -> Int # elem :: Eq a0 => a0 -> Product f g a a0 -> Bool # maximum :: Ord a0 => Product f g a a0 -> a0 # minimum :: Ord a0 => Product f g a a0 -> a0 # sum :: Num a0 => Product f g a a0 -> a0 # product :: Num a0 => Product f g a a0 -> a0 #
(Foldable (f a), Foldable (g a)) => Foldable (Sum f g a) |
Instance details Defined in Data.Bifunctor.Sum Methods fold :: Monoid m => Sum f g a m -> m # foldMap :: Monoid m => (a0 -> m) -> Sum f g a a0 -> m # foldMap' :: Monoid m => (a0 -> m) -> Sum f g a a0 -> m # foldr :: (a0 -> b -> b) -> b -> Sum f g a a0 -> b # foldr' :: (a0 -> b -> b) -> b -> Sum f g a a0 -> b # foldl :: (b -> a0 -> b) -> b -> Sum f g a a0 -> b # foldl' :: (b -> a0 -> b) -> b -> Sum f g a a0 -> b # foldr1 :: (a0 -> a0 -> a0) -> Sum f g a a0 -> a0 # foldl1 :: (a0 -> a0 -> a0) -> Sum f g a a0 -> a0 # toList :: Sum f g a a0 -> [a0] # null :: Sum f g a a0 -> Bool # length :: Sum f g a a0 -> Int # elem :: Eq a0 => a0 -> Sum f g a a0 -> Bool # maximum :: Ord a0 => Sum f g a a0 -> a0 # minimum :: Ord a0 => Sum f g a a0 -> a0 # sum :: Num a0 => Sum f g a a0 -> a0 # product :: Num a0 => Sum f g a a0 -> a0 #
(Foldable f, Bifoldable p) => Foldable (Tannen f p a) |
Instance details Defined in Data.Bifunctor.Tannen Methods fold :: Monoid m => Tannen f p a m -> m # foldMap :: Monoid m => (a0 -> m) -> Tannen f p a a0 -> m # foldMap' :: Monoid m => (a0 -> m) -> Tannen f p a a0 -> m # foldr :: (a0 -> b -> b) -> b -> Tannen f p a a0 -> b # foldr' :: (a0 -> b -> b) -> b -> Tannen f p a a0 -> b # foldl :: (b -> a0 -> b) -> b -> Tannen f p a a0 -> b # foldl' :: (b -> a0 -> b) -> b -> Tannen f p a a0 -> b # foldr1 :: (a0 -> a0 -> a0) -> Tannen f p a a0 -> a0 # foldl1 :: (a0 -> a0 -> a0) -> Tannen f p a a0 -> a0 # toList :: Tannen f p a a0 -> [a0] # null :: Tannen f p a a0 -> Bool # length :: Tannen f p a a0 -> Int # elem :: Eq a0 => a0 -> Tannen f p a a0 -> Bool # maximum :: Ord a0 => Tannen f p a a0 -> a0 # minimum :: Ord a0 => Tannen f p a a0 -> a0 # sum :: Num a0 => Tannen f p a a0 -> a0 # product :: Num a0 => Tannen f p a a0 -> a0 #
(Bifoldable p, Foldable g) => Foldable (Biff p f g a) |
Instance details Defined in Data.Bifunctor.Biff Methods fold :: Monoid m => Biff p f g a m -> m # foldMap :: Monoid m => (a0 -> m) -> Biff p f g a a0 -> m # foldMap' :: Monoid m => (a0 -> m) -> Biff p f g a a0 -> m # foldr :: (a0 -> b -> b) -> b -> Biff p f g a a0 -> b # foldr' :: (a0 -> b -> b) -> b -> Biff p f g a a0 -> b # foldl :: (b -> a0 -> b) -> b -> Biff p f g a a0 -> b # foldl' :: (b -> a0 -> b) -> b -> Biff p f g a a0 -> b # foldr1 :: (a0 -> a0 -> a0) -> Biff p f g a a0 -> a0 # foldl1 :: (a0 -> a0 -> a0) -> Biff p f g a a0 -> a0 # toList :: Biff p f g a a0 -> [a0] # null :: Biff p f g a a0 -> Bool # length :: Biff p f g a a0 -> Int # elem :: Eq a0 => a0 -> Biff p f g a a0 -> Bool # maximum :: Ord a0 => Biff p f g a a0 -> a0 # minimum :: Ord a0 => Biff p f g a a0 -> a0 # sum :: Num a0 => Biff p f g a a0 -> a0 # product :: Num a0 => Biff p f g a a0 -> a0 #

data Fold a b #

Efficient representation of a left fold that preserves the fold's step function, initial accumulator, and extraction function

This allows the `Applicative` instance to assemble derived folds that traverse the container only once

A '`Fold` a b' processes elements of type a and results in a value of type b.

#### Instances

Instances details

Choice Fold # |
Instance details Defined in Control.Foldl Methods left' :: Fold a b -> Fold (Either a c) (Either b c) # right' :: Fold a b -> Fold (Either c a) (Either c b) #
Closed Fold # |
Instance details Defined in Control.Foldl Methods closed :: Fold a b -> Fold (x -> a) (x -> b) #
Costrong Fold # |
Instance details Defined in Control.Foldl Methods unfirst :: Fold (a, d) (b, d) -> Fold a b # unsecond :: Fold (d, a) (d, b) -> Fold a b #
Profunctor Fold # |
Instance details Defined in Control.Foldl Methods dimap :: (a -> b) -> (c -> d) -> Fold b c -> Fold a d # lmap :: (a -> b) -> Fold b c -> Fold a c # rmap :: (b -> c) -> Fold a b -> Fold a c # (#.) :: forall a b c q. Coercible c b => q b c -> Fold a b -> Fold a c # (.#) :: forall a b c q. Coercible b a => Fold b c -> q a b -> Fold a c #
Cosieve Fold [] # |
Instance details Defined in Control.Foldl Methods cosieve :: Fold a b -> [a] -> b #
Semigroupoid Fold # |
Instance details Defined in Control.Foldl Methods o :: Fold j k1 -> Fold i j -> Fold i k1 #
Comonad (Fold a) # |
Instance details Defined in Control.Foldl Methods extract :: Fold a a0 -> a0 # duplicate :: Fold a a0 -> Fold a (Fold a a0) # extend :: (Fold a a0 -> b) -> Fold a a0 -> Fold a b #
Applicative (Fold a) # |
Instance details Defined in Control.Foldl Methods pure :: a0 -> Fold a a0 # (<*>) :: Fold a (a0 -> b) -> Fold a a0 -> Fold a b # liftA2 :: (a0 -> b -> c) -> Fold a a0 -> Fold a b -> Fold a c # (*>) :: Fold a a0 -> Fold a b -> Fold a b # (<*) :: Fold a a0 -> Fold a b -> Fold a a0 #
Functor (Fold a) # |
Instance details Defined in Control.Foldl Methods fmap :: (a0 -> b) -> Fold a a0 -> Fold a b # (<$) :: a0 -> Fold a b -> Fold a a0 #
Extend (Fold a) # |
Instance details Defined in Control.Foldl Methods duplicated :: Fold a a0 -> Fold a (Fold a a0) # extended :: (Fold a a0 -> b) -> Fold a a0 -> Fold a b #
Monoid b => Monoid (Fold a b) # |
Instance details Defined in Control.Foldl Methods mempty :: Fold a b # mappend :: Fold a b -> Fold a b -> Fold a b # mconcat :: [Fold a b] -> Fold a b #
Semigroup b => Semigroup (Fold a b) # |
Instance details Defined in Control.Foldl Methods (<>) :: Fold a b -> Fold a b -> Fold a b # sconcat :: NonEmpty (Fold a b) -> Fold a b # stimes :: Integral b0 => b0 -> Fold a b -> Fold a b #
Floating b => Floating (Fold a b) # |
Instance details Defined in Control.Foldl Methods pi :: Fold a b # exp :: Fold a b -> Fold a b # log :: Fold a b -> Fold a b # sqrt :: Fold a b -> Fold a b # (**) :: Fold a b -> Fold a b -> Fold a b # logBase :: Fold a b -> Fold a b -> Fold a b # sin :: Fold a b -> Fold a b # cos :: Fold a b -> Fold a b # tan :: Fold a b -> Fold a b # asin :: Fold a b -> Fold a b # acos :: Fold a b -> Fold a b # atan :: Fold a b -> Fold a b # sinh :: Fold a b -> Fold a b # cosh :: Fold a b -> Fold a b # tanh :: Fold a b -> Fold a b # asinh :: Fold a b -> Fold a b # acosh :: Fold a b -> Fold a b # atanh :: Fold a b -> Fold a b # log1p :: Fold a b -> Fold a b # expm1 :: Fold a b -> Fold a b # log1pexp :: Fold a b -> Fold a b # log1mexp :: Fold a b -> Fold a b #
Num b => Num (Fold a b) # |
Instance details Defined in Control.Foldl Methods (+) :: Fold a b -> Fold a b -> Fold a b # (-) :: Fold a b -> Fold a b -> Fold a b # (*) :: Fold a b -> Fold a b -> Fold a b # negate :: Fold a b -> Fold a b # abs :: Fold a b -> Fold a b # signum :: Fold a b -> Fold a b # fromInteger :: Integer -> Fold a b #
Fractional b => Fractional (Fold a b) # |
Instance details Defined in Control.Foldl Methods (/) :: Fold a b -> Fold a b -> Fold a b # recip :: Fold a b -> Fold a b # fromRational :: Rational -> Fold a b #

data FoldM (m :: Type -> Type) a b #

Like `Fold`, but monadic.

A '`FoldM` m a b' processes elements of type a and results in a monadic value of type m b.

#### Instances

Instances details

Functor m => Profunctor (FoldM m) # |
Instance details Defined in Control.Foldl Methods dimap :: (a -> b) -> (c -> d) -> FoldM m b c -> FoldM m a d # lmap :: (a -> b) -> FoldM m b c -> FoldM m a c # rmap :: (b -> c) -> FoldM m a b -> FoldM m a c # (#.) :: forall a b c q. Coercible c b => q b c -> FoldM m a b -> FoldM m a c # (.#) :: forall a b c q. Coercible b a => FoldM m b c -> q a b -> FoldM m a c #
Applicative m => Applicative (FoldM m a) # |
Instance details Defined in Control.Foldl Methods pure :: a0 -> FoldM m a a0 # (<*>) :: FoldM m a (a0 -> b) -> FoldM m a a0 -> FoldM m a b # liftA2 :: (a0 -> b -> c) -> FoldM m a a0 -> FoldM m a b -> FoldM m a c # (*>) :: FoldM m a a0 -> FoldM m a b -> FoldM m a b # (<*) :: FoldM m a a0 -> FoldM m a b -> FoldM m a a0 #
Functor m => Functor (FoldM m a) # |
Instance details Defined in Control.Foldl Methods fmap :: (a0 -> b) -> FoldM m a a0 -> FoldM m a b # (<$) :: a0 -> FoldM m a b -> FoldM m a a0 #
Monad m => Extend (FoldM m a) # |
Instance details Defined in Control.Foldl Methods duplicated :: FoldM m a a0 -> FoldM m a (FoldM m a a0) # extended :: (FoldM m a a0 -> b) -> FoldM m a a0 -> FoldM m a b #
(Monoid b, Monad m) => Monoid (FoldM m a b) # |
Instance details Defined in Control.Foldl Methods mempty :: FoldM m a b # mappend :: FoldM m a b -> FoldM m a b -> FoldM m a b # mconcat :: [FoldM m a b] -> FoldM m a b #
(Semigroup b, Monad m) => Semigroup (FoldM m a b) # |
Instance details Defined in Control.Foldl Methods (<>) :: FoldM m a b -> FoldM m a b -> FoldM m a b # sconcat :: NonEmpty (FoldM m a b) -> FoldM m a b # stimes :: Integral b0 => b0 -> FoldM m a b -> FoldM m a b #
(Monad m, Floating b) => Floating (FoldM m a b) # |
Instance details Defined in Control.Foldl Methods pi :: FoldM m a b # exp :: FoldM m a b -> FoldM m a b # log :: FoldM m a b -> FoldM m a b # sqrt :: FoldM m a b -> FoldM m a b # (**) :: FoldM m a b -> FoldM m a b -> FoldM m a b # logBase :: FoldM m a b -> FoldM m a b -> FoldM m a b # sin :: FoldM m a b -> FoldM m a b # cos :: FoldM m a b -> FoldM m a b # tan :: FoldM m a b -> FoldM m a b # asin :: FoldM m a b -> FoldM m a b # acos :: FoldM m a b -> FoldM m a b # atan :: FoldM m a b -> FoldM m a b # sinh :: FoldM m a b -> FoldM m a b # cosh :: FoldM m a b -> FoldM m a b # tanh :: FoldM m a b -> FoldM m a b # asinh :: FoldM m a b -> FoldM m a b # acosh :: FoldM m a b -> FoldM m a b # atanh :: FoldM m a b -> FoldM m a b # log1p :: FoldM m a b -> FoldM m a b # expm1 :: FoldM m a b -> FoldM m a b # log1pexp :: FoldM m a b -> FoldM m a b # log1mexp :: FoldM m a b -> FoldM m a b #
(Monad m, Num b) => Num (FoldM m a b) # |
Instance details Defined in Control.Foldl Methods (+) :: FoldM m a b -> FoldM m a b -> FoldM m a b # (-) :: FoldM m a b -> FoldM m a b -> FoldM m a b # (*) :: FoldM m a b -> FoldM m a b -> FoldM m a b # negate :: FoldM m a b -> FoldM m a b # abs :: FoldM m a b -> FoldM m a b # signum :: FoldM m a b -> FoldM m a b # fromInteger :: Integer -> FoldM m a b #
(Monad m, Fractional b) => Fractional (FoldM m a b) # |
Instance details Defined in Control.Foldl Methods (/) :: FoldM m a b -> FoldM m a b -> FoldM m a b # recip :: FoldM m a b -> FoldM m a b # fromRational :: Rational -> FoldM m a b #

data ByteString #

A space-efficient representation of a `Word8` vector, supporting many efficient operations.

A `ByteString` contains 8-bit bytes, or by using the operations from Data.ByteString.Char8 it can be interpreted as containing 8-bit characters.

#### Instances

Instances details

NFData ByteString |
Instance details Defined in Data.ByteString.Internal.Type Methods rnf :: ByteString -> () #
Monoid ByteString |
Instance details Defined in Data.ByteString.Internal.Type Methods mempty :: ByteString # mappend :: ByteString -> ByteString -> ByteString # mconcat :: [ByteString] -> ByteString #
Semigroup ByteString |
Instance details Defined in Data.ByteString.Internal.Type Methods (<>) :: ByteString -> ByteString -> ByteString # sconcat :: NonEmpty ByteString -> ByteString # stimes :: Integral b => b -> ByteString -> ByteString #
Data ByteString |
Instance details Defined in Data.ByteString.Internal.Type Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ByteString -> c ByteString # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ByteString # toConstr :: ByteString -> Constr # dataTypeOf :: ByteString -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ByteString) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ByteString) # gmapT :: (forall b. Data b => b -> b) -> ByteString -> ByteString # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ByteString -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ByteString -> r # gmapQ :: (forall d. Data d => d -> u) -> ByteString -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> ByteString -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> ByteString -> m ByteString # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ByteString -> m ByteString # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ByteString -> m ByteString #
IsString ByteString | Beware: `fromString` truncates multi-byte characters to octets. e.g. "枯朶に烏のとまりけり秋の暮" becomes �6k�nh~�Q��n�
Instance details Defined in Data.ByteString.Internal.Type Methods fromString :: String -> ByteString #
IsList ByteString | Since: bytestring-0.10.12.0
Instance details Defined in Data.ByteString.Internal.Type Associated Types
type Item ByteString |
Instance details Defined in Data.ByteString.Internal.Type type Item ByteString = Word8
Methods fromList :: [Item ByteString] -> ByteString # fromListN :: Int -> [Item ByteString] -> ByteString # toList :: ByteString -> [Item ByteString] #
Read ByteString |
Instance details Defined in Data.ByteString.Internal.Type Methods readsPrec :: Int -> ReadS ByteString # readList :: ReadS [ByteString] # readPrec :: ReadPrec ByteString # readListPrec :: ReadPrec [ByteString] #
Show ByteString |
Instance details Defined in Data.ByteString.Internal.Type Methods showsPrec :: Int -> ByteString -> ShowS # show :: ByteString -> String # showList :: [ByteString] -> ShowS #
Eq ByteString |
Instance details Defined in Data.ByteString.Internal.Type Methods (==) :: ByteString -> ByteString -> Bool # (/=) :: ByteString -> ByteString -> Bool #
Ord ByteString |
Instance details Defined in Data.ByteString.Internal.Type Methods compare :: ByteString -> ByteString -> Ordering # (<) :: ByteString -> ByteString -> Bool # (<=) :: ByteString -> ByteString -> Bool # (>) :: ByteString -> ByteString -> Bool # (>=) :: ByteString -> ByteString -> Bool # max :: ByteString -> ByteString -> ByteString # min :: ByteString -> ByteString -> ByteString #
Hashable ByteString |
Instance details Defined in Data.Hashable.Class Methods hashWithSalt :: Int -> ByteString -> Int # hash :: ByteString -> Int #
Lift ByteString | Since: bytestring-0.11.2.0
Instance details Defined in Data.ByteString.Internal.Type Methods lift :: Quote m => ByteString -> m Exp # liftTyped :: forall (m :: Type -> Type). Quote m => ByteString -> Code m ByteString #
type Item ByteString |
Instance details Defined in Data.ByteString.Internal.Type type Item ByteString = Word8

data Word8 #

8-bit unsigned integer type

#### Instances

Instances details

PrintfArg Word8 | Since: base-2.1
Instance details Defined in Text.Printf Methods formatArg :: Word8 -> FieldFormatter # parseFormat :: Word8 -> ModifierParser #
Bits Word8 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods (.&.) :: Word8 -> Word8 -> Word8 # (.|.) :: Word8 -> Word8 -> Word8 # xor :: Word8 -> Word8 -> Word8 # complement :: Word8 -> Word8 # shift :: Word8 -> Int -> Word8 # rotate :: Word8 -> Int -> Word8 # zeroBits :: Word8 # bit :: Int -> Word8 # setBit :: Word8 -> Int -> Word8 # clearBit :: Word8 -> Int -> Word8 # complementBit :: Word8 -> Int -> Word8 # testBit :: Word8 -> Int -> Bool # bitSizeMaybe :: Word8 -> Maybe Int # bitSize :: Word8 -> Int # isSigned :: Word8 -> Bool # shiftL :: Word8 -> Int -> Word8 # unsafeShiftL :: Word8 -> Int -> Word8 # shiftR :: Word8 -> Int -> Word8 # unsafeShiftR :: Word8 -> Int -> Word8 # rotateL :: Word8 -> Int -> Word8 # rotateR :: Word8 -> Int -> Word8 # popCount :: Word8 -> Int #
FiniteBits Word8 | @since base-4.6.0.0
Instance details Defined in GHC.Internal.Word Methods finiteBitSize :: Word8 -> Int # countLeadingZeros :: Word8 -> Int # countTrailingZeros :: Word8 -> Int #
Bounded Word8 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods minBound :: Word8 # maxBound :: Word8 #
Enum Word8 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods succ :: Word8 -> Word8 # pred :: Word8 -> Word8 # toEnum :: Int -> Word8 # fromEnum :: Word8 -> Int # enumFrom :: Word8 -> [Word8] # enumFromThen :: Word8 -> Word8 -> [Word8] # enumFromTo :: Word8 -> Word8 -> [Word8] # enumFromThenTo :: Word8 -> Word8 -> Word8 -> [Word8] #
Ix Word8 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods range :: (Word8, Word8) -> [Word8] # index :: (Word8, Word8) -> Word8 -> Int # unsafeIndex :: (Word8, Word8) -> Word8 -> Int # inRange :: (Word8, Word8) -> Word8 -> Bool # rangeSize :: (Word8, Word8) -> Int # unsafeRangeSize :: (Word8, Word8) -> Int #
Num Word8 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods (+) :: Word8 -> Word8 -> Word8 # (-) :: Word8 -> Word8 -> Word8 # (*) :: Word8 -> Word8 -> Word8 # negate :: Word8 -> Word8 # abs :: Word8 -> Word8 # signum :: Word8 -> Word8 # fromInteger :: Integer -> Word8 #
Integral Word8 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods quot :: Word8 -> Word8 -> Word8 # rem :: Word8 -> Word8 -> Word8 # div :: Word8 -> Word8 -> Word8 # mod :: Word8 -> Word8 -> Word8 # quotRem :: Word8 -> Word8 -> (Word8, Word8) # divMod :: Word8 -> Word8 -> (Word8, Word8) # toInteger :: Word8 -> Integer #
Real Word8 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods toRational :: Word8 -> Rational #
Show Word8 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods showsPrec :: Int -> Word8 -> ShowS # show :: Word8 -> String # showList :: [Word8] -> ShowS #
Eq Word8 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods (==) :: Word8 -> Word8 -> Bool # (/=) :: Word8 -> Word8 -> Bool #
Ord Word8 | @since base-2.01
Instance details Defined in GHC.Internal.Word Methods compare :: Word8 -> Word8 -> Ordering # (<) :: Word8 -> Word8 -> Bool # (<=) :: Word8 -> Word8 -> Bool # (>) :: Word8 -> Word8 -> Bool # (>=) :: Word8 -> Word8 -> Bool # max :: Word8 -> Word8 -> Word8 # min :: Word8 -> Word8 -> Word8 #
Hashable Word8 |
Instance details Defined in Data.Hashable.Class Methods hashWithSalt :: Int -> Word8 -> Int # hash :: Word8 -> Int #
Prim Word8 |
Instance details Defined in Data.Primitive.Types Methods sizeOfType# :: Proxy Word8 -> Int# # sizeOf# :: Word8 -> Int# # alignmentOfType# :: Proxy Word8 -> Int# # alignment# :: Word8 -> Int# # indexByteArray# :: ByteArray# -> Int# -> Word8 # readByteArray# :: MutableByteArray# s -> Int# -> State# s -> (# State# s, Word8 #) # writeByteArray# :: MutableByteArray# s -> Int# -> Word8 -> State# s -> State# s # setByteArray# :: MutableByteArray# s -> Int# -> Int# -> Word8 -> State# s -> State# s # indexOffAddr# :: Addr# -> Int# -> Word8 # readOffAddr# :: Addr# -> Int# -> State# s -> (# State# s, Word8 #) # writeOffAddr# :: Addr# -> Int# -> Word8 -> State# s -> State# s # setOffAddr# :: Addr# -> Int# -> Int# -> Word8 -> State# s -> State# s #
Random Word8 |
Instance details Defined in System.Random Methods randomR :: RandomGen g => (Word8, Word8) -> g -> (Word8, g) # random :: RandomGen g => g -> (Word8, g) # randomRs :: RandomGen g => (Word8, Word8) -> g -> [Word8] # randoms :: RandomGen g => g -> [Word8] #
Uniform Word8 |
Instance details Defined in System.Random.Internal Methods uniformM :: StatefulGen g m => g -> m Word8 #
UniformRange Word8 |
Instance details Defined in System.Random.Internal Methods uniformRM :: StatefulGen g m => (Word8, Word8) -> g -> m Word8 # isInRange :: (Word8, Word8) -> Word8 -> Bool #
Unbox Word8 |
Instance details Defined in Data.Vector.Unboxed.Base
Vector Vector Word8 |
Instance details Defined in Data.Vector.Unboxed.Base Methods basicUnsafeFreeze :: Mutable Vector s Word8 -> ST s (Vector Word8) basicUnsafeThaw :: Vector Word8 -> ST s (Mutable Vector s Word8) basicLength :: Vector Word8 -> Int basicUnsafeSlice :: Int -> Int -> Vector Word8 -> Vector Word8 basicUnsafeIndexM :: Vector Word8 -> Int -> Box Word8 basicUnsafeCopy :: Mutable Vector s Word8 -> Vector Word8 -> ST s () elemseq :: Vector Word8 -> Word8 -> b -> b
MVector MVector Word8 |
Instance details Defined in Data.Vector.Unboxed.Base Methods basicLength :: MVector s Word8 -> Int basicUnsafeSlice :: Int -> Int -> MVector s Word8 -> MVector s Word8 basicOverlaps :: MVector s Word8 -> MVector s Word8 -> Bool basicUnsafeNew :: Int -> ST s (MVector s Word8) basicInitialize :: MVector s Word8 -> ST s () basicUnsafeReplicate :: Int -> Word8 -> ST s (MVector s Word8) basicUnsafeRead :: MVector s Word8 -> Int -> ST s Word8 basicUnsafeWrite :: MVector s Word8 -> Int -> Word8 -> ST s () basicClear :: MVector s Word8 -> ST s () basicSet :: MVector s Word8 -> Word8 -> ST s () basicUnsafeCopy :: MVector s Word8 -> MVector s Word8 -> ST s () basicUnsafeMove :: MVector s Word8 -> MVector s Word8 -> ST s () basicUnsafeGrow :: MVector s Word8 -> Int -> ST s (MVector s Word8)
newtype Vector Word8 |
Instance details Defined in Data.Vector.Unboxed.Base newtype Vector Word8 = V_Word8 (Vector Word8)
newtype MVector s Word8 |
Instance details Defined in Data.Vector.Unboxed.Base newtype MVector s Word8 = MV_Word8 (MVector s Word8)