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

GHC 9.14.1 · lts/ghc-9.14.x · 45dd537 · 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