
20 Sep
2006
20 Sep
'06
6:12 a.m.
Hi Don,
Hmm, from here it wouldn't be too hard I think to add eval :: String -> IO a would it?
eval s = do writeFile "tmp.hs" s yhc "-c" "tmp.hs" -- run the compiler, get a .o bytecode file (?) loadFromModule "tmp.o" ..
/s/.o/.hbc/ Yeah, thats a relatively trivial thing to do. The nicer way would be to dump the .hi file and .hbc file to memory using the Yhc API - unfortunately thats not yet possible, and would probably be quite a lot of work. Thanks Neil