lhs2tex-1.12: Examples/NewCode.lhs
%include lhs2TeX.fmt
This is to demonstrate the new code mode.
We can use formatting instructions in code mode, too,
for instance to support template Haskell:
%format splice(a) = "$(" a ")"
%format out = "putStrL"
%format hello = "'dHello'd"
%format flip(a)(b) = b ^^ a
%format ^^ = " "
\begin{code}
-- one line comment
{- nested comment -}
{-# pragma #-}
main = flip(hello)(out)
\end{code}