Option to annotate values with their singleton types
kubukoz opened this issue · comments
Jakub Kozłowski commented
Given that values in BuildInfo
are constants, we should be able to expose their types as singleton types. That might allow some advanced type-level trickery for manipulating these values.
For example:
object BuildInfo {
val name: "app" = "app"
}
Of course this only makes sense on Scala versions that support literal singleton types, so this would fail compilation on 2.12 and below, but the option would be opt-in so I don't think we need any special treatment for these Scala versions.
Something like this comes to mind:
buildInfoSingletonTypes := true
eugene yokota commented
I just implemented final val
support here - #164
Would this cover your use case?
Jakub Kozłowski commented