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

Bryan Burgers bryan.burgers at gmail.com
Tue Aug 22 10:11:17 EDT 2006

On 8/22/06, Bulat Ziganshin <bulat.ziganshin at gmail.com> 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 type variable, and the same type for
> each occurrence of type class in the type:
> (+) :: Num -> Num -> Num
> [...]
> 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 and what they all do, but sometimes I really have to think
hard to remember which is which in a piece of code. What helps my
understanding is that each has a specific place in the type signature
(which I guess includes 'nowhere' regarding constructors). Being able
to put Classes where Types go would just serve to muddle that

Bryan Burgers

More information about the Haskell-Cafe mailing list