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
_______________________________________________
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell

Reply via email to