Scala, Programming, Functional Programming, Type Safety.
are using Scala < 2.13 you will need to use shapeless’ witness (already provided by the refined library as the handy import eu.timepit.refined.W alias) in order to smuggle your literals to the type level: This issue has been initially addressed in SIP-23 “Literal-based singleton types” Here’s the