I'm using ghci 6.8.2 on Ubuntu. Does ghci use a configuration file where we can do some initial setup?. E.g.: :set prompt "ghci> "
.
Config file locations ghc/ghci. conf. Windows: C:\Documents and Settings\<username>\Application Data/ghc/ghci. conf.
GHCi is the interactive interface to GHC. From the command line, enter "ghci" (or "ghci -W") followed by an optional filename to load. Note: We recommend using "ghci -W", which tells GHC to output useful warning messages in more situations. These warnings help to avoid common programming errors.
Haskell Language Using GHCi Changing the GHCi default prompt The :set prompt command changes the prompt for this interactive session. To change the prompt permanently, add :set prompt "foo> " to the GHCi config file.
If you have installed the Haskell Platform, open a terminal and type ghci (the name of the executable of the GHC interpreter) at the command prompt. Alternatively, if you are on Windows, you may choose WinGHCi in the Start menu. And you are presented with a prompt. The Haskell system now attentively awaits your input.
Have you tried adding :set prompt "ghci> "
to ~/.ghci?
Having applied @hvr's answer I got the following warning:
*** WARNING: ~/.ghci is writable by someone else, IGNORING!
The solution is chmod g-w ~/.ghci
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With