typelevel / algebra

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

Add Order.fromOrdering method #121

Closed ceedubs closed 8 years ago

ceedubs commented 8 years ago

This provides a conversion from scala.math.Ordering to algebra.Order.

I might be abusing the extraTag form of the laws function, I'm not sure. If I don't provide a label then I get a duplicate test name error.

johnynek commented 8 years ago

:+1: @non any objection?

TomasMikula commented 8 years ago

@ceedubs Not abusing, this is what extraTag was introduced for. Otherwise it results in exactly the same property names as

laws[OrderLaws, Int].check(_.order)

in the same test suite.

:+1: