runstmt within API
cmb21 at kent.ac.uk
Wed Apr 23 06:41:13 EDT 2008
I want to use the ghc evaluator on the fly for some refactorings within
HaRe. However, I notice that runstmt ::Session -> String -> IO RunResult.
Is there anyway I can grab the result of the evaluated expression as a
String (rather than it being outputted to the terminal)?
It seems RunResult is defined:
= RunOk [Name] -- names bound by the expression
| RunException GHC.IOBase.Exception
If I can't grab its result, is there a way to query the [Name] to get a
list of bindings in String format? Preferably something like
"it = expression".
More information about the Glasgow-haskell-users