
There is another option too, which I find quite attractive. To the interface that Simon mentioned:
| loadLibrary :: FilePath -> IO () | lookupEntity :: String -> IO a
add one more call:
addEntity :: String -> a -> IO ()
The effect is to extend GHCi's dynamic linker's symbol table with an extra binding. So that 'lookupEntity' of the same string would return the value you stuffed in with addEntity.
True, but that doesn't address the problem of having to load another copy of the base package. And I don't think you want to take this approach for the base package: there will be a huge number of strange-looking symbols that need to be added due to cross-module inlining. On the other hand, this is a pretty short path to getting something working. Cheers, Simon
participants (1)
-
Simon Marlow