typelevel / algebra

Experimental project to lay out basic algebra type classes
https://typelevel.org/algebra/
Other
378 stars 69 forks source link

Fix bug in .asCommutativeRing, and ensure it is correct. #97

Closed non closed 9 years ago

non commented 9 years ago

This commit makes sure we run our law tests on the ring produced by Bool[Boolean].asCommutativeRing.

We might want to audit other typeclass-producing methods to ensure that we do at least some law-checking on those instances as well.

Review by @TomasMikula and @johnynek.

non commented 9 years ago

(I confirmed that this test caught the error before I changed the .asCommutativeRing implementation.)

TomasMikula commented 9 years ago

Looks good to me.