abeln / dotty

Scala with explicit nulls
https://github.com/abeln/dotty/wiki/scala-with-explicit-nulls
Other
23 stars 2 forks source link

Liftable instances for Nullable types #18

Open abeln opened 5 years ago

abeln commented 5 years ago

Liftable.scala has a bunch of liftable instances for primitive types, including String (not shown below):

object Liftable {

  implicit def BooleanIsLiftable: Liftable[Boolean] = new Liftable[Boolean] {
    def toExpr(x: Boolean): Expr[Boolean] = liftedExpr(x)
  }

  implicit def ByteIsLiftable: Liftable[Byte] = new Liftable[Byte] {
    def toExpr(x: Byte): Expr[Byte] = liftedExpr(x)
  }
...

Do we need to provide an instance for nullable strings?

Reference: https://biboudis.github.io/papers/pcp-gpce18.pdf