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

标签 haskell utf-8 cabal 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 个指定的建议库。

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/

相关文章:

haskell - case()中下划线的含义

Haskell 包 - 依赖树

testing - 如何使用不同版本的先决条件来运行我的包的测试?

haskell - 在 Gtk2hs 中,为什么 TreeModelIface 函数有时采用 Iter,有时采用 Maybe Iter

memory - Haskell 堆栈溢出

bash - iconv - 尽可能音译,否则不转换

python - Pandas df.to_csv ("file.csv"encode ="utf-8")仍然为减号提供垃圾字符

haskell - cabal 的依赖 hell 。真的是 hell

haskell - 进程退出,代码为 : ExitFailure 1"after build project Haskell

mysql - UTF-8 仅在 Grails 数据库表中