Require base >= 4.11

There were multiple build failures with GHC-8.2 due
to (<>) and Semigroup not being in scope.
This commit is contained in:
Simon Jakobi 2019-10-21 23:44:09 +02:00
parent e2d2543951
commit 8ed7d765dd
3 changed files with 4 additions and 21 deletions

View File

@ -489,7 +489,7 @@ library
build-depends:
aeson >= 1.4.2 && < 1.5
, array >=0.4 && <0.6
, base >=4.9 && <5
, base >=4.11 && <5
, binary >= 0.8.5 && < 0.9
, bytestring >= 0.10.8 && < 0.11
, comonad >= 5.0.4 && < 5.1
@ -644,7 +644,7 @@ test-suite hnix-tests
build-depends:
Diff
, Glob
, base >=4.9 && <5
, base >=4.11 && <5
, bytestring
, containers
, data-fix
@ -705,7 +705,7 @@ benchmark hnix-benchmarks
benchmarks
ghc-options: -Wall
build-depends:
base >=4.9 && <5
base >=4.11 && <5
, bytestring
, containers
, criterion

View File

@ -5,7 +5,7 @@ module Nix.Cache where
import qualified Data.ByteString.Lazy as BS
import Nix.Expr.Types.Annotated
#if defined (__linux__) && MIN_VERSION_base(4, 10, 0)
#if defined (__linux__)
#define USE_COMPACT 1
#endif

View File

@ -68,10 +68,8 @@ import Nix.Utils
import Text.Megaparsec.Pos
import Text.Read.Deriving
import Text.Show.Deriving
#if MIN_VERSION_base(4, 10, 0)
import Type.Reflection ( eqTypeRep )
import qualified Type.Reflection as Reflection
#endif
type VarName = Text
@ -83,14 +81,6 @@ hashAt = flip alterF
instance Hashable1 NonEmpty
#endif
#if !MIN_VERSION_base(4, 10, 0)
instance Eq1 NonEmpty where
liftEq eq (a NE.:| as) (b NE.:| bs) = eq a b && liftEq eq as bs
instance Show1 NonEmpty where
liftShowsPrec shwP shwL p (a NE.:| as) = showParen (p > 5) $
shwP 6 a . showString " :| " . shwL as
#endif
#if !MIN_VERSION_binary(0, 8, 4)
instance Binary a => Binary (NE.NonEmpty a) where
get = fmap NE.fromList Bin.get
@ -162,18 +152,11 @@ instance Serialise r => Serialise (NExprF r)
instance IsString NExpr where
fromString = Fix . NSym . fromString
#if MIN_VERSION_base(4, 10, 0)
instance Lift (Fix NExprF) where
lift = dataToExpQ $ \b ->
case Reflection.typeOf b `eqTypeRep` Reflection.typeRep @Text of
Just HRefl -> Just [| pack $(liftString $ unpack b) |]
Nothing -> Nothing
#else
instance Lift (Fix NExprF) where
lift = dataToExpQ $ \b -> case cast b of
Just t -> Just [| pack $(liftString $ unpack t) |]
Nothing -> Nothing
#endif
-- | The monomorphic expression type is a fixed point of the polymorphic one.
type NExpr = Fix NExprF