在haskell(cabal)中安装依赖项时出现问题

ryhaxcpt  于 2022-11-14  发布在  其他
关注(0)|答案(1)|浏览(145)

我试图运行一个阴谋集团的程序。所以我输入了命令cabal run。但我总是得到这个错误:

Failed to build fsnotify-0.4.0.1.
Build log ( C:\Users\Kim
Miller\AppData\Roaming\cabal\logs\ghc-8.8.4\fsnotify-0.4.0.1-fc6cc60833ed8dae1f18edcf54165185955b17cc.log
):
Preprocessing library for fsnotify-0.4.0.1..
Building library for fsnotify-0.4.0.1..
[ 1 of 10] Compiling System.FSNotify.Find ( src\System\FSNotify\Find.hs, dist\build\System\FSNotify\Find.o )
[ 2 of 10] Compiling System.FSNotify.Path ( src\System\FSNotify\Path.hs, dist\build\System\FSNotify\Path.o )
[ 3 of 10] Compiling System.FSNotify.Types ( src\System\FSNotify\Types.hs, dist\build\System\FSNotify\Types.o )
[ 4 of 10] Compiling System.FSNotify.Listener ( src\System\FSNotify\Listener.hs, dist\build\System\FSNotify\Listener.o )
[ 5 of 10] Compiling System.FSNotify.Polling ( src\System\FSNotify\Polling.hs, dist\build\System\FSNotify\Polling.o )
[ 6 of 10] Compiling System.FSNotify  ( src\System\FSNotify.hs, dist\build\System\FSNotify.o )

src\System\FSNotify.hs:169:34: error:
    Not in scope: type constructor or class `NativeManager'
    |
169 |     createManager :: Either Text NativeManager -> IO WatchManager
    |                                  ^^^^^^^^^^^^^
Error: cabal.exe: Failed to build fsnotify-0.4.0.1 (which is required by
exe:recdiagrams from recdiagrams-0.1.0.0). See the build log above for
details.

在日志文件中写入以下内容:

Preprocessing library for fsnotify-0.4.0.1..
Building library for fsnotify-0.4.0.1..
[ 1 of 10] Compiling System.FSNotify.Find ( src\System\FSNotify\Find.hs, dist\build\System\FSNotify\Find.o )
[ 2 of 10] Compiling System.FSNotify.Path ( src\System\FSNotify\Path.hs, dist\build\System\FSNotify\Path.o )
[ 3 of 10] Compiling System.FSNotify.Types ( src\System\FSNotify\Types.hs, dist\build\System\FSNotify\Types.o )
[ 4 of 10] Compiling System.FSNotify.Listener ( src\System\FSNotify\Listener.hs, dist\build\System\FSNotify\Listener.o )
[ 5 of 10] Compiling System.FSNotify.Polling ( src\System\FSNotify\Polling.hs, dist\build\System\FSNotify\Polling.o )
[ 6 of 10] Compiling System.FSNotify  ( src\System\FSNotify.hs, dist\build\System\FSNotify.o )

src\System\FSNotify.hs:169:34: error:
    Not in scope: type constructor or class `NativeManager'
    |
169 |     createManager :: Either Text NativeManager -> IO WatchManager
    |                                  ^^^^^^^^^^^^^

有人知道这个错误吗?甚至知道修复这个错误的解决方案吗?

fhity93d

fhity93d1#

此问题可在GitHub上跟踪:https://github.com/haskell-fswatch/hfsnotify/issues/107。您可以尝试回滚到早期版本(如0.4.0.0)或使用当前master分支中的版本,或者只是等待新版本。

相关问题