Skip to content

Instantly share code, notes, and snippets.

@andyscott
Last active January 15, 2016 00:55
Show Gist options
  • Save andyscott/d588f15b529d1c0e9c81 to your computer and use it in GitHub Desktop.
Save andyscott/d588f15b529d1c0e9c81 to your computer and use it in GitHub Desktop.
type F[U <: Universe] = (ToolBox[U], MyUtility[U]) ⇒ Unit
def example(f: F[_]) = {
val toolbox = scala.reflect.runtime.currentMirror.mkToolBox()
val util = MyUtility[toolbox.u.type](toolbox.u)
f(toolbox, util)
}
// usage, doesn't compile
example { (tb, util) ⇒
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment