Skip to content

Commit 8ed7d76

Browse files
committed
Require base >= 4.11
There were multiple build failures with GHC-8.2 due to (<>) and Semigroup not being in scope.
1 parent e2d2543 commit 8ed7d76

File tree

3 files changed

+4
-21
lines changed

3 files changed

+4
-21
lines changed

hnix.cabal

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ library
489489
build-depends:
490490
aeson >= 1.4.2 && < 1.5
491491
, array >=0.4 && <0.6
492-
, base >=4.9 && <5
492+
, base >=4.11 && <5
493493
, binary >= 0.8.5 && < 0.9
494494
, bytestring >= 0.10.8 && < 0.11
495495
, comonad >= 5.0.4 && < 5.1
@@ -644,7 +644,7 @@ test-suite hnix-tests
644644
build-depends:
645645
Diff
646646
, Glob
647-
, base >=4.9 && <5
647+
, base >=4.11 && <5
648648
, bytestring
649649
, containers
650650
, data-fix
@@ -705,7 +705,7 @@ benchmark hnix-benchmarks
705705
benchmarks
706706
ghc-options: -Wall
707707
build-depends:
708-
base >=4.9 && <5
708+
base >=4.11 && <5
709709
, bytestring
710710
, containers
711711
, criterion

src/Nix/Cache.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module Nix.Cache where
55
import qualified Data.ByteString.Lazy as BS
66
import Nix.Expr.Types.Annotated
77

8-
#if defined (__linux__) && MIN_VERSION_base(4, 10, 0)
8+
#if defined (__linux__)
99
#define USE_COMPACT 1
1010
#endif
1111

src/Nix/Expr/Types.hs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,8 @@ import Nix.Utils
6868
import Text.Megaparsec.Pos
6969
import Text.Read.Deriving
7070
import Text.Show.Deriving
71-
#if MIN_VERSION_base(4, 10, 0)
7271
import Type.Reflection ( eqTypeRep )
7372
import qualified Type.Reflection as Reflection
74-
#endif
7573

7674
type VarName = Text
7775

@@ -83,14 +81,6 @@ hashAt = flip alterF
8381
instance Hashable1 NonEmpty
8482
#endif
8583

86-
#if !MIN_VERSION_base(4, 10, 0)
87-
instance Eq1 NonEmpty where
88-
liftEq eq (a NE.:| as) (b NE.:| bs) = eq a b && liftEq eq as bs
89-
instance Show1 NonEmpty where
90-
liftShowsPrec shwP shwL p (a NE.:| as) = showParen (p > 5) $
91-
shwP 6 a . showString " :| " . shwL as
92-
#endif
93-
9484
#if !MIN_VERSION_binary(0, 8, 4)
9585
instance Binary a => Binary (NE.NonEmpty a) where
9686
get = fmap NE.fromList Bin.get
@@ -162,18 +152,11 @@ instance Serialise r => Serialise (NExprF r)
162152
instance IsString NExpr where
163153
fromString = Fix . NSym . fromString
164154

165-
#if MIN_VERSION_base(4, 10, 0)
166155
instance Lift (Fix NExprF) where
167156
lift = dataToExpQ $ \b ->
168157
case Reflection.typeOf b `eqTypeRep` Reflection.typeRep @Text of
169158
Just HRefl -> Just [| pack $(liftString $ unpack b) |]
170159
Nothing -> Nothing
171-
#else
172-
instance Lift (Fix NExprF) where
173-
lift = dataToExpQ $ \b -> case cast b of
174-
Just t -> Just [| pack $(liftString $ unpack t) |]
175-
Nothing -> Nothing
176-
#endif
177160

178161
-- | The monomorphic expression type is a fixed point of the polymorphic one.
179162
type NExpr = Fix NExprF

0 commit comments

Comments
 (0)