在Haskell中找不到模块“System.Console.Readline” [英] Could not find module 'System.Console.Readline' in Haskell
问题描述
当我尝试在ghci中执行:load hello.hs
时,出现以下错误:
无法找到模块System.Console.Readline
从这是一个系统模块,我认为这会起作用。如何解决这个问题?
根据您的系统,您需要安装 readline
Haskell包。
为此,请确保您通过 apt-get $实际安装了GNU readline c $ c>(Ubuntu),macports(Mac OSX),Cygwin(Windows?),或者您喜爱的软件包管理器在您的平台上。
cabal
已安装,只需运行 cabal install readline
,并希望所有内容都可以编译,您可以尝试运行你的 hello.hs
又一次! 如果你没有 cabal
,它是一种用于从HackageDB获取和管理软件包的命令行界面。按照 haskell.org/cabal 上的说明获取 cabal
。如果不是必要的话,这非常方便:D
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?
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
这篇关于在Haskell中找不到模块“System.Console.Readline”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!