[Haskell] Beyond ASCII only editors for Haskell
Ketil Malde
ketil+haskell at ii.uib.no
Tue May 24 05:26:36 EDT 2005
Benjamin Franksen <benjamin.franksen at bessy.de> writes:
>> It seems to me that the layout conventions work pretty well. I do not
>> see much code where it is not used, so generally people must like it.
Works for me. It helps *a lot* to have a sensible editor that knows
where to position things of course. I use Emacs, but should probably
upgrade the mode, as it doesn't place 'let' in do-blocks correctly.
> Please forgive me for taking this as an opportunity to rant about the
> single misfeature of Haskell's layout syntax, which is how if/then/else
> must be layed out. The problem is that the 'else' must be indented
> further than the 'if', so that this:
You're talking about monads and do-notation here? I have no problems
with this in pure code. I tend to find 'when' is more useful for
monadic code, but yes, positioning ifs and cases can be a bit painful.
> Other than this, I like layout so much that I have never actually used
> the explicit {;}-notation.
I sometimes use it for compactness:
... case x of {1 -> foo; 2 -> bar; _ -> error "too much"}
And with ghci.
-kzm
--
If I haven't seen further, it is by standing in the footprints of giants
More information about the Haskell
mailing list