Skip to content

Commit d7b09ed

Browse files
committed
Proper Show instance for HashMap
1 parent 1447081 commit d7b09ed

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Data/HashMap/Base.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,8 @@ type Bitmap = Word
174174
type Shift = Int
175175

176176
instance (Show k, Show v) => Show (HashMap k v) where
177-
show m = "fromList " ++ show (toList m)
177+
showsPrec d m = showParen (d > 10) $
178+
showString "fromList " . shows (toList m)
178179

179180
instance Traversable (HashMap k) where
180181
traverse f = traverseWithKey (const f)

0 commit comments

Comments
 (0)