Re: Haskell Platform proposal: Add case-insensitive and Haskell 98/2010 compliance

On Mon, 14 Jan 2013, Ben Millwood wrote:
In response to this, I ask you: is compatibility with the platform really a goal for your live-sequencer? Would the live-sequencer benefit particularly from use of the case-insensitive package? Would making the case-insensitive package Haskell2010 enable it to work with your interpreter immediately?
My answer is no, and I think it is the wrong question. My point was, that case-insensitive can easily be made both Haskell98/2010 and thus improve - the same way the "split" package improved by removing the GADT when it was added to the platform. I had actual problems when trying to do something sensible with JHC. It meant that I had to inspect and "fix" a lot of packages at once before seeing anything running. Not very encouraging when you try a different compiler. FlexibleInstances are not necessary for defining instances on Strings and if a package enters the platform it is a good opportunity to fix that. Platform packages also play a role as packages where beginners look first when they want to learn how to program real-world Haskell.
That all said, I do have my own concerns with case-insensitive. Particularly, it provides an instance FoldCase ByteString, implicitly treating ByteStrings as text, which I believe should be discouraged.
I think it should import ByteString.Char instead of ByteString.

On Mon, Jan 14, 2013 at 12:20 PM, Henning Thielemann < lemming@henning-thielemann.de> wrote:
I think it should import ByteString.Char instead of ByteString.
That's a type synonym, the distinction doesn't matter here.
G
--
Gregory Collins

On 14 January 2013 18:20, Henning Thielemann
On Mon, 14 Jan 2013, Ben Millwood wrote:
In response to this, I ask you: is compatibility with the platform really a goal for your live-sequencer? Would the live-sequencer benefit particularly from use of the case-insensitive package? Would making the case-insensitive package Haskell2010 enable it to work with your interpreter immediately?
My answer is no, and I think it is the wrong question. My point was, that case-insensitive can easily be made both Haskell98/2010 and thus improve - the same way the "split" package improved by removing the GADT when it was added to the platform. I had actual problems when trying to do something sensible with JHC. It meant that I had to inspect and "fix" a lot of packages at once before seeing anything running. Not very encouraging when you try a different compiler. FlexibleInstances are not necessary for defining instances on Strings and if a package enters the platform it is a good opportunity to fix that. Platform packages also play a role as packages where beginners look first when they want to learn how to program real-world Haskell.
I dropped the UnicodeSyntax, TypeSynonymInstances and FlexibleInstances language extensions in the "hp" branch: https://github.com/basvandijk/case-insensitive/tree/hp I added a _hidden_ foldCaseList method to the FoldCase class which is used to case fold Strings. A FoldCase instance for Char is added. I dropped the FoldCase ShowS instance. I bumped the version from 0.4.0.4 to 1.0.
That all said, I do have my own concerns with case-insensitive. Particularly, it provides an instance FoldCase ByteString, implicitly treating ByteStrings as text, which I believe should be discouraged.
I agree with Gregory that the primary use case of this package was to do case insensitive comparisons of HTTP headers in snap and yesod which use ByteStrings to represent the headers. I do remember there was an ascii package a while back: http://hackage.haskell.org/package/ascii Michael: what was the reason for deprecating that package? Something else: according to the HP procedure proposals should be discussed on the libraries list. Gregory: could you start a new discussion there? Cheers, Bas

On Mon, Jan 14, 2013 at 2:24 PM, Bas van Dijk
Something else: according to the HP procedure proposals should be discussed on the libraries list. Gregory: could you start a new discussion there?
libraries@ is already on this thread.
G
--
Gregory Collins

On Jan 15, 2013 12:29 AM, "Gregory Collins"
On Mon, Jan 14, 2013 at 2:24 PM, Bas van Dijk
wrote:
Something else: according to the HP procedure proposals should be discussed on the libraries list. Gregory: could you start a new discussion there?
libraries@ is already on this thread.
Oops I didn't notice. Sorry for the noise.
participants (3)
-
Bas van Dijk
-
Gregory Collins
-
Henning Thielemann