On Wed, Aug 5, 2009 at 1:24 PM, Taru Karttunen <taruti@taruti.net> wrote:
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