containers-backpack
containers-backpack copied to clipboard
🎒 Backpack interface for containers
These functions can be put directly to `containers-sig-*` packages. * `!?` as an operator version of `lookup` * `//` for Map difference For example, there's this useful operator: ```haskell infixl...
`unpacked-containers` is itself implemented with the help of Backpack! So it's rather exciting to have `Map.hsig` instance for this package as well.
This package: * https://hackage.haskell.org/package/text-containers-0.1.0.0
Currently suites take `Proxy` as an argument. But it's better to use `AllowAmbiguousTypes` extension to not pass `Proxy` and pass types directly. https://github.com/kowainik/containers-backpack/blob/c84b22f7551bd34183ac76ff20dd4e4fa4cd6f48/containers-contrib-readonly/src/Map/Contrib/Laws.hs#L79-L84
Some tests introduced in #34 are unit tests and some are property-based tests. It would be really nice to somehow separate tests. For example, this one is unit test: https://github.com/kowainik/containers-backpack/blob/c84b22f7551bd34183ac76ff20dd4e4fa4cd6f48/containers-contrib-readonly/src/Map/Contrib/Laws.hs#L21-L22...
The following generator looks strange. Probably `Gen` is not needed there (or I'm not sure) https://github.com/kowainik/containers-backpack/blob/c84b22f7551bd34183ac76ff20dd4e4fa4cd6f48/containers-contrib-readonly/src/Map/Contrib/Laws.hs#L24
The tests are implemented in this module: https://github.com/kowainik/containers-backpack/blob/master/containers-contrib-readonly/src/Map/Contrib/Laws.hs Probably some tests are missing there. I propose to think more about all possible tests, document them in some mathy or unicode...
Same as #41 but for `insert/delete/etc.` functions
The problem appeared in pull request by @yigitozkavci (#43). The fact that `Map` from `primitive-containers` doesn't have `NFData` instance doesn't allow to benchmark this data type...