epfldata / squid

Squid – type-safe metaprogramming and compilation framework for Scala
http://epfldata.github.io/squid/
Apache License 2.0
197 stars 14 forks source link

Properly Implement the Simplified Syntax #18

Closed LPTK closed 6 years ago

LPTK commented 7 years ago

Have a proper (robust and easy to use) implementation of the simplified syntax as presented in the SPLASH'17 papers. (Currently, one has to use the SimplePredef hacky interface and there is no direct HOPV syntax.)

LPTK commented 6 years ago

There used to be a "simple" alternative to the "contextual" quasiquote system, but this turned out to complicate everything and require duplicating internal implementations, without actually bringing anything really useful to the table.

The new way of doing things if one doesn't care about contexts is to use OpenCode (which can be renamed on import; see this test case), and to use explicit unsafe_asClosedCode casts before calling operations like run and compile, which require an empty context, or on the RHS of a rewriting if the context doesn't match.