Skip to content

Commit 4b86e5a

Browse files
committed
ghc 7.8.4 Foldable compat
1 parent 5ad97d6 commit 4b86e5a

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

Data/HashMap/Base.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,11 +201,12 @@ instance Foldable.Foldable (HashMap k) where
201201
{-# INLINE foldr #-}
202202
foldl' = Data.HashMap.Base.foldl'
203203
{-# INLINE foldl' #-}
204+
#if MIN_VERSION_base(4,8,0)
204205
null = Data.HashMap.Base.null
205206
{-# INLINE null #-}
206207
length = Data.HashMap.Base.size
207208
{-# INLINE length #-}
208-
209+
#endif
209210

210211
#if __GLASGOW_HASKELL__ >= 711
211212
instance (Eq k, Hashable k) => Semigroup (HashMap k v) where

Data/HashSet/Base.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,14 @@ instance Foldable.Foldable HashSet where
142142
{-# INLINE foldr #-}
143143
foldl' = Data.HashSet.Base.foldl'
144144
{-# INLINE foldl' #-}
145+
#if MIN_VERSION_base(4,8,0)
145146
toList = Data.HashSet.Base.toList
146147
{-# INLINE toList #-}
147148
null = Data.HashSet.Base.null
148149
{-# INLINE null #-}
149150
length = Data.HashSet.Base.size
150151
{-# INLINE length #-}
152+
#endif
151153

152154
#if __GLASGOW_HASKELL__ >= 711
153155
instance (Hashable a, Eq a) => Semigroup (HashSet a) where

unordered-containers.cabal

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: unordered-containers
2-
version: 0.2.10.0
2+
version: 0.2.10.1
33
synopsis: Efficient hashing-based container types
44
description:
55
Efficient hashing-based container types. The containers have been
@@ -54,7 +54,7 @@ library
5454
MagicHash,
5555
BangPatterns
5656

57-
ghc-options: -Wall -O2 -fwarn-tabs -ferror-spans
57+
ghc-options: -Wall -O2 -fwarn-tabs -ferror-spans
5858

5959
if impl (ghc < 8.2)
6060
-- This is absolutely necessary (but not sufficient) for correctness due to

0 commit comments

Comments
 (0)