[Haskell-cafe] typesetting with lhs2tex

Tom Nielsen tanielsen at gmail.com
Thu Dec 16 11:32:43 CET 2010

I think you have to do it yourself. lhs2TeX isn't that clever - it
doesn't really know haskell syntax, it just applies some very simple
transformation rules.

e.g. change

runE :: Monad m => Enumerator e s m -> m r -> (e -> m r) -> (s ->
Enumerator e s m -> m r) -> m r


runE :: Monad m =>  Enumerator e s m
                              -> m r -> (e -> m r)
                              -> (s -> Enumerator e s m -> m r)
                              -> m r

A double space anywhere in indicates that you want vertical alignment.
"Enumerator" above will be aligned with the arrows if they are in the
same column. (it's probably messed up above because I am typing this
in a variable width font.)

On Thu, Dec 16, 2010 at 9:18 AM, Permjacov Evgeniy <permeakra at gmail.com> wrote:
> I write docs for my iteratee-like library and I have problem with
> lhs2tex. When I execute lhs2tex and then latex, I get a document with
> long typesignatures and expressions expanded beyound page margins. I
> attached a sourcefile I have problem with. Can someone give me an advise
> how to force long signatures and expressions to be broken into multible
> lines ?
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe

More information about the Haskell-Cafe mailing list