Closed
Description
Currently there is no way to obtain the runtime value corresponding to a singleton type. SIP-23 - Literal-based singleton types mentions a ValueOf
(or SingleInhabitant
) type class that is currently missing from Dotty.
For reference, a ValueOf
type class was implemented in Typelevel Scala in this commit:
typelevel/scala@d777d40