Iltotore / iron

Strong type constraints for Scala
https://iltotore.github.io/iron/docs/
Apache License 2.0
430 stars 38 forks source link

Add unapply method to RefinedTypeOps #165

Closed Iltotore closed 10 months ago

Iltotore commented 10 months ago

Add an unapply method to RefinedTypeOps to allow pattern matching on new types:

opaque type Temperature = Int :| Positive
object Temperature extends RefinedTypeOps[Temperature]
val temperature: Temperature = ???
temperature match
  case Temperature(value) =>