我正在尝试在 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 个指定的建议库。
PureScript source definitely makes use System.IO.UTF8
。
但是System.IO.UTF8
看起来像是一个相当旧的软件包,很长一段时间(2年多)没有发生变化,所以这不太可能是最近版本中的重大变化。首先,PureScript 非常新,因此肯定会基于较新版本的 utf8 字符串(如果可用)。
所以问题是:为什么 PureScript 无法自行安装此依赖项...以及为什么 cabal
安装 utf8-string
失败按照其建议公开 System.IO.UTF8
模块。
最佳答案
看起来 utf-string
已于今天(1 月 23 日)更新为 version 1
它不再有 System.IO.UTF8
模块。这个出现在上一篇 version 0.3.8
of utf-string
中.
并且 purescript
没有指定 upper bound for utf-string
.
编辑我做了a PR解决 issue 。 有more proper fix WIP也是。
关于haskell - 未找到 System.IO.UTF8(安装 PureScript),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28110769/