obsidiansystems / dependent-map

Dependently-typed finite maps (partial dependent products)
Other
63 stars 33 forks source link

Monoid subclasses #56

Open endgame opened 3 weeks ago

endgame commented 3 weeks ago

Stacked on top of #55, so you can merge that first in case you want to ship that before a release with new features.

https://github.com/reflex-frp/patch/issues/44 is the grand plan to get patch-ish things off DecideablyEmpty and use MonoidNull from monoid-subclasses. Since this PR adds the dep anyway, I filled out all the lawful instances that I could.

Note that there's no instance for LeftGCDMonoid (DMap k f); unlike containers, dependent-map does not provide a mergeWithKey function. I can add one, if you'd like, and add the instance in this PR.