So, I'm parsing some JSON into a custom data type with aeson, and I can't seem to understand why Haskell needs to have two representations of certain types in a library. In my case, this is all related to text.
For example:
Couldn't match expected type `Data.ByteString.Internal.ByteString'
with actual type `B.ByteString'.
Uhm, what? How are those two not the same? Why is there Data.ByteString.ByteString
and Data.ByteString.Internal.ByteString
? I don't understand why those two are two distinct types and why I'd need to convert between them.
Is there a guide somewhere that covers the use of ByteStrings? I understand they are way more efficient than String
s if you're only dealing with ASCII.