Wed, 20 Mar 2002 17:41:25 +0000
> Why is it necessary to leave a blank line between comments and code?
> I'm using LaTeX in my lhs files, with the code inside a verbatim
> environment, and I'd rather start writing my code right after the
fac 0 = 0
fac (n+1) = (n+1) * fac n
> fac 0 = 0
> fac (n+1) = (n+1) * fac n
and then define the `code' environment to do verbatim typesetting. You could start by looking at the LaTeX verbatim.sty package, or moreverb.sty, or simply copy the code for \verbatim and \endverbatim from latex.ltx with appropriate modifications (the latter is probably NOT recommended for the faint-hearted!).
(Haskell knows about both styles of literate comments, and the top one is designed for what you are doing).
Keith Wansbrough <firstname.lastname@example.org>
University of Cambridge Computer Laboratory.