sebastiaanvisser / clay

A CSS preprocessor as embedded Haskell.
Other
360 stars 73 forks source link

clay-0.13.0 build failure with GHC 8.4 #171

Closed DanBurton closed 6 years ago

DanBurton commented 6 years ago

Add semigroup instances See also: https://ghc.haskell.org/trac/ghc/wiki/Migration/8.4#SemigroupMonoidsuperclasses

[ 1 of 31] Compiling Clay.Property    ( src/Clay/Property.hs, .stack-work/dist/x86_64-osx/Cabal-2.2.0.1/build/Clay/Property.o )

/Users/dan/scratch/clay-0.13.0/src/Clay/Property.hs:44:19: error:
    • No instance for (Semigroup (Key a))
        arising from the 'deriving' clause of a data type declaration
      Possible fix:
        use a standalone 'deriving instance' declaration,
          so you can specify the instance context yourself
    • When deriving the instance for (Monoid (Key a))
   |
44 |   deriving (Show, Monoid, IsString)
   |                   ^^^^^^

/Users/dan/scratch/clay-0.13.0/src/Clay/Property.hs:52:19: error:
    • No instance for (Semigroup Value)
        arising from the 'deriving' clause of a data type declaration
      Possible fix:
        use a standalone 'deriving instance' declaration,
          so you can specify the instance context yourself
    • When deriving the instance for (Monoid Value)
   |
52 |   deriving (Show, Monoid, IsString, Eq)
   |                   ^^^^^^

/Users/dan/scratch/clay-0.13.0/src/Clay/Property.hs:61:19: error:
    • No instance for (Semigroup Literal)
        arising from the 'deriving' clause of a data type declaration
      Possible fix:
        use a standalone 'deriving instance' declaration,
          so you can specify the instance context yourself
    • When deriving the instance for (Monoid Literal)
   |
61 |   deriving (Show, Monoid, IsString)
   |                   ^^^^^^

I was able to reproduce this locally like so:

stack unpack clay-0.13.0 && cd clay-0.13.0
echo 'resolver: nightly-2018-05-11' > stack.yaml
stack build --bench --no-run-benchmarks

n.b. I would also recommend allowing the test suite to work with hspec-2.5.

seanparsons commented 6 years ago

This is fixed now.

seanparsons commented 6 years ago

@DanBurton My Stackage PR is here: https://github.com/commercialhaskell/stackage/pull/3672