head package:bytestring

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.
O(1) Extract the first element of a ByteString, which must be non-empty.
O(1) Extract the first element of a ByteString, which must be non-empty. This is a partial function, consider using uncons instead.
O(1) Extract the first element of a ShortByteString, which must be non-empty. An exception will be thrown in the case of an empty ShortByteString. This is a partial function, consider using uncons instead.
The memory management overhead. Currently this is tuned for GHC only.
A variety of head for non-empty ByteStrings. unsafeHead omits the check for the empty case, so there is an obligation on the programmer to provide a proof that the ByteString is non-empty.