When I use GHCi, I almost always end up importing Control.Applicative, Data.List, etc. . Is there a way to configure GHCi to automatically import those modules.
Also, after importing them, how do I keep the prompt from being insanely long?
Prelude Control.Applicative Data.List Database.HDBC Database.HDBC.Sqlite3 System.Directory>
GHCi looks for its configuration file at
~/.ghc/ghci.confon Unix-like systems.%APPDATA%\ghc\ghci.confon Windows.The configuration file syntax is simple: it’s a list of GHCi commands to execute on startup.
For example, your
ghci.confcould contain:The last line sets the prompt to
"> "so it won’t show all the modules you imported on the command line.Now you can get to work right away:
Also, if you decide you don’t want
Data.Charin the middle of a GHCi session, you can remove it with:and if you decide you don’t want anything but Prelude during a session: