System.IO.UTF8 未找到(安装 PureScript)

System.IO.UTF8 not found (installing PureScript)

我正在尝试在 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.UTF8PureScript source definitely makes use

但是 System.IO.UTF8 看起来像一个很老的包,很长时间(2 年以上)没有发生变化,所以这不太可能是最近版本中的重大变化。要引导,PureScript 是非常新的,因此肯定会基于更新版本的 utf8 字符串(如果可用的话)。

所以问题是:为什么 PureScript 不能自己安装这个依赖项...为什么 utf8-stringcabal 安装无法公开 System.IO.UTF8 模块,因为它建议它应该。

看起来 utf-string 已于今天(1 月 23 日) 更新为 version 1 which doesn't have System.IO.UTF8 module anymore. That one is present in previous version 0.3.8 of utf-string

并且 purescript 没有指定 upper bound for utf-string


编辑 我做了 a PR to workaround the issue。 还有more proper fix WIP