【发布时间】:2014-02-07 03:49:35
【问题描述】:
我对 Haskell 很陌生,并尝试使用 Cabal 安装 Yesod,但我遇到了这个编译错误:
cabal install yesod --force-reinstalls
Network/Wai/Parse.hs:106:61:
No instance for (Control.Monad.Trans.Resource.Internal.MonadThrow
(ConduitM S8.ByteString Void IO))
arising from a use of `allocate'
Possible fix:
add an instance declaration for
(Control.Monad.Trans.Resource.Internal.MonadThrow
(ConduitM S8.ByteString Void IO))
In the second argument of `($)', namely
`allocate
(do { tempDir <- getTmpDir;
openBinaryTempFile tempDir pattern })
(\ (_, h) -> hClose h)'
In a stmt of a 'do' block:
(key, (fp, h)) <- flip runInternalState internalState
$ allocate
(do { tempDir <- getTmpDir;
openBinaryTempFile tempDir pattern })
(\ (_, h) -> hClose h)
In the expression:
do { (key, (fp, h)) <- flip runInternalState internalState
$ allocate
(do { tempDir <- getTmpDir;
openBinaryTempFile tempDir pattern })
(\ (_, h) -> hClose h);
_ <- runInternalState (register $ removeFile fp) internalState;
CB.sinkHandle h;
lift $ release key;
.... }
Failed to install wai-extra-2.0.2
This is the full output when installing
我正在使用带有 ghc-clang-wrapper 脚本的最新 Haskell 平台。
阴谋集团版本:
$ cabal --version
cabal-install version 1.16.0.2
using version 1.16.0 of the Cabal library
GHC 版本:
$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.6.3
一些教程提到使用 cabal 沙箱,但我的 cabal 版本(1.16)太旧了。如果沙盒可能太有帮助,我会尝试让它工作(将 cabal 更新到 1.18 有点麻烦)。
【问题讨论】: