Heads up: planned removal of String instances from HTTP package

Hi, tl;dr: I'm planning on removing the String instances from the HTTP package. This is likely to break code. Obviously it will involve a major version bump. The basic reason is that this instance is rather broken in itself. A String ought to represent Unicode data, but the HTTP wire format is bytes, and HTTP makes no attempt to handle encoding. This was discussed on the libraries@ list a while back, but I'm happy to discuss further if there's a general feeling that this is a bad thing to do: http://www.haskell.org/pipermail/libraries/2012-September/018426.html I will probably upload the new version in a week or two. Cheers, Ganesh

On Tue, Jan 29, 2013 at 2:15 PM, Ganesh Sittampalam
tl;dr: I'm planning on removing the String instances from the HTTP package. This is likely to break code. Obviously it will involve a major version bump.
The basic reason is that this instance is rather broken in itself. A String ought to represent Unicode data, but the HTTP wire format is bytes, and HTTP makes no attempt to handle encoding.
This was discussed on the libraries@ list a while back, but I'm happy to discuss further if there's a general feeling that this is a bad thing to do:
http://www.haskell.org/pipermail/libraries/2012-September/018426.html
I will probably upload the new version in a week or two.
I think it's the right thing to do. Providing a little upgrade guide should help things to go smoother.

On 29/01/2013 22:46, Johan Tibell wrote:
On Tue, Jan 29, 2013 at 2:15 PM, Ganesh Sittampalam
wrote: tl;dr: I'm planning on removing the String instances from the HTTP package. This is likely to break code. Obviously it will involve a major version bump.
I think it's the right thing to do. Providing a little upgrade guide should help things to go smoother.
One obvious cheap-and-dirty migration is via a newtype wrapper for String that embeds the old broken behaviour (char8 encoding). Perhaps the package should provide that? (with appropriate warnings etc) Ganesh

Maybe (just my 2 cents!) since you are going to broke the API anyway, go
for it
and seize the occasion to really clean up :)
Obviously I'm saying this from a non-http-user point of view, maybe if I had
some code in production affected by this, my suggestion would have been
different :P
Regards,
A.
On 30 January 2013 07:00, Ganesh Sittampalam
On 29/01/2013 22:46, Johan Tibell wrote:
On Tue, Jan 29, 2013 at 2:15 PM, Ganesh Sittampalam
wrote: tl;dr: I'm planning on removing the String instances from the HTTP package. This is likely to break code. Obviously it will involve a major version bump.
I think it's the right thing to do. Providing a little upgrade guide should help things to go smoother.
One obvious cheap-and-dirty migration is via a newtype wrapper for String that embeds the old broken behaviour (char8 encoding). Perhaps the package should provide that? (with appropriate warnings etc)
Ganesh
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Unfortunately I lack the time for a wholesale cleanup. If others have proposals and are willing to supply the patches that's a different matter! On 30/01/2013 08:01, Alfredo Di Napoli wrote:
Maybe (just my 2 cents!) since you are going to broke the API anyway, go for it and seize the occasion to really clean up :) Obviously I'm saying this from a non-http-user point of view, maybe if I had some code in production affected by this, my suggestion would have been different :P
Regards, A.
On 30 January 2013 07:00, Ganesh Sittampalam
mailto:ganesh@earth.li> wrote: On 29/01/2013 22:46, Johan Tibell wrote: > On Tue, Jan 29, 2013 at 2:15 PM, Ganesh Sittampalam
mailto:ganesh@earth.li> wrote: >> tl;dr: I'm planning on removing the String instances from the HTTP >> package. This is likely to break code. Obviously it will involve a major >> version bump. > > I think it's the right thing to do. Providing a little upgrade guide > should help things to go smoother. One obvious cheap-and-dirty migration is via a newtype wrapper for String that embeds the old broken behaviour (char8 encoding). Perhaps the package should provide that? (with appropriate warnings etc)
Ganesh
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org mailto:Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
participants (3)
-
Alfredo Di Napoli
-
Ganesh Sittampalam
-
Johan Tibell