[Haskell] Beyond ASCII only editors for Haskell
Jan-Willem Maessen
jmaessen at alum.mit.edu
Tue May 24 12:20:12 EDT 2005
On May 24, 2005, at 5:45 AM, Benjamin Franksen wrote:
> On Tuesday 24 May 2005 11:26, you wrote:
>> Benjamin Franksen <benjamin.franksen at bessy.de> writes:
>>> 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.
>
> Hmm. You are right. This only gives a syntax error inside a 'do...'
> block. And now as I think about why this is the case, I can't see a
> good way to fix it, other than giving if/then/else-completion a higher
> precedence than layout. Hmmmm.
Arguably this would be the right behavior. The if/then and then/else
pairings in effect unambiguously bracket the predicate and alternative
respectively, and oughtn't cause a problem with layout.
-Jan-Willem Maessen
More information about the Haskell
mailing list