[Haskell-cafe] dumping ByteArray#
Kazu Yamamoto (=?iso-2022-jp?B?GyRCOzNLXE9CSScbKEI=?=)
kazu at iij.ad.jp
Sat Mar 29 04:35:27 UTC 2025
Hi Viktor,
>> For debugging, I need to dump the inside of `ByteArray#`.
>> Are there any utility functions for this purpose?
>
> The `SBS` pattern in `Data.ByteString.Short.Internal` wraps up
> a `ByteArray#` as `ShortByteString`.
Excellent! `SBS` works perfectly to me. Thank you.
> What sort of "dump" did you have in mind? A hexadecimal encoding?
> Something else?
I'm debugging BCrypt hash in "crypton" which fails a test case only on
arm64 architecture. I suspect that Context of blowfish created on
arm64 is differrent from that on x86_64. `SBS` tells me that they are
actually different. So, a bug exists in the functions to create
Context. I can take a step forward now.
--Kazu
More information about the Haskell-Cafe
mailing list