Reputation: 22470
I'm trying to install djinn-lib
with GHC 8.4.1 (from Ubuntu 16.04 apt-get
).
$ cabal install djinn-lib
But I get an error about ambiguity in the <>
operator as shown at the bottom.
Does anyone know how to go about fixing it?
The cabal version I used was:
$ cabal --version
cabal-install version 2.2.0.0
compiled using version 2.2.0.0 of the Cabal library
The error message is:
$ 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
Upvotes: 0
Views: 90
Reputation: 38893
The identifier <>
was added to the prelude and it clashes with the existing one from HughesPJ. You can add the line import Prelude hiding((<>>))
to the imports section of the files in question to fix this...
Upvotes: 0