typelevel / algebra

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

Stay DRY between tested types and test names. #65

Closed TomasMikula closed 9 years ago

TomasMikula commented 9 years ago

The solution uses implicit TypeTags to obtain type names.

Resolves #57.

There is a slight change in the name of the tested property. Where the property name used to be

Rat.field.additive:commutative group.consistent subtract

it is now

[algebra.std.Rat].field.additive:commutative group.consistent subtract

since the type name obtained from TypeTag is a fully qualified name.

non commented 9 years ago

This looks really nice, thanks!

:+1: from me for sure.

johnynek commented 9 years ago

Awesome!

larsrh commented 8 years ago

@TomasMikula If you're inclined, feel free to file a pull request to discipline!

TomasMikula commented 8 years ago

@larsrh I had to roll my own version of discipline for a project to overcome some limitations/complexities of discipline. Hopefully I will get around to bringing up that discussion soon.

larsrh commented 8 years ago

Would love to hear about those.

TomasMikula commented 8 years ago

Alright, I compelled myself to write it up and publish it: https://github.com/TomasMikula/Principled#comparison-to-discipline Interested in your feedback.

Also, I have no interest in fragmenting the ecosystem, so it would be cool if discipline could adopt that approach (or address the issues in any other way).

non commented 8 years ago

@TomasMikula Thanks for doing this!

I can confirm that some of the pain points you found are things we have worked around too. Also, I think something like Cats' IsEq[A] type (for deferring/abstracting over equivalence/equality) would be really nice to have in Discipline.