[Haskell-cafe] question automatic indentation (and so on)
mail at joachim-breitner.de
Mon Jul 1 14:39:25 CEST 2013
Am Montag, den 01.07.2013, 07:59 -0400 schrieb Richard Cobbe:
> How does the indentation tool know if (a b c) is supposed to be the next
> item in the do block, or merely a continuation of the previous application
> of f?
I would still expect the developer to write correctly intended Haskell,
so the the tool would have to employ a Haskell parser to get an AST
(with extra information on where comments were – probably the trickiest
part) and then pretty-prints it.
If it were not for comments, using haskell-src-exts would already
provide a first approximation to the problem, as shown in this script:
Joachim “nomeata” Breitner
mail at joachim-breitner.de • http://www.joachim-breitner.de/
Jabber: nomeata at joachim-breitner.de • GPG-Key: 0x4743206C
Debian Developer: nomeata at debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: This is a digitally signed message part
More information about the Haskell-Cafe