在撰写本文时,我正在运行最新的GHC (7.9.20140608)和阴谋(1.20.0.0),看来attoparsec正在失败。
Data/Attoparsec/ByteString/Internal.hs:519:7:
Illegal equational constraint a_audv ~ (ByteString, t)
(Use GADTs or TypeFamilies to permit this)
In the context: (a_audv ~ (ByteString, t))
While checking the inferred type for ‘succ'’
In the expression:
let
succ' t' pos' more' a
= succ t' pos' more' (substring pos (pos' - pos) t', a)
in runParser p t pos more lose succ'
In the second argument of ‘($)’, namely
‘\ t pos more lose succ
-> let succ' t' pos' more' a = ...
in runParser p t pos more lose succ'’我错过了任何语言扩展吗?还是这个问题会更棘手一些?这是我的阴谋文件:http://lpaste.net/105329
在这方面的任何帮助都将是难以置信的:)快乐的黑客!
发布于 2014-06-09 22:13:20
目前,使用ghc-7.8 (如果发行版包管理器不包括它)的最佳方法是转到ghc下载页面并按照电流稳定释放的指示操作。有二进制包,或者您可以从源代码安装(使用源tarball,这可以像./configure && make && make install一样简单,但您需要一个工作的ghc )。
如果您确实从源代码安装,您可能会考虑更改版本,例如7.8.2.1。您可以通过在AC_INIT中编辑configure.ac中的autoreconf行,然后在configure之前执行autoreconf来做到这一点。如果您这样做,并且还安装到特定于版本的位置(例如,/usr/local/ghc/ghc-7.8.2.1.src,可以通过./configure --PREFIX=/path/to/install设置),您就可以将本地编译的版本与打包的安装(或平台,或任何其他版本)同时安装。
请注意,ghc-7.8.3将在短期内发布(可能最多在两周内);这是一个错误修复版本。此外,目前还没有包含ghc-7.8的Haskell平台发布版本,因此这在目前还不是一个选项。
https://stackoverflow.com/questions/24115233
复制相似问题