jaspervdj / psqueues

Priority Search Queues in three different flavors for Haskell
https://hackage.haskell.org/package/psqueues
Other
64 stars 24 forks source link

Derive Generic instances #37

Closed Avi-D-coder closed 1 year ago

treeowl commented 1 year ago

This seems very strange to me. Generic instances are for types intended to be used "concretely" (constructors exposed), not ones intended to be used through an abstract datatype API. Generic functions will happily break all the data structure invariants, and there's not really a whole lot you can do with them that's likely to be useful.

treeowl commented 1 year ago

If you wanted, you could add hand-written Data.Data.Data instances. We have those in containers and pqueue. Those are a lot more tolerant of restrictions.

Avi-D-coder commented 1 year ago

No need. I do not remember what I was using this for :)