Appendix I: FAQ
Haskell Tips & Tricks

How do I change my REPL prompt?

Here's a simple one liner to set your prompt:
:set prompt "λ> "
To set it permanently, look at the config file in ~/.ghci. Here's an example custom prompt:
1
:set prompt "\ESC[1;34m\n\ESC[0;34mλ> \ESC[m"
2
-- :seti -XNoImplicitPrelude
3
:seti -XOverloadedStrings
4
:seti -XScopedTypeVariables
5
6
:set -Wall
7
:set -fno-warn-type-defaults
8
:set -package pretty-show
9
10
import Text.Show.Pretty (pPrint)
11
:set -interactive-print pPrint
12
:set +s
13
:set +t
14
15
:def rt const $ return $ unlines [":r", ":main --rerun-update"]
16
:def rtfe const $ return $ unlines [":r", ":main --rerun-update --rerun-filter failures,exceptions"]
17
:def rtn const $ return $ unlines [":r", ":main --rerun-update --rerun-filter new"]
Copied!
Last modified 1yr ago
Export as PDF
Copy link