Frank Thomas

Results 290 comments of Frank Thomas

If this requires a new module, we should think about having it in a separate repo. We have right now 11 (and soon 12) separate modules and each module slows...

@FunFunFine Could you add tests for these instances to https://github.com/fthomas/refined/blob/master/modules/cats/shared/src/test/scala/eu/timepit/refined/cats/CommutativeSemigroupAndMonoidLawTests.scala ?

> In fact, it doesn't work on literal singleton types either, just inline literals :/ @kubukoz Could you provide an example? The example below works as expected and is not...

@bwiercinski `refineV` works if the value you pass in is of type `Status`: ```scala scala> refineV[ValidStatus](Status.A: Status) res5: Either[String,eu.timepit.refined.api.Refined[Status,ValidStatus]] = Right(A) scala> refineV[ValidStatus](Status.C: Status) res6: Either[String,eu.timepit.refined.api.Refined[Status,ValidStatus]] = Left(Predicate failed: oneOf((C...

Yes, but `refineMV` requires the *value* at compile-time to decide if it satisfies the predicate. And it is not safe to evaluate `Status.A` at compile-time since this would execute its...

> However, for literal singleton types we could use the name of the type as the value. You're right. But I wouldn't recommend changing `RefineMacro` for this since it is...

Interesting. :-) I guess it does not depend on the supplied type parameter to `CrashOnTypeTag`? Do you have a specific use case in mind for a `Validate` instance that takes...

That is strange. #266 shows that `CrashOnTypeTag[String]` also crashes with Scala 2.12. I also tested with 2.11 locally and got the same result.

Thanks for the report, @bbarker. It is strange that this does not happen in refined's own source which is compiled for and tested with Scala.js. Which sbt command produces these...

I tried reproducing this in https://github.com/fthomas/refined-sjs-example/commit/caa24a68dff36098092c5a043983667110cb0786 but this builds just fine. It would be nice to reproduce these errors in [refined-sjs-example](https://github.com/fthomas/refined-sjs-example).