[Yhc] Yhc and plugins architecture
Neil Mitchell
ndmitchell at gmail.com
Wed Sep 20 06:12:32 EDT 2006
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
More information about the Yhc
mailing list