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:
parent
e2d2543951
commit
8ed7d765dd
|
@ -489,7 +489,7 @@ library
|
||||||
build-depends:
|
build-depends:
|
||||||
aeson >= 1.4.2 && < 1.5
|
aeson >= 1.4.2 && < 1.5
|
||||||
, array >=0.4 && <0.6
|
, array >=0.4 && <0.6
|
||||||
, base >=4.9 && <5
|
, base >=4.11 && <5
|
||||||
, binary >= 0.8.5 && < 0.9
|
, binary >= 0.8.5 && < 0.9
|
||||||
, bytestring >= 0.10.8 && < 0.11
|
, bytestring >= 0.10.8 && < 0.11
|
||||||
, comonad >= 5.0.4 && < 5.1
|
, comonad >= 5.0.4 && < 5.1
|
||||||
|
@ -644,7 +644,7 @@ test-suite hnix-tests
|
||||||
build-depends:
|
build-depends:
|
||||||
Diff
|
Diff
|
||||||
, Glob
|
, Glob
|
||||||
, base >=4.9 && <5
|
, base >=4.11 && <5
|
||||||
, bytestring
|
, bytestring
|
||||||
, containers
|
, containers
|
||||||
, data-fix
|
, data-fix
|
||||||
|
@ -705,7 +705,7 @@ benchmark hnix-benchmarks
|
||||||
benchmarks
|
benchmarks
|
||||||
ghc-options: -Wall
|
ghc-options: -Wall
|
||||||
build-depends:
|
build-depends:
|
||||||
base >=4.9 && <5
|
base >=4.11 && <5
|
||||||
, bytestring
|
, bytestring
|
||||||
, containers
|
, containers
|
||||||
, criterion
|
, criterion
|
||||||
|
|
|
@ -5,7 +5,7 @@ module Nix.Cache where
|
||||||
import qualified Data.ByteString.Lazy as BS
|
import qualified Data.ByteString.Lazy as BS
|
||||||
import Nix.Expr.Types.Annotated
|
import Nix.Expr.Types.Annotated
|
||||||
|
|
||||||
#if defined (__linux__) && MIN_VERSION_base(4, 10, 0)
|
#if defined (__linux__)
|
||||||
#define USE_COMPACT 1
|
#define USE_COMPACT 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -68,10 +68,8 @@ import Nix.Utils
|
||||||
import Text.Megaparsec.Pos
|
import Text.Megaparsec.Pos
|
||||||
import Text.Read.Deriving
|
import Text.Read.Deriving
|
||||||
import Text.Show.Deriving
|
import Text.Show.Deriving
|
||||||
#if MIN_VERSION_base(4, 10, 0)
|
|
||||||
import Type.Reflection ( eqTypeRep )
|
import Type.Reflection ( eqTypeRep )
|
||||||
import qualified Type.Reflection as Reflection
|
import qualified Type.Reflection as Reflection
|
||||||
#endif
|
|
||||||
|
|
||||||
type VarName = Text
|
type VarName = Text
|
||||||
|
|
||||||
|
@ -83,14 +81,6 @@ hashAt = flip alterF
|
||||||
instance Hashable1 NonEmpty
|
instance Hashable1 NonEmpty
|
||||||
#endif
|
#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)
|
#if !MIN_VERSION_binary(0, 8, 4)
|
||||||
instance Binary a => Binary (NE.NonEmpty a) where
|
instance Binary a => Binary (NE.NonEmpty a) where
|
||||||
get = fmap NE.fromList Bin.get
|
get = fmap NE.fromList Bin.get
|
||||||
|
@ -162,18 +152,11 @@ instance Serialise r => Serialise (NExprF r)
|
||||||
instance IsString NExpr where
|
instance IsString NExpr where
|
||||||
fromString = Fix . NSym . fromString
|
fromString = Fix . NSym . fromString
|
||||||
|
|
||||||
#if MIN_VERSION_base(4, 10, 0)
|
|
||||||
instance Lift (Fix NExprF) where
|
instance Lift (Fix NExprF) where
|
||||||
lift = dataToExpQ $ \b ->
|
lift = dataToExpQ $ \b ->
|
||||||
case Reflection.typeOf b `eqTypeRep` Reflection.typeRep @Text of
|
case Reflection.typeOf b `eqTypeRep` Reflection.typeRep @Text of
|
||||||
Just HRefl -> Just [| pack $(liftString $ unpack b) |]
|
Just HRefl -> Just [| pack $(liftString $ unpack b) |]
|
||||||
Nothing -> Nothing
|
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.
|
-- | The monomorphic expression type is a fixed point of the polymorphic one.
|
||||||
type NExpr = Fix NExprF
|
type NExpr = Fix NExprF
|
||||||
|
|
Loading…
Reference in a new issue