安装后不存在异步库

问题描述

我正在尝试安装 async,但事实证明这是一次糟糕的冒险!我尝试使用命令 cabal install async 通过 cabal 安装它。 这给了我错误

~/Desktop : cabal install async
Resolving dependencies...
Up to date
Warning: You asked to install executables,but there are no executables in
target: async. Perhaps you want to use --lib to install libraries instead.

现在使用命令 cabal install async --lib 安装会给我错误

Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] next goal: base (user goal)
[__0] rejecting: base-4.14.1.0,base-4.14.0.0 (constraint from user target
requires ==4.13.0.0)
[__0] trying: base-4.13.0.0/installed-4.13.0.0
[__1] next goal: ghc (user goal)
[__1] rejecting: ghc-8.10.2,ghc-8.10.1 (constraint from user target requires
==8.8.3)
[__1] trying: ghc-8.8.3/installed-8.8.3
[__2] next goal: process (user goal)
[__2] rejecting: process-1.6.11.0 (constraint from user target requires
==1.6.10.0)
[__2] rejecting: process-1.6.10.0 (conflict: ghc =>
process==1.6.8.0/installed-1.6.8.0)
[__2] rejecting: process-1.6.9.0,process-1.6.8.2,process-1.6.8.1,process-1.6.8.0/installed-1.6.8.0,process-1.6.8.0,process-1.6.7.0,process-1.6.6.0,process-1.6.5.1,process-1.6.5.0,process-1.6.4.0,process-1.6.3.0,process-1.6.2.0,process-1.6.1.0,process-1.6.0.0,process-1.5.0.0,process-1.4.3.0,process-1.4.2.0,process-1.4.1.0,process-1.4.0.0,process-1.3.0.0,process-1.2.3.0,process-1.2.2.0,process-1.2.1.0,process-1.2.0.0,process-1.1.0.2,process-1.1.0.1,process-1.1.0.0,process-1.0.1.5,process-1.0.1.4,process-1.0.1.3,process-1.0.1.2,process-1.0.1.1,process-1.0.0.0 (constraint from user target
requires ==1.6.10.0)
[__2] fail (backjumping,conflict set: ghc,process)
After searching the rest of the dependency tree exhaustively,these were the
goals I've had most trouble fulfilling: process,ghc,base

我的进程、ghc 和 base 不兼容。我假设这是因为版本限制,但是当我尝试通过以下命令安装包时,我收到此消息:

cabal get async
cd async-2.2.3
cabal build

Resolving dependencies...
Build profile: -w ghc-8.8.3 -O1
In order,the following will be built (use -v for more details):
 - async-2.2.3 (lib) (first run)
Configuring library for async-2.2.3..
Preprocessing library for async-2.2.3..
Building library for async-2.2.3..
[1 of 1] Compiling Control.Concurrent.Async ( Control/Concurrent/Async.hs,/Users/edward/Desktop/lsy/Olivia/async-2.2.3/dist-newstyle/build/x86_64-osx/ghc-8.8.3/async-2.2.3/build/Control/Concurrent/Async.o )

Control/Concurrent/Async.hs:215:1: warning: [-Wunused-imports]
    The import of ‘Data.Semigroup’ is redundant
      except perhaps to import instances from ‘Data.Semigroup’
    To import instances alone,use: import Data.Semigroup()
    |
215 | import Data.Semigroup (Semigroup((<>)))
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

当我现在实际导入库时,它说它是隐藏的,我可以使用它的唯一方法是如果我公开但公开它,我只能在 ghci 中使用包而不是在诸如此处找到的程序中https://www.fpcomplete.com/haskell/library/async/

如果它能够建立图书馆,我不应该“拥有”图书馆吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)