我试图按照以下链接的步骤让我的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。
hscolour
。 - bheklilrcabal
安装软件包。如果您没有安装它,请在aptitude中搜索,它可能被命名为cabal-install
或类似的名称。cabal
工具还有许多其他功能,例如用于创建和管理自己的项目。根据Reddit帖子中的说明,您需要使用cabal install IPPrint
和cabal install HsColour
安装IPPrint
和HsColour
软件包。如果这些成功安装,则不应该有任何问题。 - bheklilrcabal
给我这个错误cabal: Error: some packages failed to install: Extra-1.46.1 依赖于 bzlib-0.5.0.4,但它无法安装。 bzlib-0.5.0.4 在配置步骤中失败。异常为: ExitFailure 1 ipprint-0.5 依赖于 bzlib-0.5.0.4,但它无法安装。
- magamig