Typesetting Haskell in Latex

Any idea how does one typeset Haskell with fancy symbols in a Latex document? For example, the way they do it in this paper: link. Is there some sort of package for this?

Posted May 5, 2020, 5:49 PM UTC · edited

23
Syrak•

I know of two solutions:

  1. lhs2tex (manual). This probably gives the best results.

  2. The listings LaTeX package (manual, see in particular Section 5.4 about the literate option to substitute symbols). This doesn't look as good without significant effort, but it is more language agnostic.

1
wfdctrlOP•

I guess lhs2tex is the way to go, thank you :)

1
ReedOei•

I use a simple listings definition for Haskell that I found [here](https://tex.stackexchange.com/questions/116595/highlighting-haskell-listings-in-large-tex-document).

1