Skip to content

Commit bcefd41

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

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
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
@@ -144,10 +144,12 @@ instance Foldable.Foldable HashSet where
144144
{-# INLINE foldl' #-}
145145
toList = Data.HashSet.Base.toList
146146
{-# INLINE toList #-}
147+
#if MIN_VERSION_base(4,8,0)
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

0 commit comments

Comments
 (0)