[Haskell-cafe] Re: layout problem

Benjamin Franksen benjamin.franksen at bessy.de
Thu Nov 17 13:31:16 EST 2005


On Thursday 17 November 2005 11:42, Ketil Malde wrote:
> Benjamin Franksen wrote:
> >>If your editor is a little smarter still, it can do the Haskell
> >>layout without braces automatically too. The emacs mode helps with
> >>this. Yi/hIDE should be able to do it perfectly once it's in a
> >>generally usable state. :)
> >
> >Hmm, how would your super intelligent text editor layout the
> > ambigous example of the OP? Well, never mind: either way might be
> > the wrong one, depending on what the program is /supposed/ to do.
>
> It would alternate between them as you push TAB, of course.

Nice solution. Not fool-proof either: you need to know beforehand when 
to try and ush TAB a second time; but probably ok. Ideal would be a 
pop-up menu presenting all possible choices; the difficult part being 
how to represent the choices so that one can easily find out which 
corresponds to what one wants, and still manage to keep them to less 
than a screenful of code ;-)

Ben


More information about the Haskell-Cafe mailing list