I am writing a document that contains parts of an compiler interpreter session (GHCi in this case, but this is not relevant). I have a carefully setup style for Haskell code that I would like to use there. But the prompt and especially the output is not Haskell code and should be printed differently.
Here is an example:
\begin{lstlisting}
Prelude> let fibs = 0:1:zipWith (+) fibs (tail fibs) in fibs !! 10
55
\end{lstlisting}
What is the most elegant way to apply different style to what follows the Prelude > and the rest?



Prelude>. – Kurt Sep 4 '12 at 22:01Prelude>? – Joachim Breitner Sep 5 '12 at 7:11morekeywords. See documentation (texdoc listings) page 20, chapter "3.2 Language definitions". – Kurt Sep 5 '12 at 13:39Prelude>to be style differently from the code followingPrelude>– in the above example, the55. – Joachim Breitner Sep 5 '12 at 13:45