cabal用GHC 8.4安装djinn-lib?

时间:2018-03-11 01:15:28

标签: ghc cabal

我正在尝试使用GHC 8.4.1(来自Ubuntu 16.04 djinn-lib)安装apt-get

$ cabal install djinn-lib

但是我在<>运算符中出现了关于歧义的错误,如底部所示。

有谁知道如何修复它?

我使用的阴谋版本是:

$ cabal --version
cabal-install version 2.2.0.0
compiled using version 2.2.0.0 of the Cabal library

错误消息是:

$ cabal install djinn-lib
Resolving dependencies...
Configuring djinn-lib-0.0.1.2...
Preprocessing library for djinn-lib-0.0.1.2..
Building library for djinn-lib-0.0.1.2..
[1 of 4] Compiling Djinn.LJTFormula ( src/Djinn/LJTFormula.hs, dist/build/Djinn/LJTFormula.o )
[2 of 4] Compiling Djinn.LJT        ( src/Djinn/LJT.hs, dist/build/Djinn/LJT.o )
[3 of 4] Compiling Djinn.HTypes     ( src/Djinn/HTypes.hs, dist/build/Djinn/HTypes.o )

src/Djinn/HTypes.hs:242:29: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at src/Djinn/HTypes.hs:5:8-19
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.HughesPJ.<>’,
                             imported from ‘Text.PrettyPrint.HughesPJ’ at src/Djinn/HTypes.hs:36:67-70
    |
242 | ppPat _ (HPAt s p) = text s <> text "@" <> ppPat 10 p
    |                             ^^

src/Djinn/HTypes.hs:242:41: error:
    Ambiguous occurrence ‘<>’
    It could refer to either ‘Prelude.<>’,
                             imported from ‘Prelude’ at src/Djinn/HTypes.hs:5:8-19
                             (and originally defined in ‘GHC.Base’)
                          or ‘Text.PrettyPrint.HughesPJ.<>’,
                             imported from ‘Text.PrettyPrint.HughesPJ’ at src/Djinn/HTypes.hs:36:67-70
    |
242 | ppPat _ (HPAt s p) = text s <> text "@" <> ppPat 10 p
    |                                         ^^
Failed to install djinn-lib-0.0.1.2
cabal: Error: some packages failed to install:
djinn-lib-0.0.1.2-72XYG7inpNR6A7gk4acAK4 failed during the building phase. The
exception was:
ExitFailure 1

1 个答案:

答案 0 :(得分:0)

标识符<>已添加到前奏中,并与HughesPJ中的现有标记冲突。您可以将行import Prelude hiding((<>>))添加到相关文件的导入部分以修复此问题......