These are chat archives for fthomas/refined

20th
Feb 2016
Frank S. Thomas
@fthomas
Feb 20 2016 07:32
Awesome, @jedesah! I hope you don't mind if I add Quasar the list of projects using refined (https://github.com/fthomas/refined#projects-using-refined).
I'll take a look at that PR in more detail later. The problem here are the filter calls in the private functions in eu.timepit.refined.scalacheck.numeric, right?
Frank S. Thomas
@fthomas
Feb 20 2016 09:37
@jedesah I'm pondering if we should add a type class for retrieving the nex higher/lower numeric value for a given value that uses +-1 for integral types and java.lang.Math.next{Up,Down} for floating-point types. This way we could get rid of the filter calls for all numeric types
Jean-Rémi Desjardins
@jedesah
Feb 20 2016 17:22
@fthomas I do not mind at all! That sounds like a pretty good way to solve the problem. I was not aware of java.lang.Math.next{Up,Down}. Will have a look at what that is.
Jean-Rémi Desjardins
@jedesah
Feb 20 2016 17:47
That typeclass seems like it could do the trick. Let me know if you would like me to submit a PR with that change.
Frank S. Thomas
@fthomas
Feb 20 2016 18:44
@jedesah Go for it! :-) I guess we could derive default instances from any Numeric instance and then provide separate instances for Double/Float using next{Up,Down}