How to import user's modules with hs-plugins
Hello everybody. I'm using the hs-plugins function "eval" in my source code and I need to import a Haskell module at runtime. Do you know if it's possible? I've seen many examples of hs-plugins and never had a user's module import in the "eval" call. Thanks for your time ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.
jgarciavivo:
Hello everybody. I'm using the hs-plugins function "eval" in my source code and I need to import a Haskell module at runtime. Do you know if it's possible? I've seen many examples of hs-plugins and never had a user's module import in the "eval" call. Thanks for your time
If I understand you correctly, you are trying to control which modules are in scope in the eval call? Eval has type: eval :: Typeable a => String -> [Import] -> IO (Maybe a) The 2nd argument is a list of module names to bring into scope during the eval. So you can call it as: do ma <- eval "some string" ["Data.List"] Cheers, Don
participants (2)
-
dons@cse.unsw.edu.au -
Javier García-Vivó Albors