On a clean Ubuntu VM (14.04) I ran:
$ sudo apt-get install texlive-latex-base texlive-math-extra texlive-latex-extra
$ cabal install lhs2tex
$
$ # convert the document
$ lhs2TeX Transformers.lhs -o Transformer.tex
$ pdflatex Transformers.tex
On a clean Ubuntu VM (14.04) I ran:
$ sudo apt-get install texlive-latex-base texlive-math-extra texlive-latex-extra
$ cabal install lhs2tex
$
$ # convert the document
$ lhs2TeX Transformers.lhs -o Transformer.tex
$ pdflatex Transformers.tex