为什么使用Stack的bytestring-show包安装失败?

时间:2017-01-17 16:36:30

标签: haskell haskell-stack

它与cabal install bytestring-show安装得很好。这是日志:

Configuring bytestring-show-0.3.5.6...
Building bytestring-show-0.3.5.6...
Preprocessing library bytestring-show-0.3.5.6...
[1 of 6] Compiling Text.Show.ByteString.Util ( Text\Show\ByteString\Util.hs, .stack-work\dist\b7fec021\build\Text\Show\ByteString\Util.o )
[2 of 6] Compiling Text.Show.ByteString.Char ( Text\Show\ByteString\Char.hs, .stack-work\dist\b7fec021\build\Text\Show\ByteString\Char.o )
[3 of 6] Compiling Text.Show.ByteString.Int ( Text\Show\ByteString\Int.hs, .stack-work\dist\b7fec021\build\Text\Show\ByteString\Int.o )
[4 of 6] Compiling Text.Show.ByteString.Integer ( Text\Show\ByteString\Integer.hs, .stack-work\dist\b7fec021\build\Text\Show\ByteString\Integer.o )

Text\Show\ByteString\Integer.hs:27:1: warning: [-Wunused-imports]
    The import of `GHC.Num' is redundant
      except perhaps to import instances from `GHC.Num'
    To import instances alone, use: import GHC.Num()
[5 of 6] Compiling Text.Show.ByteString.Float ( Text\Show\ByteString\Float.hs, .stack-work\dist\b7fec021\build\Text\Show\ByteString\Float.o )
[6 of 6] Compiling Text.Show.ByteString ( Text\Show\ByteString.hs, .stack-work\dist\b7fec021\build\Text\Show\ByteString.o )

Text\Show\ByteString.hs:205:10: warning: [-Wredundant-constraints]
    * Redundant constraint: Integral a
    * In the instance declaration for `Show (Ratio a)'

Text\Show\ByteString.hs:209:10: warning: [-Wredundant-constraints]
    * Redundant constraint: RealFloat a
    * In the instance declaration for `Show (Complex a)'
Installing library in C:\Users\Marko\Documents\Visual Studio
2015\Projects\Multi-armed Bandit Experiments\Spiral V5
Haskell\.stack-work\install\93264ba9\lib\x86_64-windows-ghc-8.0.1\bytestring-show-0.3.5.6-BjSy8lPQnxSIztPkxWzSlH
copyFile: does not exist (The system cannot find the path specified.)

首先,最后一行的错误是access denied所以我使用管理员访问权限执行了上述操作,并且它抱怨它无法找到指定的路径。

我将extra-deps: [bytestring-show-0.3.5.6]放入yaml文件中,并将bytestring-show作为构建依赖项添加到cabal文件中。

我也尝试升级堆栈并收到此错误:

C:\>stack upgrade
Updating package index Hackage (mirrored at https://github.com/commercialhaskell                                                                                Fetching package index ...remote: Counting objects: 1, done.
remote: Total 1 (delta 0), reused 1 (delta 0), pack-reused 0
Unpacking objects: 100% (1/1), done.
Fetched package index.
Populated index cache.
Compiler version mismatched, found ghc-8.0.1 (x86_64), but expected minor version match with ghc-7.10.3 (x86_64) (based on resolver setting in C:\Users\Marko\AppData\Local\Temp\stack-upgrade8368\stack-1.3.2\stack.yaml).
Try rerunning with --install-ghc to install the correct GHC into C:\Users\Marko\AppData\Local\Programs\stack\x86_64-windows\

我昨天刚刚安装了Haskell平台,但我已经安装了几个月前的早期版本,所以也许它没有得到正确的清理。

我不知道该怎么做。

0 个答案:

没有答案