remove many old version ifdefs

Drop support for building with ghc older than 8.4.4, and with older
versions of serveral haskell libraries than will be included in Debian 10.

The only remaining version ifdefs in the entire code base are now a couple
for aws!

This commit should only be merged after the Debian 10 release.
And perhaps it will need to wait longer than that; it would make
backporting new versions of  git-annex to Debian 9 (stretch) which
has been actively happening as recently as this year.

This commit was sponsored by Ilya Shlyakhter.
This commit is contained in:
Joey Hess 2019-07-05 15:09:37 -04:00
parent b8ef1bf3be
commit 9a5ddda511
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
29 changed files with 42 additions and 319 deletions

View file

@ -5,7 +5,6 @@
- License: BSD-2-clause
-}
{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
{-# LANGUAGE TypeSynonymInstances #-}
@ -18,9 +17,7 @@ import Test.QuickCheck as X
import Data.Time.Clock.POSIX
import Data.Ratio
import System.Posix.Types
#if MIN_VERSION_QuickCheck(2,10,0)
import Data.List.NonEmpty (NonEmpty(..))
#endif
import Prelude
{- Times before the epoch are excluded. Half with decimal and half without. -}
@ -45,11 +42,8 @@ instance Arbitrary FileID where
instance Arbitrary FileOffset where
arbitrary = nonNegative arbitrarySizedIntegral
{- Latest Quickcheck lacks this instance. -}
#if MIN_VERSION_QuickCheck(2,10,0)
instance Arbitrary l => Arbitrary (NonEmpty l) where
arbitrary = (:|) <$> arbitrary <*> arbitrary
#endif
nonNegative :: (Num a, Ord a) => Gen a -> Gen a
nonNegative g = g `suchThat` (>= 0)