File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -167,6 +167,7 @@ type role HashMapInner nominal representational
167167-- | A wrapper over 'HashMapInner'. The 'Int' field represent the hashmap's
168168-- size.
169169data HashMap k v = HashMap {- # UNPACK #-} !Int ! (HashMapInner k v )
170+ deriving Typeable
170171
171172instance (NFData k , NFData v ) => NFData (HashMapInner k v ) where
172173 rnf Empty = ()
@@ -254,7 +255,7 @@ instance Traversable (HashMap k) where
254255 traverse f = traverseWithKey (const f)
255256
256257#if MIN_VERSION_base(4,9,0)
257- instance Eq2 HashMapInner where
258+ instance Eq2 HashMap where
258259 liftEq2 = equal
259260
260261instance Eq k => Eq1 (HashMap k ) where
Original file line number Diff line number Diff line change @@ -218,7 +218,7 @@ unsafeInsertWithInternal f k0 v0 m0 = runST (go h0 k0 v0 0 m0)
218218 else do
219219 let l' = x `seq` (L k x)
220220 return $! (1 , collision h l l')
221- | otherwise = (1 ,) <$> ( x `seq` two s h k x hy ky y)
221+ | otherwise = (x `seq` two s h k x hy ky y) >>= return . ( 1 , )
222222 go h k x s t@ (BitmapIndexed b ary)
223223 | b .&. m == 0 = do
224224 ary' <- A. insertM ary i $! leaf h k x
You can’t perform that action at this time.
0 commit comments