
23 Apr
2008
23 Apr
'08
10:41 a.m.
Hello, 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: data RunResult = RunOk [Name] -- names bound by the expression | RunFailed | 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". Kind regards, Chris.