Results 1 to 2 of 2

Thread: ghci prompt??

  1. #1
    Join Date
    Jun 2008
    Posts
    589
    Thanks
    13
    Thanked 54 Times in 54 Posts
    Blog Entries
    1

    Default ghci prompt??

    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.

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    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:

    Code:
    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/late...dot-files.html
    http://www.haskell.org/ghc/docs/late...html#id2582418
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •