unsafeHead

unsafeHead :: ByteString -> Word8
bytestring Data.ByteString.Unsafe
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.
unsafeHead :: Text -> Char
text Data.Text.Unsafe
O(1) A variant of head for non-empty Text. unsafeHead omits the check for the empty case, so there is an obligation on the programmer to provide a proof that the Text is non-empty.