[Haskell-cafe] Re: [newbie] How to test this function?

Jón Fairbairn jon.fairbairn at cl.cam.ac.uk
Fri Sep 22 06:27:13 EDT 2006

"Johan Tibell" <johan.tibell at gmail.com> writes:

> > If there's a problem with haskell emacs mode, it seems very
> > likely that if you ask the maintainer nicely, he'll do
> > something about it. See
> > http://www.iro.umontreal.ca/~monnier/elisp/#haskell-mode
> I asked Stefan a while ago:
> > I like your Emacs mode but it behaves a bit oddly when trying to
> > indent if/then/else expressions in do notation. Typing tab only gives
> > me one possible indentation, like so:
> > do if True
> >    then foo
> >    else bar
> > That is, the then and else branches line up under the if which is an
> > error according to Haskell's layout rule. It probably should indent
> > them like "case" with the then lining up with the condition to the if.
> > I'd fix it myself if I knew Lisp but I don't. :/
> Yes, it's a (recently) known problem which I haven't fixed yet.
> It's in the indent.hs test-suite, with a "FIXME" :-(

For that one, if it doesn't get mended for long enough,
Haskell' might accept the present layout.

Jón Fairbairn                                 Jon.Fairbairn at cl.cam.ac.uk
http://www.chaos.org.uk/~jf/Stuff-I-dont-want.html  (updated 2006-09-13)

More information about the Haskell-Cafe mailing list