
I'm not quite sure what you are trying to do. But for what it's
worth, you can load a specific file via
setTarget [Target (TargetFile "foo/blah.hs") True Nothing]
see http://code.haskell.org/~nominolo/html/ghc/GHC.html#v%3AsetTargets
Here're GHC's current haddocks (for HEAD):
http://code.haskell.org/~nominolo/html/ghc/frames.html
2008/10/27 Anatoly Yakovenko
Hi, Anatoly
Sorry for don't answering your question in the first place, but for this kind of tasks I believe you might be better off using some lightweight wrapper of the GHC Api.
thanks, that's really cool, but I am trying to figure out a way to embed haskell into another program so i can control and configure it using haskell. I managed to get farther by using the GHC api's that manipulate the ModuleInfo structure, but I am kind of stuck right now trying to figure out how to allow different scripts import each other.
The problem is that i dont wan't to have to structure the input scripts as I would a regular haskell project. I basically want to be able to do
import "foo/blah.hs"
and read the blah.hs file directly. Any ideas? _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe