djinn icon indicating copy to clipboard operation
djinn copied to clipboard

Failure to compile

Open mouse07410 opened this issue 2 years ago • 0 comments

Cabal-3.6.2.0, Stack-2.7.5, GHC 9.2.3, 9.0.2, 8.10.7, 8.8.4, 8.6.5.

djinn fails to compile with either Cabal (all of the above GHC versions produced same output) or Stack (using GHC-9.0.2, resolver LTS-19.18).

With Cabal:

$ cabal install djinn
Resolving dependencies...
Build profile: -w ghc-9.2.3 -O1
In order, the following will be built (use -v for more details):
 - djinn-2014.9.7 (exe:djinn) (requires download & build)
Downloading  djinn-2014.9.7
Downloaded   djinn-2014.9.7
Starting     djinn-2014.9.7 (exe:djinn)
Building     djinn-2014.9.7 (exe:djinn)

Failed to build exe:djinn from djinn-2014.9.7.
Build log ( /Users/ur20980/.cabal/logs/ghc-9.2.3/djnn-2014.9.7-f8fe2bcb.log ):
Configuring executable 'djinn' for djinn-2014.9.7..
Preprocessing executable 'djinn' for djinn-2014.9.7..
Building executable 'djinn' for djinn-2014.9.7..
[1 of 7] Compiling Help             ( src/Help.hs, dist/build/djinn/djinn-tmp/Help.dyn_o )
[2 of 7] Compiling LJTFormula       ( src/LJTFormula.hs, dist/build/djinn/djinn-tmp/LJTFormula.dyn_o )
[3 of 7] Compiling LJT              ( src/LJT.hs, dist/build/djinn/djinn-tmp/LJT.dyn_o )

src/LJT.hs:143:5: warning: [-Wnoncanonical-monad-instances]
    Noncanonical ‘pure = return’ definition detected
    in the instance declaration for ‘Applicative P’.
    Move definition from ‘return’ to ‘pure’
    See also: https://gitlab.haskell.org/ghc/ghc/-/wikis/proposal/monad-of-no-return
    |
143 |     pure = return
    |     ^^^^^^^^^^^^^

src/LJT.hs:147:5: warning: [-Wnoncanonical-monad-instances]
    Noncanonical ‘return’ definition detected
    in the instance declaration for ‘Monad P’.
    ‘return’ will eventually be removed in favour of ‘pure’
    Either remove definition for ‘return’ (recommended) or define as ‘return = pure’
    See also: https://gitlab.haskell.org/ghc/ghc/-/wikis/proposal/monad-of-no-return
    |
147 |     return x = P $ \ s -> [(s, x)]
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[4 of 7] Compiling HTypes           ( src/HTypes.hs, dist/build/djinn/djinn-tmp/HTypes.dyn_o )

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

src/HTypes.hs:221:41: error:
    Ambiguous occurrence ‘<>’
    It could refer to
       either ‘Prelude.<>’,
              imported from ‘Prelude’ at src/HTypes.hs:6:8-13
              (and originally defined in ‘GHC.Base’)
           or ‘Text.PrettyPrint.HughesPJ.<>’,
              imported from ‘Text.PrettyPrint.HughesPJ’ at src/HTypes.hs:10:65-68
    |
221 | ppPat _ (HPAt s p) = text s <> text "@" <> ppPat 10 p
    |                                         ^^
cabal: Failed to build exe:djinn from djinn-2014.9.7. See the build log above
for details.


Cabal build log: djnn-2014.9.7-f8fe2bcb.log

With Stack:

$ stack install djinn
djinn> configure
djinn> Configuring djinn-2014.9.7...
djinn> build
djinn> Preprocessing executable 'djinn' for djinn-2014.9.7..
djinn> Building executable 'djinn' for djinn-2014.9.7..
djinn> [1 of 7] Compiling Help             ( src/Help.hs, .stack-work/dist/x86_64-osx/Cabal-3.4.1.0/build/djinn/djinn-tmp/Help.o )
djinn> [2 of 7] Compiling LJTFormula       ( src/LJTFormula.hs, .stack-work/dist/x86_64-osx/Cabal-3.4.1.0/build/djinn/djinn-tmp/LJTFormula.o )
djinn> [3 of 7] Compiling LJT              ( src/LJT.hs, .stack-work/dist/x86_64-osx/Cabal-3.4.1.0/build/djinn/djinn-tmp/LJT.o )
djinn> 
djinn> /private/var/folders/c6/lnc_0m093ys8w16md_fm1mnxhtfnj8/T/stack-6389f1b1243c3411/djinn-2014.9.7/src/LJT.hs:23:28: warning: [-Wunused-imports]
djinn>     The import of ‘Applicative’
djinn>     from module ‘Control.Applicative’ is redundant
djinn>    |
djinn> 23 | import Control.Applicative(Applicative(..), Alternative(empty, (<|>)))
djinn>    |                            ^^^^^^^^^^^^^^^
djinn> [4 of 7] Compiling HTypes           ( src/HTypes.hs, .stack-work/dist/x86_64-osx/Cabal-3.4.1.0/build/djinn/djinn-tmp/HTypes.o )
djinn> 
djinn> /private/var/folders/c6/lnc_0m093ys8w16md_fm1mnxhtfnj8/T/stack-6389f1b1243c3411/djinn-2014.9.7/src/HTypes.hs:221:29: error:
djinn>     Ambiguous occurrence ‘<>’
djinn>     It could refer to
djinn>        either ‘Prelude.<>’,
djinn>               imported from ‘Prelude’ at src/HTypes.hs:6:8-13
djinn>               (and originally defined in ‘GHC.Base’)
djinn>            or ‘Text.PrettyPrint.HughesPJ.<>’,
djinn>               imported from ‘Text.PrettyPrint.HughesPJ’ at src/HTypes.hs:10:65-68
djinn>     |
djinn> 221 | ppPat _ (HPAt s p) = text s <> text "@" <> ppPat 10 p
djinn>     |                             ^^
djinn> 
djinn> /private/var/folders/c6/lnc_0m093ys8w16md_fm1mnxhtfnj8/T/stack-6389f1b1243c3411/djinn-2014.9.7/src/HTypes.hs:221:41: error:
djinn>     Ambiguous occurrence ‘<>’
djinn>     It could refer to
djinn>        either ‘Prelude.<>’,
djinn>               imported from ‘Prelude’ at src/HTypes.hs:6:8-13
djinn>               (and originally defined in ‘GHC.Base’)
djinn>            or ‘Text.PrettyPrint.HughesPJ.<>’,
djinn>               imported from ‘Text.PrettyPrint.HughesPJ’ at src/HTypes.hs:10:65-68
djinn>     |
djinn> 221 | ppPat _ (HPAt s p) = text s <> text "@" <> ppPat 10 p
djinn>     |                                         ^^

--  While building package djinn-2014.9.7 (scroll up to its section to see the error) using:
      /Users/ur20980/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_3.4.1.0_ghc-9.0.2 --builddir=.stack-work/dist/x86_64-osx/Cabal-3.4.1.0 build --ghc-options " -fdiagnostics-color=always"
    Process exited with code: ExitFailure 1

mouse07410 avatar Jul 19 '22 04:07 mouse07410