
2 Feb
2011
2 Feb
'11
7:07 a.m.
On Wed, Feb 2, 2011 at 12:04 PM, Neil Mitchell
Why not do:
hdrContentType :: IsString a => a
And similarly for all values that are just strings. You eliminate the bytestring package dependency, and nothing will need to know whether things are String, Text, LazyByteString, ByteString or CIByteString (or even Builder values).
You most definitely need to know whether something is Unicode or binary data. For example, the IsString type for ByteString is in essence an unsafe cast from [Word8] to [Char], assuming that the [Word8] contains latin1 encoded text. This assumption is not checked. Johan