问题描述
我尝试使用 cabal(在 archlinux 上)安装 haddock-api-2.24.0 包,但失败了:
➜ ~ cabal install haddock-api-2.24.0
Resolving dependencies...
Build profile: -w ghc-8.10.4 -O1
In order,the following will be built (use -v for more details):
- haddock-api-2.24.0 (lib) (requires build)
Starting haddock-api-2.24.0 (lib)
Building haddock-api-2.24.0 (lib)
Failed to build haddock-api-2.24.0.
Build log (
/home/kaga/.cabal/logs/ghc-8.10.4/haddock-api-2.24.0-385d0485d7052616aeee1dc25445b810e8e57ae43c803a5d5b3e62f2da8892e0.log
):
......
[11 of 40] Compiling Haddock.GhcUtils ( src/Haddock/GhcUtils.hs,dist/build/Haddock/GhcUtils.o,dist/build/Haddock/GhcUtils.dyn_o )
src/Haddock/GhcUtils.hs:60:42: error:
• Could not deduce: p ~ GhcPass p0
from the context: (SrcSpanLess (LPat p) ~ Pat p,HasSrcSpan (LPat p))
bound by the type signature for:
getMainDeclBinder :: forall p.
(SrcSpanLess (LPat p) ~ Pat p,HasSrcSpan (LPat p)) =>
HsDecl p -> [IdP p]
at src/Haddock/GhcUtils.hs:(58,1)-(59,40)
‘p’ is a rigid type variable bound by
the type signature for:
getMainDeclBinder :: forall p.
(SrcSpanLess (LPat p) ~ Pat p,HasSrcSpan (LPat p)) =>
HsDecl p -> [IdP p]
at src/Haddock/GhcUtils.hs:(58,40)
Expected type: TyClDecl (GhcPass p0)
Actual type: TyClDecl p
• In the first argument of ‘tcdName’,namely ‘d’
In the expression: tcdName d
In the expression: [tcdName d]
• Relevant bindings include
d :: TyClDecl p (bound at src/Haddock/GhcUtils.hs:60:28)
getMainDeclBinder :: HsDecl p -> [IdP p]
(bound at src/Haddock/GhcUtils.hs:60:1)
|
60 | getMainDeclBinder (TyClD _ d) = [tcdName d]
| ^
我刚刚开始学习 Haskell,所以我不知道这里发生了什么......
这似乎是一些严重的错误。 我应该怎么做才能修复它?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)