Skip to content

ValueOf typeclass to inhabit singleton types #2616

Closed
@OlivierBlanvillain

Description

@OlivierBlanvillain

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions