I write the program in a .lhs file that contains the code in Haskell (I specify this because I want to make it clear that this is not only for rendering pdf, but also for running with runhaskell or ghci). I pass the code with lstlisting as follows:
\begin{lstlisting} > Haskell code here \end{lstlisting}
In any case, the code itself requires some modules that I need to import, but I do not want the import to appear in the resulting pdf. So, I tried to put the code without the lstlisting block, for example:
> import X > import Y ...
But it does not work, and the resulting PDF file makes these lines only different from the lstlisting code. What should I do to write import code only for execution, but not displayed in the PDF file itself?
source share