When you take a look at other developers GHCi prompt you can often see a simple prompt like the following:
This is achieved by simply putting the following snippet into
:set prompt "\ESC[34mλ> \ESC[m"
\ESC[34m is ANSI-code for a blue foreground color and the simple
\ESC[m reverts everything into the defaults.
But since I want to know which modules are loaded into GHCi and which of them are interpreted and which are compiled, I extended the above prompt:
:set prompt "\ESC[1;34m%s\n\ESC[0;34mλ> \ESC[m"
\ESC[1;34m%s\n produces a first line which lists the loaded modules in bold blue, whereas
\ESC[0;34mλ> \ESC[m sets the prompt like above, but removes the bold-attribute.
With this new prompt you have everything… There are colors to quickly recognize the last time the prompt was displayed, you have the cool
λ that every “real” haskell-programmer must have, and you know which modules are loaded at any given time, and since they are colored you can distinguish the line from other output easily (it helps you to find last prompt also!).
More about ANSI-escape sequences