我试图在Ubuntu 14.04上安装PureScript。我有最新版本的Haskell-Platform并运行cabal update
。在cabal install purescript
期间,我收到错误消息,指出找不到模块System.IO.UTF8
。谷歌搜索显示安装该软件包时this is part of utf8-string
and should be one of the exposed modules。
但是,当我安装它时,没有这样的包可用:
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个已提议的库。
System.IO.UTF8
的{{3}}。
但是System.IO.UTF8
看起来像是一个相当旧的包,在很长一段时间(2年以上)没有经历过变化,所以这不太可能是最近版本中的重大变化。要启动,PureScript是非常新的,因此如果可用,肯定会基于更新版本的utf8-string。
所以问题是:为什么PureScript不能自己安装这个依赖...为什么cabal
的{{1}}安装无法公开utf8-string
它建议应该使用模块。
答案 0 :(得分:9)
看起来utf-string
已于今天(1月23日)更新为version 1
,而System.IO.UTF8
模块已不再存在purescript
。那一个出现在之前的version 0.3.8
of utf-string
。
而{{1}}并未指定upper bound for utf-string
。
编辑我让a PR解决issue问题。 还有more proper fix WIP。