[Haskell-beginners] Top beginner mistakes

Francesco Bochicchio bieffe62 at gmail.com
Thu Mar 5 13:13:34 EST 2009

2009/3/4 7stud <bbxx789_05ss at yahoo.com>

> Here are my top three:
> ...

> 3) Not putting parentheses around arguments of the form x:xs
> dosomething x:xs = head xs
I have a variation here:

function [] = ...
function [x:xs] = ...

Another of mine is the classical:

print function arguments -- or variations

but I finally learned to use '$' here .

> In all three cases, the error messages don't help spot the problem.
> I think that part of the problem  is that haskell syntax is powerful but
terse, and therefore is not easy for a compiler to guess the intensions in
the programmers.
For instance, in any other language the expression 'map f'  would give the
error "missing second parameter",  while in haskell could be a partial
function application.

However, some of ghc messages could probably  be made more

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/beginners/attachments/20090305/ced87139/attachment.htm

More information about the Beginners mailing list