typelevel / algebra

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

Fix band specialization #96

Closed johnynek closed 8 years ago

johnynek commented 8 years ago

fixes #90

Question: should Band and Semilattice use just Int, Long? Looks like most or all of algebra.lattice does this (even though you could make a lattice of Doubles/Floats with max/min).

johnynek commented 8 years ago

in my opinion, keeping Float/Double makes as much sense as almost any algebraic structure (except maybe we could say that Ring/Field would be by far the most common, so maybe only they should be specialized on Double, Float?).

non commented 8 years ago

I guess I am loathe to remove Float / Double specialization unless we are sure they won't (or can't) be used. Do you think it would be OK to leave these annotations on our type classes? Given that Spire currently does specialize these, I feel like continuing to do that is a conservative approach that is consistent with enforcing MiMA.

johnynek commented 8 years ago

Yeah, I'm totally fine with leaving Float/Double, but I just noticed that our algebra.lattice packages don't have it, and I'm not sure why.

non commented 8 years ago

That was probably just an oversight on my part. Let's add them.

johnynek commented 8 years ago

@non can we do that in a separate fix? I like to keep them focused. If so, are there any other things we can add here?

non commented 8 years ago

Sure thing. This looks good to me. :+1: