
I think the compiler sees ^I and not spaces.
The layout rule follows similar guidelines to good
indenting practice expected in organizations that
program in other languages.
If you use (g)vim to edit, you can :set expandtab
to only use spaces for tabs. We do that where I
work after some grumblings over whether a tab
should represent 4 or 8 spaces. Now we use 4 spaces
and no tabs. (:set list works in most vi flavors
to show whether tab is spaces or ^I chars.)
There are ways to implement it in (n)vi described
in the vi FAQ published each month in comp.editors
on Usenet and Google Groups.
Also availble at
ftp://rtfm.mit.edu/pub/usenet-by-hierarchy/comp/editors/
Also, be careful to write "let ... in ..." in lowercase.
Haskell is case sensitive.
--- Ingo Wechsung
Hello,
I'm new to Haskell and FP in general and I find it great.
Having more than 10 years expirience with "whitespace does not matter" languages, the only thing that drives me crazy is the layout rule.
As far as I understand it, I have 2 options:
1. Use braces and semicolons and ignore the layout rules.
2. Change the settings in all my editors so that the code looks like the Haskell compiler sees it. Currently, I expand tabs to 4 spaces only, so
\tx=bar
looks like
____foo = bar
to me when the compiler sees
________foo = bar
I would not want to change dozens of .exrc files, shell startup files with and/or ultraedit settings on many different machines. I also do not want to care whether there are spaces or tabs in front of my source code lines.
So I'm stuck with option 1, right? Just to be sure, can I really, really forget about layout if I write fully braced and semicolonoized code?
Besides, is there any reason why the syntax is LET { decl1; decl2; ... } IN expr when LET and IN are sufficient enough to enclose the declarations?
Greetings, Ingo _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
===== Christopher Milton cmiltonperl@yahoo.com __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com