Skip to content

Implement quote auto-lifting under an import #5986

Closed
@nicolasstucki

Description

@nicolasstucki

The idea is to have an implicit conversion that converts a T to an Expr[T] using the toExpr conversion. This would allow us to write

def plus(n: Int, m: Expr[Int]): Expr[Int] = 
  if (n == 0) m else '{ $n + $m }

instead of

def plus(n: Int, m: Expr[Int]): Expr[Int] = 
  if (n == 0) m else '{ ${n.toExpr} + $m }

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions