Re: Re[2]: class [] proposal Re: [Haskell-cafe] One thought: Num to 0as ? to list?

2006-08-23 Thread Malcolm Wallace
it's because you not programmed a lot with type classes. if you start, you will soon realize that type signatures with classes are just unreadable. just look at sources of my streams library copyStream :: (BlockStream h1, BlockStream h2, Integral size) = h1 - h2 -

Re: Re[2]: class [] proposal Re: [Haskell-cafe] One thought: Num to 0as ? to list?

2006-08-23 Thread Tomasz Zielonka
On Wed, Aug 23, 2006 at 01:28:57PM +0100, Malcolm Wallace wrote: The lengths people will go to in making things difficult for the reader, just to save a few characters is truly amazing. Remember, the code will be read many more times than it is written. IMHO, the various proposed sugar adds

Re: Re[2]: class [] proposal Re: [Haskell-cafe] One thought: Num to 0as ? to list?

2006-08-23 Thread Donald Bruce Stewart
tomasz.zielonka: On Wed, Aug 23, 2006 at 01:28:57PM +0100, Malcolm Wallace wrote: The lengths people will go to in making things difficult for the reader, just to save a few characters is truly amazing. Remember, the code will be read many more times than it is written. IMHO, the various

Re: Re[2]: class [] proposal Re: [Haskell-cafe] One thought: Num to 0as ? to list?

2006-08-23 Thread Tomasz Zielonka
On Wed, Aug 23, 2006 at 11:11:59PM +1000, Donald Bruce Stewart wrote: So, from vim the following source: f (x,y,z) a b = y + a + b hit, 'ty' and its replaced with: f :: forall b c a. (Num b) = (a, b, c) - b - b - b f (x,y,z) a b = y + a + b Nice! Best regards Tomasz

Re: Re[2]: class [] proposal Re: [Haskell-cafe] One thought: Num to 0as ? to list?

2006-08-23 Thread Toby Hutton
On 8/23/06, Donald Bruce Stewart [EMAIL PROTECTED] wrote: I use the following script from vim to infer top level type declarationsfor me. I've found it particularly useful for understanding others' code:delurkOn the topic of coding Haskell with Vim is there an indentation plugin for Haskell

Re: Re[2]: class [] proposal Re: [Haskell-cafe] One thought: Num to 0as ? to list?

2006-08-22 Thread Brian Hulley
Bulat Ziganshin wrote: f :: Num a = a - Int write as f :: Num - Int so, while this proposal is rather minor, i think that it is Good thing I wouldn't like it because I'd like to eventually make the class namespace separate from the tycon namespace so that I could write: class Object a

Re[2]: class [] proposal Re: [Haskell-cafe] One thought: Num to 0as ? to list?

2006-08-22 Thread Bulat Ziganshin
Hello Arie, Tuesday, August 22, 2006, 8:24:17 PM, you wrote: data Object = forall a. Object a = Object a I like the idea of separating class and type constructor namespaces, and then being able to use existentials as in your example (although the latter would also belong in the category

Re: Re[2]: class [] proposal Re: [Haskell-cafe] One thought: Num to 0as ? to list?

2006-08-22 Thread Brian Hulley
Bulat Ziganshin wrote: from one my module: copyStream :: (BlockStream h1, BlockStream h2, Integral size) = h1 - h2 - size - IO () in my library and found the way to simplify most of their signatures: copyStream :: BlockStream* - BlockStream** - Integral - IO () i think that

Re[2]: class [] proposal Re: [Haskell-cafe] One thought: Num to 0as ? to list?

2006-08-22 Thread Bulat Ziganshin
Hello Brian, Tuesday, August 22, 2006, 9:35:21 PM, you wrote: I feel if it ain't broken don't fix it, and not only is the existing syntax not broken, it's already (imho) absolutely perfect in it's clarity and consistency it's because you not programmed a lot with type classes. if you start,

Re: Re[2]: class [] proposal Re: [Haskell-cafe] One thought: Num to 0as ? to list?

2006-08-22 Thread Brian Hulley
Bulat Ziganshin wrote: Hello Brian, Tuesday, August 22, 2006, 9:35:21 PM, you wrote: I feel if it ain't broken don't fix it, and not only is the existing syntax not broken, it's already (imho) absolutely perfect in it's clarity and consistency it's because you not programmed a lot with type