Binding a value into the interpreter

He there,
I'm having trouble binding a function into the interpreter, like this:

[rcano@scrat ~]$ scalaWelcome to Scala version 2.9.1.final (Java HotSpot(TM) Client VM, Java 1.7.0). Type in expressions to have them evaluated.Type :help for more information.
scala> :power** Power User mode enabled - BEEP BOOP SPIZ **** :phase has been set to 'typer'.          ** ** scala.tools.nsc._ has been imported      **** global._ and definitions._ also imported **** Try  :help,  vals.<tab>,  power.<tab>    **
scala> power.repl.intp res0: scala.tools.nsc.interpreter.IMain = scala.tools.nsc.interpreter.ILoop$ILoopInterpreter@19875b1
scala> val exampleFunction = (i: Int) => println("hell" + "o"*i) exampleFunction: Int => Unit = <function1>
scala> res0.bindValue("f", exampleFunction)<console>:5: error: object $read$ is not a member of package $line25   var value: .anonfun$1 = _                     ^<console>:6: error: object $read$ is not a member of package $line25  def set(x: Any) = value = x.asInstanceOf[.anonfun$1]

I know there is a bind which takes a manifest, but my code must interact with a Map[String, Object] (you know, the javax.script api, I know it sucks, but it allows me to have many different scripting engines, and ideally, I'll make some kind of scripting engine using scala) so it would be nice if the interpreter could realize that the class is an anonymous one, and extract its "public type".
Any ideas?
Thanks, 
Cheers.

Copyright © 2013 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland