Compiler error using IO
Adrian Hey
ahey@iee.org
Mon, 7 Jan 2002 11:02:22 +0000
On Monday 07 January 2002 1:22 am, Tom Bevan wrote:
> On Sat, 2002-01-05 at 05:03, Zhanyong Wan wrote:
> > Hi,
> >
> > Ashley Yakeley wrote:
> > | The "layout" rules drive me nuts. You might prefer using parentheses
> > | and semicolons, as I do:
> >
> > I guess the point behind the layout rules is that anything violating such
> > rules is considered bad programming style. I agree that Haskell
> > compilers/interpreters should give more helpful error messages though
> > (e.g. adding something like "Do you mean to align 'foo' with 'bar'?").
> >
> > - Zhanyong
>
> Here here. I think that the poor compiler error messages in Haskell are a
> very major hurdle to learning the language.
Which compiler are you talking about? Bad error messages are not a valid
critisism of the Haskell Language IMHO.
I think the error messages produced by ghc are pretty good myself
(though it's not very helpful wrt to syntax errors I must admit, but
they're easy to find and fix anyway).
As for prefering {;} to layout, that's just daft. I don't think I've
ever had a layout related error. Not one. But I get plenty of errors
caused by incorrect nesting of {} or missing ; in C (unless I layout
the code properly of course :-)
Regards
--
Adrian Hey