[Haskell] string type class

Brandon S. Allbery KF8NH allbery at ece.cmu.edu
Fri Mar 6 13:47:49 EST 2009

On 2009 Mar 6, at 11:13, Wolfgang Jeltsch wrote:
> Am Freitag, 6. März 2009 13:33 schrieb Matthew Pocock:
>> It seems every time I look at hackage there is yet another stringy
>> datatype. For lots of apps, the particular stringy datatype you use  
>> matters
>> for performance but not algorithmic reasons. Perhaps this is a good  
>> time
>> for someone to propose a stringy class?
> There is already the class IsString which was introduced for  
> overloaded string
> literals.
> However, the name is terrible. No other Haskell class I know of has  
> an “Is” at
> its beginning. Classes don’t name properties (IsNum, IsMonoid, Has…).

But their proper names were available.  "String" is already taken for  
a concrete type, which complicates things; "IsString" was the simplest  
answer (and possibly avoided bikeshedding by being the answer nobody  
liked :)

> Maybe you can also try to convince the masters of the IsString class  
> to change
> the class name. My previous attempts through mailing list e-mails  
> seemed to
> have no effect. :-(

I think the problem here is you need to get buy-in from everyone  
involved, which includes libraries@ (String), ghc (IsString is  
recognized in order to enable string overloading), ByteString, and  
potentially anyone who uses any of the above.  That said, if you want  
to officially propose it you need to read up on how to properly  
propose such changes to libraries at haskell.org.

brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university    KF8NH

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
Url : http://www.haskell.org/pipermail/haskell/attachments/20090306/51111667/PGP.bin

More information about the Haskell mailing list