|
4 | 4 | {-# LANGUAGE RoleAnnotations #-}
|
5 | 5 | {-# LANGUAGE TypeFamilies #-}
|
6 | 6 | {-# LANGUAGE UnboxedTuples #-}
|
7 |
| -{-# LANGUAGE FlexibleInstances #-} |
8 | 7 | {-# LANGUAGE LambdaCase #-}
|
9 | 8 | #if __GLASGOW_HASKELL__ >= 802
|
10 | 9 | {-# LANGUAGE TypeInType #-}
|
@@ -292,7 +291,7 @@ instance Foldable.Foldable (HashMapT salt k) where
|
292 | 291 |
|
293 | 292 | #if MIN_VERSION_base(4,10,0)
|
294 | 293 | -- | @since 0.2.11
|
295 |
| -instance Bifoldable HashMap where |
| 294 | +instance Bifoldable (HashMapT salt) where |
296 | 295 | bifoldMap f g = foldMapWithKey (\ k v -> f k `mappend` g v)
|
297 | 296 | {-# INLINE bifoldMap #-}
|
298 | 297 | bifoldr f g = foldrWithKey (\ k v acc -> k `f` (v `g` acc))
|
@@ -390,7 +389,7 @@ instance Traversable (HashMapT salt k) where
|
390 | 389 | {-# INLINABLE traverse #-}
|
391 | 390 |
|
392 | 391 | #if MIN_VERSION_base(4,9,0)
|
393 |
| -instance Eq2 HashMap where |
| 392 | +instance Eq2 (HashMapT salt) where |
394 | 393 | liftEq2 = equal2
|
395 | 394 |
|
396 | 395 | instance Eq k => Eq1 (HashMapT salt k) where
|
@@ -461,7 +460,7 @@ equal2 eqk eqv t1 t2 = go (toList' t1 []) (toList' t2 [])
|
461 | 460 | leafEq (L k v) (L k' v') = eqk k k' && eqv v v'
|
462 | 461 |
|
463 | 462 | #if MIN_VERSION_base(4,9,0)
|
464 |
| -instance Ord2 HashMap where |
| 463 | +instance Ord2 (HashMapT salt) where |
465 | 464 | liftCompare2 = cmp
|
466 | 465 |
|
467 | 466 | instance Ord k => Ord1 (HashMapT salt k) where
|
@@ -602,11 +601,8 @@ empty :: forall k v salt . HashMapT salt k v
|
602 | 601 | empty = Empty
|
603 | 602 |
|
604 | 603 | -- | /O(1)/ Construct a map with a single element.
|
605 |
| -singleton :: (Hashable k, KnownNat salt) => k -> v -> HashMapT salt k v |
606 |
| -singleton = singleton' |
607 |
| - |
608 |
| -singleton' :: forall k v salt . (Hashable k, KnownNat salt) => k -> v -> HashMapT salt k v |
609 |
| -singleton' k v = Leaf (hash (Proxy :: Proxy salt) k) (L k v) |
| 604 | +singleton :: forall k v salt . (Hashable k, KnownNat salt) => k -> v -> HashMapT salt k v |
| 605 | +singleton k v = Leaf (hash (Proxy :: Proxy salt) k) (L k v) |
610 | 606 |
|
611 | 607 | ------------------------------------------------------------------------
|
612 | 608 | -- * Basic interface
|
|
0 commit comments