Created
March 26, 2014 12:53
-
-
Save xeno-by/9782436 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait Universe { | |
type Tree | |
} | |
trait NscContext { | |
type Tree = universe.Tree | |
val universe: Universe | |
def macroApplication: Tree | |
} | |
class Context(val c: NscContext) extends NscContext with PalladiumContext | |
trait PalladiumContext extends NscContext with Universes { | |
self: Context => | |
import universe._ | |
val c: NscContext | |
def macroApplication: OurTree = wrap(c.macroApplication) | |
} | |
trait Universes { | |
self: PalladiumContext => | |
object universe extends Universe { | |
type NscTree = c.universe.Tree | |
type OurTree = Tree | |
class Tree(val t: NscTree) | |
def wrap(t: NscTree) = new OurTree(t) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment