When I try to execute :load hello.hs
in ghci, I get the following error:
Could not find module "System.Console.Readline"
Since this is a System module, I thought this would work. How do I fix this?
When I try to execute :load hello.hs
in ghci, I get the following error:
Could not find module "System.Console.Readline"
Since this is a System module, I thought this would work. How do I fix this?
When you want to use brew
for deadline
on Mac OS X.
brew install readline
cabal install readline --extra-include-dirs=/usr/local/Cellar/readline/6.3.8/include/ --extra-lib-dirs=/usr/local/Cellar/readline/6.3.8/lib/ --configure-option=--with-readline-includes=/usr/local/Cellar/readline/6.3.8/include/ --configure-option=--with-readline-libraries=/usr/local/Cellar/readline/6.3.8/lib/
Reference: How do you install the haskell readline library on Mac OSX?
Depending on your system, you will want to install the readline
Haskell package.
To do so, make sure that you have GNU readline actually installed via apt-get
(Ubuntu), macports (Mac OSX), Cygwin (Windows?), or whatever your favourite package manager is on your platform.
If you have Haskell's cabal
installed, simply run
cabal install readline
and hopefully everything will compile, and you can try and run your hello.hs
again!
If you don't have cabal
, it's a sort of command line interface for grabbing and managing packages from HackageDB. Follow the instructions on haskell.org/cabal to get cabal
. It's pretty handy to have, if not essential :D