[Haskell-cafe] MonoidHashMap?

Ben Gamari ben at smart-cactus.org
Tue Jan 20 17:35:02 UTC 2015


Tobias Dammers <tdammers at gmail.com> writes:

> Pragmatic workaround: newtype-wrap HashMap?
>
I've put up a quick package wrapping `HashMap` and `Map` with the
appropriate Monoid instance here [1]. In addition to the types
themselves and a wide variety of `lens` and `newtype` instances, I
export a selection of the more widely used functions supported by `Map`
and `HashMap`.

Those functions that aren't exported can be wrapped using the `Wrapping`
or `Newtype` instance without too much trouble or if there's demand I
wouldn't be opposed to exporting more of `Map`'s functionality. Patches
accepted.

Cheers,

- Ben


[1] https://github.com/bgamari/monoidal-containers
    http://hackage.haskell.org/package/monoidal-containers
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 472 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20150120/3ebecee4/attachment.sig>


More information about the Haskell-Cafe mailing list