fix build for ghc 8.4

This commit is contained in:
Harendra Kumar 2018-04-14 17:12:34 +05:30
parent ac3b3df16e
commit 663ecb9e27
2 changed files with 9 additions and 2 deletions

View File

@ -121,7 +121,7 @@ matrix:
# Note COVERALLS (hpc-coveralls) works only with cabal build.
# For this to succeed you have to add your project to coveralls.io first
- env: BUILD=cabal CABALVER=2.0 GHCVER=8.2.2 COVERALLS_OPTIONS="--coverage-mode=StrictlyFullLines --exclude-dir=test test"
- env: BUILD=cabal CABALVER=2.0 GHCVER=8.2.2 COVERALLS_OPTIONS="--coverage-mode=StrictlyFullLines --exclude-dir=test test properties"
addons: {apt: {packages: [cabal-install-2.0,ghc-8.2.2], sources: [hvr-ghc]}}
# --------------------------------------------------------------------------

View File

@ -1,3 +1,5 @@
{-# LANGUAGE CPP #-}
module Main (main) where
import Control.Monad (when)
@ -161,7 +163,12 @@ transformOpsWord8 desc t = do
prop (desc ++ " elem") $ elemOp t A.notElem notElem
semigroupOps
:: (Streaming t, MonadPlus (t IO), Semigroup (t IO Int), Monoid (t IO Int))
:: ( Streaming t, MonadPlus (t IO)
#if __GLASGOW_HASKELL__ < 804
, Semigroup (t IO Int)
#endif
, Monoid (t IO Int))
=> String -> (t IO Int -> t IO Int) -> Spec
semigroupOps desc t = do
prop (desc ++ " <>") $ foldFromList (foldMapWith (<>) return) t