ghci配置-更改~/时出错.ghci文件



我试图用这个来让我的GHCi漂亮:http://www.reddit.com/r/haskell/comments/144biy/pretty_output_in_ghci_howto_in_comments/

但是在运行GHCi时出现此错误,我无法应用颜色更改。

user@pcname:~$ ghci
GHCi, version 7.6.3: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
<no location info>:
    Could not find module `IPPrint'
    It is not a module in the current program, or in any known package.
<no location info>:
    Could not find module `Language.Haskell.HsColour'
    It is not a module in the current program, or in any known package.
<no location info>:
    Could not find module `Language.Haskell.HsColour.Colourise'
    It is not a module in the current program, or in any known package.
<no location info>:
    Could not find module `Language.Haskell.HsColour.Output'
    It is not a module in the current program, or in any known package.
<interactive>:7:21:
    Failed to load interface for `HsColour'
    Use -v to see a list of the files searched for.
<interactive>:9:26:
    Failed to load interface for `HsColour'
    Use -v to see a list of the files searched for.
Top level: Not in scope: `myPrint'
Top level: Not in scope: `myPrint'
<interactive>:19:26:
    Failed to load interface for `HsColour'
    Use -v to see a list of the files searched for.

你有什么建议?

我目前使用的是Ubuntu 14.04和GHCi 7.6.3

总结注释:您需要安装Haskell模块hscolouripprint。对于第二个,您需要安装libbz2-dev包。所以:

sudo apt-get install libbz2-dev
cabal update
cabal install ipprint hscolour

最新更新