I'm new to Haskell and I'm trying to use a pure SHA1 implementation in my app (Data.Digest.Pure.SHA
) with a JSON library (AttoJSON
).
AttoJSON uses Data.ByteString.Char8
bytestrings, SHA uses Data.ByteString.Lazy
bytestrings, and some of my string literals in my app are [Char]
.
Haskell Prime's wiki page on Char types seems to indicate this is something still being worked out in the Haskell language/Prelude.
And this blogpost on unicode support lists a few libraries but its a couple years old.
What is the current best way to convert between these types, and what are some of the tradeoffs?
Thanks!