I want to thank everybody for the kind
explanations of kind errors.

I think I now understand them (figured it out
through a LOT of trial and error).  The problem
(as Carl and others noted) was I was testing
various ways of doing things using synonyms rather
than data types and didn't know that you can't do
that!

Based on my recent experience as a new coder,
here are some words of advice for future
beginners:

* Beware the monomorphism restriction!
* Avoid type synonyms in instance declarations!
* use newtype whenever possible (also see quickcheck docs)
* you can't use existential types except through class methods!
* you must wrap existential types if you want to
  use them in record-style data declarations
  (No, I have no idea why this is, but it
   appears to be true nonetheless)

The problem with this sort of list is that it is
probably only useful after you have already made
these mistakes.   Oh well.

-Alex-


_________________________________________________________________
S. Alexander Jacobson                  mailto:[EMAIL PROTECTED]
tel:917-770-6565                       http://alexjacobson.com
_______________________________________________
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to