ekmett / ersatz

A monad for interfacing with external SAT solvers
Other
62 stars 15 forks source link

Generalize type of some props to non-homogenous relations #34

Closed mheinzel closed 6 years ago

mheinzel commented 6 years ago

These properties were unnecessarily constrained to homogenous relations. Did I miss any reasons for that?

jwaldmann commented 6 years ago

No reasons. I guess my original use case was homogenous.

mheinzel commented 6 years ago

I solved a variant of the fish puzzle using Ersatz.Relations and really enjoyed working with it. Nice work! Would you be interested in adding my solution as an example of the Relations API?

Before making a PR, I could change the problem to match the existing examples/Fish.hs and replace the >>> operator with infix product to avoid confusion. (unfortunately, the Ix constraint prevents a Category Relation instance...)