source layout

Bayley, Alistair Alistair_Bayley@ldn.invesco.com
Thu, 6 Mar 2003 15:20:41 -0000


> There are various pretty-printing libraries for Haskell, for example:

Yeah, but that's only half the job. You have to combine these with a Haskell
parser in order to get a program with the functionality of (say) 'indent'
(or have I misunderstood what the libraries do?)

I though this was quite good (but I still use tabs - horrors...)
http://www.cs.bris.ac.uk/Teaching/Resources/COMS12100/java/style.html


-----Original Message-----
From: shae@webwitches.com [mailto:shae@webwitches.com]
Sent: 06 March 2003 15:08
To: Per Larsson
Cc: Haskell Mailing List
Subject: Re: source layout


Per Larsson <per@L4i.se> writes:

> I'm looking for some kind of style-guide for layout and indentation of
haskell 
> source code, can anyone help me?

There are various pretty-printing libraries for Haskell, for example:

http://www.haskell.org/ghc/docs/latest/html/haskell-src/Language.Haskell.Pre
tty.html
http://www.haskell.org/ghc/docs/latest/html/base/Text.PrettyPrint.html
http://www.cs.uu.nl/~daan/pprint.html

For editors, there's haskell-mode for emacs which does a good job of
indenting
intelligently. I've heard the vim mode works well also.

A bit of googling turned up these:

http://www.haskell.org/~simonmar/libraries/libraries.html
http://www.cs.ou.edu/~rlpage/fpclassFall96/handouts/styleGuide.html
http://www.cs.bris.ac.uk/Teaching/Resources/COMS12100/java/style.html

Hope this helps,
-- 
Shae Matijs Erisson - 2 days older than RFC0226
#haskell on irc.freenode.net - We Put the Funk in Funktion
10 PRINT "HELLO" 20 GOTO 10 ; mapM_ putStrLn $ fix ("hello":)


*****************************************************************
The information in this email and in any attachments is 
confidential and intended solely for the attention and use 
of the named addressee(s). This information may be 
subject to legal professional or other privilege or may 
otherwise be protected by work product immunity or other 
legal rules.  It must not be disclosed to any person without 
our authority.

If you are not the intended recipient, or a person 
responsible for delivering it to the intended recipient, you 
are not authorised to and must not disclose, copy, 
distribute, or retain this message or any part of it.
*****************************************************************