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

2006-08-22 Thread Bulat Ziganshin
Hello Arie, Tuesday, August 22, 2006, 7:24:34 PM, you wrote: >> I disagree. As a new learner to Haskell, I already have a hard time >> keeping Constructors, Types, and Classes straight. I know what they >> all are and what they all do, but sometimes I really have to think >> hard to remember which

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

2006-08-22 Thread Brandon Moore
Bulat Ziganshin wrote: Hello Malcolm, Tuesday, August 22, 2006, 4:22:50 PM, you wrote: 2) allow to use type classes in type declarations like the types itself. for example, allow the following: f :: Num a => a -> Int write as f :: Num -> Int and following: sequence :: Monad m => [m a] ->

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

2006-08-22 Thread Gene A
Arie said: {... This is an instance of a general conflict: should we sacrifice nice notation for ease of learning? You could make a similar case for list comprehensions, for example: they complicate matters for newcomers (yet another meaning of brackets and pipe) ...} I have to totally agree wi

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

2006-08-22 Thread Arie Peterson
Hello Bryan, On 2006-08-22, Bryan Burgers <[EMAIL PROTECTED]> wrote: >> so, while this proposal is rather minor, i think that it is Good thing > > I disagree. As a new learner to Haskell, I already have a hard time > keeping Constructors, Types, and Classes straight. I know what they > all are an

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

2006-08-22 Thread Bryan Burgers
On 8/22/06, Bulat Ziganshin <[EMAIL PROTECTED]> wrote: what i propose is not full replacement of existing syntax - quite the contrary it is just a syntax sugar for most frequent cases of using classes in function signatures. the key idea is that in most cases we use only one type class for each t

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

2006-08-22 Thread Bulat Ziganshin
Hello Malcolm, Tuesday, August 22, 2006, 4:22:50 PM, you wrote: >> 2) allow to use type classes in type declarations like the types >> itself. for example, allow the following: >> >> f :: Num a => a -> Int >> write as >> f :: Num -> Int >> >> and following: >> >> sequence :: Monad m => [m a] -

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

2006-08-22 Thread Malcolm Wallace
Bulat Ziganshin <[EMAIL PROTECTED]> wrote: > 2) allow to use type classes in type declarations like the types > itself. for example, allow the following: > > f :: Num a => a -> Int > write as > f :: Num -> Int > > and following: > > sequence :: Monad m => [m a] -> m [a] > write as > sequence ::

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

2006-08-14 Thread Bulat Ziganshin
Hello Marc, Sunday, August 13, 2006, 10:36:39 PM, you wrote: > In other words: why not overload (:) ? i have such proposal, more or less complete: 1) define [] as type class and [] and ':' as operations of this class: class [] c where [] :: c a -- creates empty container (: