Re: dumping ByteArray#

"Kazu Yamamoto \(山本和彦\) via Haskell-Cafe" <[email protected]>
Newsgroups gmane.comp.lang.haskell.cafe
Message-ID <[email protected]>
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


_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.