Log in

View Full Version : ghci prompt??



magicyte
03-15-2009, 02:08 AM
I've read how to change the prompt on the Glaskow Haskell Compiler (GHCi). However, I must do this each time I open GHCi. I much prefer the prompt "ghci> " than the "Prelude> " standard prelude prompt. How would I make the "ghci> " prompt permanent? I also read somewhere about editing a .ghci file, but I don't get it... Any help is appreciated.

Twey
03-15-2009, 05:15 AM
It doesn't say 'Prelude' on a whim: 'Prelude' is the name of the module that provides the 'built-ins' of Haskell. If you import other modules, they will appear in your prompt too:


Prelude> :m +Data.Binary
Prelude Data.Binary>

That said, if you really want to change it, the GHCi command is :set prompt "ghci> "; if you want this to apply to every new GHCi session, put it into a file named (I seem to recall you are using Windows) %APPDATA%\ghc\ghci.conf, where %APPDATA% is probably something like C:\Documents and Settings\magicyte\Application Data.

http://www.haskell.org/ghc/docs/latest/html/users_guide/ghci-dot-files.html
http://www.haskell.org/ghc/docs/latest/html/users_guide/ghci-commands.html#id2582418