HORIZON HASKELLDocslts/ghc-10.0.xfc4e5982026-10-11Search names, modules, packages, or :: a typeCtrl K

GHC 10.0.0.20260917 · lts/ghc-10.0.x · fc4e598 · 2026-10-11

Modulerio-0.1.25.0Haskell2010

RIO.ByteString.Partial

Strict ByteString partial functions. Import as:

import qualified RIO.ByteString.Partial as B'
  • 10 values
  • Packagerio-0.1.25.0
  • Exports10
  • LanguageHaskell2010
  • LicenceMIT
  • SourcePartial.hs

Basic interface

4 declarations
valuehead :: HasCallStack => ByteString -> Word8
#

O(1) Extract the first element of a ByteString, which must be non-empty. An exception will be thrown in the case of an empty ByteString.

This is a partial function, consider using uncons instead.

valuelast :: HasCallStack => ByteString -> Word8
#

O(1) Extract the last element of a ByteString, which must be finite and non-empty. An exception will be thrown in the case of an empty ByteString.

This is a partial function, consider using unsnoc instead.

O(1) Extract the elements after the head of a ByteString, which must be non-empty. An exception will be thrown in the case of an empty ByteString.

This is a partial function, consider using uncons instead.

Reducing ByteStrings (folds)

4 declarations

Special folds

2 declarations