How to convert ByteString to [Word8] in Haskell?
- by bodacydo
I am dealing with ByteStrings and at this one place I need to use [Word8] but I have a ByteString. How do I convert a ByteString to [Word8] list?
I tried unpack function from ByteString library but it returned a [Char] list rather than [Word8] list. Do I need to take this step and convert it first to [Char] list and only to [Word8] list? If so, how do I do that.
Please advise the most efficient method!
Thank you!