I tried to install haddock-api-2.24.0 package with cabal (on archlinux) but it failed:
➜ ~ 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,1)-(59,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]
| ^
I've just begun to learn Haskell so I don't know what's going on here...
It seems like some serious error. What should I do to get it fixed?