[web-devel] Proposal: http-types

Neil Mitchell ndmitchell at gmail.com
Wed Feb 2 15:31:02 CET 2011

> No matter what we will need the bytestring dependency to define the
> CIByteString datatype. But is there an advantage to this polymorphism?

Yes, there is no need to define CIByteString at all - that can come in
the WAI package, and since it has a IsString instance it will work
with the http-types library automatically.

> I can't think of a use case for a status message or a header to be
> anything but a ByteString.

Perhaps, but by making them IsString you keep full flexibility, remove
all debates over things like whether hdrContentType should be
CIByteString, what functions should be on CIByteString etc.

Thanks, Neil

PS. I'm not actually too interested in the results, as long as they
slot into WAI I don't mind what the types are - the IsString was just
an idea that might make things simpler and more flexible (or might

More information about the web-devel mailing list