on master help sign in
Merge pull request #4606 from dmalikov/Show_SortedMap
b2c46a1Niklas Larsson
libs/contrib/Data/SortedMap.idr+4
@@ -287,6 +287,10 @@ export
287mergeLeft : SortedMap k v -> SortedMap k v -> SortedMap k v
287mergeLeft : SortedMap k v -> SortedMap k v -> SortedMap k v
288mergeLeft = mergeWith const
288mergeLeft = mergeWith const
289
289
290+export
291+(Show k, Show v) => Show (SortedMap k v) where
292+ show m = "fromList " ++ (show $ toList m)
293+
290-- TODO: is this the right variant of merge to use for this? I think it is, but
294-- TODO: is this the right variant of merge to use for this? I think it is, but
291-- I could also see the advantages of using `mergeLeft`. The current approach is
295-- I could also see the advantages of using `mergeLeft`. The current approach is
292-- strictly more powerful I believe, because `mergeLeft` can be emulated with
296-- strictly more powerful I believe, because `mergeLeft` can be emulated with