我正在尝试在 Ubuntu 14.04 上安装 PureScript。我有最新版本的 Haskell-Platform 并且已经运行cabal update
. 在cabal install purescript
我收到一条错误消息,提示System.IO.UTF8
找不到该模块。谷歌搜索显示,这是安装该软件包时暴露模块的一部分,utf8-string
并且应该是其中之一。
但是,当我安装它时,没有这样的包可用:
ely@eschaton:~$ cabal update
Downloading the latest package list from hackage.haskell.org
ely@eschaton:~$ cabal --reinstall install utf8-string
Resolving dependencies...
In order, the following will be installed:
utf8-string-1 (reinstall)
Warning: Note that reinstalls are always dangerous. Continuing anyway...
Configuring utf8-string-1...
Building utf8-string-1...
Preprocessing library utf8-string-1...
[1 of 5] Compiling Codec.Binary.UTF8.String ( Codec/Binary/UTF8/String.hs, dist/build/Codec/Binary/UTF8/String.o )
[2 of 5] Compiling Codec.Binary.UTF8.Generic ( Codec/Binary/UTF8/Generic.hs, dist/build/Codec/Binary/UTF8/Generic.o )
[3 of 5] Compiling Data.String.UTF8 ( Data/String/UTF8.hs, dist/build/Data/String/UTF8.o )
[4 of 5] Compiling Data.ByteString.UTF8 ( Data/ByteString/UTF8.hs, dist/build/Data/ByteString/UTF8.o )
[5 of 5] Compiling Data.ByteString.Lazy.UTF8 ( Data/ByteString/Lazy/UTF8.hs, dist/build/Data/ByteString/Lazy/UTF8.o )
In-place registering utf8-string-1...
Installing library in /home/ely/.cabal/lib/utf8-string-1/ghc-7.6.3
Registering utf8-string-1...
Installed utf8-string-1
ely@eschaton:~$ 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.
Prelude> import System.IO.UTF8
<no location info>:
Could not find module `System.IO.UTF8'
It is not a module in the current program, or in any known package.
您可以看到仅编译了 5 个指定的建议库。
PureScript 源代码System.IO.UTF8
肯定使用.
但System.IO.UTF8
看起来像一个相当古老的包,很长一段时间(2 年以上)没有发生变化,所以这不太可能是最近版本的重大变化。启动时,PureScript 是非常新的,因此如果可用的话,肯定会基于更新版本的 utf8-string。
所以问题是:为什么 PureScript 不能自行安装此依赖项......以及为什么cabal
安装失败并不能按照它的建议utf8-string
公开模块。System.IO.UTF8