[Haskell-cafe] Coding conventions for Haskell?

Roel van Dijk vandijk.roel at gmail.com
Thu Sep 30 10:47:58 EDT 2010

I align my imports by hand, but your Emacs scripts look useful. I
think I'm going to use them too.

Another extremely useful function for aligning is align-regexp.

On the subject of coding style, I can work with almost any style as
long as it is used somewhat consistently. Personally I try to optimize
my code for ease of reading because I spend much more time reading
code than writing. Aligning stuff vertically makes it easier to spot

On Thu, Sep 30, 2010 at 4:02 PM, Christopher Done
<chrisdone at googlemail.com> wrote:
> FWIW, I align all my module imports up, as seen here:
> http://github.com/chrisdone/amelie/raw/master/src/Web/Codepad.hs  and
> here http://github.com/chrisdone/amelie/raw/master/src/Amelie/HTML.hs
> etc.
> I use the following Emacs library to do it for me:
> http://github.com/chrisdone/haskell-mode-exts/raw/master//haskell-align-imports.el
> I also sort them with this:
> http://github.com/chrisdone/haskell-mode-exts/blob/master//haskell-sort-imports.el
> but it only works for one-line imports, which I advocate anyway.

More information about the Haskell-Cafe mailing list