
28 Mar
2025
28 Mar
'25
10:38 p.m.
On Sat, Mar 29, 2025 at 11:25:17AM +0900, Kazu Yamamoto (山本和彦) via Haskell-Cafe wrote:
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`. $ ghci GHCi, version 9.8.1: https://www.haskell.org/ghc/ :? for help Loaded GHCi configuration from /home/viktor/.ghc/ghci.conf λ> import Data.ByteString.Short.Internal λ> :info SBS pattern SBS :: GHC.Prim.ByteArray# -> ShortByteString -- Defined in ‘Data.ByteString.Short.Internal’ λ> What sort of "dump" did you have in mind? A hexadecimal encoding? Something else? -- Viktor.