sjoerdvisscher / fmlist

FoldMap lists

Home Page:http://hackage.haskell.org/package/fmlist

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build error with GHC 8.4.1-alpha1

asr opened this issue · comments

GHC 8.4.1-alpha1 was announced. While testing Agda with this version of GHC, I got an error on fmlist (master branch) related to a missing instance of Semigroup.

This error is reported as a warning in GHC 8.0.2/8.2.2 using the -Wsemigroup flag:

$ cabal install --force-reinstalls --ghc-options='-Wsemigroup -Werror'

So, fixing this warning on GHC 8.0.2/8.2.2 fix the error on GHC 8.4.1-alpha1.

Blocking agda/agda#2878.

For knowing the warnings in GHC 8.0.2/8.2.2, I realised it's better to use the -Wcompat flag:

$ cabal install --force-reinstalls --ghc-options='-Wcompat -Werror'

Fixed in 0.9.1!

I still got the errror in 0.9.1:

$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.4.0.20171214
$ cabal get fmlist
$ cd fmlist-0.9.1
$ cabal sandbox init
$ cabal install
1 of 1] Compiling Data.FMList      ( Data/FMList.hs, dist/dist-sandbox-5174637b/build/Data/FMList.o )

Data/FMList.hs:302:10: error:
    • No instance for (Semigroup.Semigroup (FMList a))
        arising from the superclasses of an instance declaration
    • In the instance declaration for ‘Monoid (FMList a)’
    |
302 | instance Monoid (FMList a) where
    |          ^^^^^^^^^^^^^^^^^
Failed to install fmlist-0.9.1