我是Haskell生态系统中的新手。我试图在Mac上安装hsdev
,在安装过程中,cabal无法建立ghc-syb-utils
。因此,我尝试安装它,但出现此错误:
cabal install ghc-syb-utils
Resolving dependencies...
Configuring ghc-syb-utils-0.2.3.3...
Building ghc-syb-utils-0.2.3.3...
Failed to install ghc-syb-utils-0.2.3.3
Build log ( /Users/filippo.deluca/.cabal/logs/ghc-8.4.3/ghc-syb-utils-0.2.3.3-4X3xR74iVGzDzFdcc1ZAvq.log ):
cabal: Entering directory '/var/folders/1c/0g_dhcfd2hz_9w3_b2cr8kkr0000gp/T/cabal-tmp-48180/ghc-syb-utils-0.2.3.3'
Configuring ghc-syb-utils-0.2.3.3...
Preprocessing library for ghc-syb-utils-0.2.3.3..
Building library for ghc-syb-utils-0.2.3.3..
[1 of 1] Compiling GHC.SYB.Utils ( GHC/SYB/Utils.hs, dist/build/GHC/SYB/Utils.o )
GHC/SYB/Utils.hs:258:64: error:
• Could not deduce (HasSourceText (XHsChar RdrName))
arising from a use of ‘ppr’
from the context: Data a
bound by the type signature for:
showData :: forall a. Data a => Stage -> Int -> a -> String
at GHC/SYB/Utils.hs:229:1-49
• In the second argument of ‘(.)’, namely ‘ppr’
In the second argument of ‘(.)’, namely ‘showSDoc_ . ppr’
In the second argument of ‘(.)’, namely
‘(++ "}") . showSDoc_ . ppr’
|
258 | overLit = ("{HsOverLit:"++) . (++"}") . showSDoc_ . ppr
| ^^^
GHC/SYB/Utils.hs:261:73: error:
• Could not deduce (Data (XHsChar RdrName))
arising from a use of ‘list’
from the context: Data a
bound by the type signature for:
showData :: forall a. Data a => Stage -> Int -> a -> String
at GHC/SYB/Utils.hs:229:1-49
• In the first argument of ‘(.)’, namely ‘list’
In the second argument of ‘(.)’, namely ‘list . bagToList’
In the second argument of ‘(.)’, namely
‘(++ "}") . list . bagToList’
|
261 | bagRdrName = ("{Bag(Located (HsBind RdrName)): "++) . (++"}") . list . bagToList
| ^^^^
GHC/SYB/Utils.hs:263:70: error:
• Could not deduce (Data (XHsChar Name))
arising from a use of ‘list’
from the context: Data a
bound by the type signature for:
showData :: forall a. Data a => Stage -> Int -> a -> String
at GHC/SYB/Utils.hs:229:1-49
• In the first argument of ‘(.)’, namely ‘list’
In the second argument of ‘(.)’, namely ‘list . bagToList’
In the second argument of ‘(.)’, namely
‘(++ "}") . list . bagToList’
|
263 | bagName = ("{Bag(Located (HsBind Name)): "++) . (++"}") . list . bagToList
| ^^^^
GHC/SYB/Utils.hs:265:69: error:
• Could not deduce (Data (XHsChar Var))
arising from a use of ‘list’
from the context: Data a
bound by the type signature for:
showData :: forall a. Data a => Stage -> Int -> a -> String
at GHC/SYB/Utils.hs:229:1-49
• In the first argument of ‘(.)’, namely ‘list’
In the second argument of ‘(.)’, namely ‘list . bagToList’
In the second argument of ‘(.)’, namely
‘(++ "}") . list . bagToList’
|
265 | bagVar = ("{Bag(Located (HsBind Var)): "++) . (++"}") . list . bagToList
| ^^^^
cabal: Leaving directory '/var/folders/1c/0g_dhcfd2hz_9w3_b2cr8kkr0000gp/T/cabal-tmp-48180/ghc-syb-utils-0.2.3.3'
cabal: Error: some packages failed to install:
ghc-syb-utils-0.2.3.3-4X3xR74iVGzDzFdcc1ZAvq failed during the building phase.
The exception was:
ExitFailure 1
我在Google上进行了搜索,但没有找到任何相关的解决方案或类似的问题。我的阴谋论版本是:
cabal-install version 2.2.0.0
compiled using version 2.2.0.1 of the Cabal library
我已经安装了hsdev
版本,但由于其他原因当前版本无法正常工作,因此我想重新安装它。