In Haskell, I can write read "(1,2)" and get back the tuple (1,2). Is there any way to do this in Scala? I guess what I’m looking for is access to the parser in the scala interpreter.
In Haskell, I can write read (1,2) and get back the tuple (1,2) .
Share
I’ve you tried to poke around in scala.tools.nsc ?
Is something like that enough for you needs (or, at least, a good start point) ?
[Edit: it seems that tools.nsc.Interpreter is deprecated. There is now a tools.nsc.interpreter package]