HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulefoldl-1.4.18Haskell2010

Control.Foldl.ByteString

Folds for byte streams

  • 4 types
  • 1 class
  • 18 values
  • Packagefoldl-1.4.18
  • Exports23
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceByteString.hs

Folding

2 declarations

Folds

16 declarations

Re-exports

5 declarations

Control.Foldl re-exports the Fold type

Data.ByteString re-exports the ByteString type

Data.Word re-exports the Word8 type

datadata 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.

Instances15Choice, Closed, Costrong, Profunctor, Semigroupoid, Cosieve, …
datadata 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.

Instances9Profunctor, Functor, Applicative, Extend, Floating, Fractional, …
classclass Foldable (t :: Type -> Type) where
#

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#overview.

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

Instances89Foldable, …
datadata 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.

Instances14IsList, Eq, Data, Ord, Read, Show, …
  • IsList ByteStringDefined in bytestring-0.12.2.0 · Data.ByteString.Internal.Type
  • Eq ByteStringDefined in bytestring-0.12.2.0 · Data.ByteString.Internal.Type
  • Data ByteStringDefined in bytestring-0.12.2.0 · Data.ByteString.Internal.Type
  • Ord ByteStringDefined in bytestring-0.12.2.0 · Data.ByteString.Internal.Type
  • Read ByteStringDefined in bytestring-0.12.2.0 · Data.ByteString.Internal.Type
  • Show ByteStringDefined in bytestring-0.12.2.0 · Data.ByteString.Internal.Type
  • IsString ByteStringDefined in bytestring-0.12.2.0 · Data.ByteString.Internal.Type

    Beware: fromString truncates multi-byte characters to octets. e.g. "枯朶に烏のとまりけり秋の暮" becomes �6k�nh~�Q��n�

  • Semigroup ByteStringDefined in bytestring-0.12.2.0 · Data.ByteString.Internal.Type
  • Monoid ByteStringDefined in bytestring-0.12.2.0 · Data.ByteString.Internal.Type
  • NFData ByteStringDefined in bytestring-0.12.2.0 · Data.ByteString.Internal.Type
  • Binary ByteStringDefined in binary-0.8.9.3 · Data.Binary.Class
  • Hashable ByteStringDefined in hashable-1.4.7.0 · Data.Hashable.Class
  • Lift ByteStringDefined in bytestring-0.12.2.0 · Data.ByteString.Internal.Type
  • type Item ByteString = Word8Defined in bytestring-0.12.2.0 · Data.ByteString.Internal.Type
datadata Word8
#

8-bit unsigned integer type

Instances32Bounded, Enum, Eq, Integral, Data, Num, …
  • Bounded Word8Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Enum Word8Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Eq Word8Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Integral Word8Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Data Word8Defined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Num Word8Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Ord Word8Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Read Word8Defined in ghc-internal-9.1003.0 · GHC.Internal.Read
  • Real Word8Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Show Word8Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Ix Word8Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Bits Word8Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • FiniteBits Word8Defined in ghc-internal-9.1003.0 · GHC.Internal.Word
  • Storable Word8Defined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.Storable
  • PrintfArg Word8Defined in base-4.20.2.0 · Text.Printf
  • NFData Word8Defined in deepseq-1.5.0.0 · Control.DeepSeq
  • Random Word8Defined in random-1.2.1.3 · System.Random
  • Finite Word8Defined in random-1.2.1.3 · System.Random.GFinite
  • Uniform Word8Defined in random-1.2.1.3 · System.Random.Internal
  • UniformRange Word8Defined in random-1.2.1.3 · System.Random.Internal
  • Binary Word8Defined in binary-0.8.9.3 · Data.Binary.Class
  • Hashable Word8Defined in hashable-1.4.7.0 · Data.Hashable.Class
  • Prim Word8Defined in primitive-0.9.1.0 · Data.Primitive.Types
  • Unbox Word8Defined in vector-0.13.2.0 · Data.Vector.Unboxed.Base
  • Lift Word8Defined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • IArray UArray Word8Defined in array-0.5.8.0 · Data.Array.Base
  • Vector Vector Word8Defined in vector-0.13.2.0 · Data.Vector.Unboxed.Base
  • MVector MVector Word8Defined in vector-0.13.2.0 · Data.Vector.Unboxed.Base
  • MArray IOUArray Word8 IODefined in array-0.5.8.0 · Data.Array.IO.Internals
  • MArray (STUArray s) Word8 (ST s)Defined in array-0.5.8.0 · Data.Array.Base
  • data MVector s Word8Defined in vector-0.13.2.0 · Data.Vector.Unboxed.Base
  • data Vector Word8Defined in vector-0.13.2.0 · Data.Vector.Unboxed.Base