Closed liufengyun closed 7 years ago
Construction of trees using DSL is actually comparable to quasiquotes when there are noises (many and/or complex unquotes):
q"${Resolve.map(monad.pos, monad)}[${resTp.toTree}]($fun)"
Resolve.map(monad.pos, monad).appliedToTypes(resTp.toTree).appliedTo(fun)
The refactoring now works:
It separates user-side API from compiler-side contract. User-side APIs (scala.gestalt.api
) include a lot of helpers, extension classes, etc, they represent the promise of gestalt to programmers. Compiler-side API (scala.gestalt.core
) represents the promises that made by the compiler to gestalt.
It removes path-dependent type from Toolbox. The trick #36 is used. The user experience is improved a lot.
I also removed newValSymbol
from the API, as programmer can use ValDef
to create a dummy definition and then get the symbol from it.
One pity is that Intellij, like Scalac, seems to unable resolve extractors. It's also unhappy with abstract types inherited by api
from Toolbox
.
@valdisxp1 I merge this for now in order to make another PR. Feel free to raise problems or questions if you find any.
A huge refactoring so that programmers no longer need to deal with path-dependent types.