
5 Aug
2009
5 Aug
'09
8:01 a.m.
On Wed, Aug 5, 2009 at 1:24 PM, Taru Karttunen
Hello
It seems like a very common issue to have an API like:
foo :: String -> Foo fooBS :: ByteString -> Foo fooLBS:: L.ByteString -> Foo
is there currently a library that makes unifying them easy?
They cannot be completely unified. A sequence of Unicode characters (String) is not the same kind of thing as a sequence of bytes (ByteString). Going between the two requires an encoding. A shared abstraction would support a subset of operations that make sense on all sequences. Cheers, Johan