Re[2]: [Haskell-cafe] overloaded list literals?

2010-09-06 Thread Bulat Ziganshin
Hello Stefan,

Monday, September 6, 2010, 3:47:11 PM, you wrote:

 In general, it is kind of unfortunate that type classes and type
 constructors share a namespace, even though there is no way to ever mix them 
 up.

btw, i also had proposal to automatically convert typeclasses used in
type declarations into constraints, so that:

putStr :: StringLike - IO ()
treated as
putStr :: StringLike s = s - IO ()

and

length :: ListLike a - Int
treated as
length :: ListLike (c a) = c a - Int

Together with proposals i mentioned previously, it will allow to treat
existing code dealing with lists/strings as generic code working
with any sequential container type

-- 
Best regards,
 Bulatmailto:bulat.zigans...@gmail.com

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re[2]: [Haskell-cafe] overloaded list literals?

2010-09-06 Thread Bulat Ziganshin
Hello Serguey,

Monday, September 6, 2010, 7:57:46 PM, you wrote:

 http://www.mail-archive.com/haskell-cafe@haskell.org/msg15656.html

 Will Data.Map with its' empty, insert, findMin, etc, methods conform
 to your proposed type?

but Data.Map isn't sequential container. instead, it maps arbitrary
keys to values


-- 
Best regards,
 Bulatmailto:bulat.zigans...@gmail.com

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: Re[2]: [Haskell-cafe] overloaded list literals?

2010-09-06 Thread Stefan Holdermans
Bulat,

 btw, i also had proposal to automatically convert typeclasses used in
 type declarations into constraints, [...]

 Together with proposals i mentioned previously, it will allow to treat
 existing code dealing with lists/strings as generic code working
 with any sequential container type

I see. That's a nice proposal, but somehow I'm a bit worried about readability 
of code. IMHO, readability is still one of Haskell's main assets and I wouldn't 
like to see it degrade (further).

Cheers,

  Stefan
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: Re[2]: [Haskell-cafe] overloaded list literals?

2010-09-06 Thread Wolfgang Jeltsch
Am Montag, den 06.09.2010, 19:38 +0400 schrieb Bulat Ziganshin:
 btw, i also had proposal to automatically convert typeclasses used in
 type declarations into constraints, so that:
 
 putStr :: StringLike - IO ()

 treated as

 putStr :: StringLike s = s - IO ()

This blurs the distinction between classes and types, which are two
fundamentally different concepts in Haskell. In addition, it works only
for special cases. I would like the language to be simple. Alas, more
and more sugar is added to Haskell, which makes it unnecessarily
complicated.

Best wishes,
Wolfgang


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe