I'm writing a program in a .lhs file which contains code in Haskell (I'm specifying this because I want it to be clear that it's not only for rendering a pdf but it's also for being execute with runhaskell or ghci). I'm rendering the code with lstlisting like this:
\begin{lstlisting}
> Haskell code here
\end{lstlisting}
Anyway, the code itself require some modules that I have to import, but I don't want the imports to appear in the resulting pdf. So, I've tried to put the code without the lstlisting
block, like this:
> import X
> import Y
...
But it's not working and the resulting PDF renders those lines only not as code like lstlisting
would do. What should I do to write the import code only for being execute but not to be showed in the PDF itself?