typelevel / spire

Powerful new number types and numeric abstractions for Scala.
http://typelevel.org/spire/
MIT License
1.76k stars 243 forks source link

Expose XIsNumeric Traits #647

Open eaplatanios opened 7 years ago

eaplatanios commented 7 years ago

Hi,

Would it be possible to expose the XIsNumeric traits to the public API? Or otherwise the ConvertibleFromX and ConvertibleToX traits? I am currently trying to write some type classes that extend Numeric[X] but I cannot use your implementations for the various types.

Thank you, Anthony

denisrosset commented 7 years ago

What are you trying to achieve? What are your types, and what is the typeclass that extends Numeric[X]?

I often see Spire users extend blanket types such as Numeric or IsReal, ..., where a more restricted (and sounder) typeclass would do.

I would advise against depending on ConvertibleXXX or the XXXIsNumeric stuff because we'd like to put a sounder alternative into place (but when? is the question).

denisrosset commented 7 years ago

... if you don't mind, join us on Gitter https://gitter.im/non/spire to discuss this further.

eaplatanios commented 7 years ago

@denisrosset Thanks for the advice! I posted some more details on Gitter, as per your advice. :)