[Haskell-cafe] using ghc as a library
nominolo at googlemail.com
Mon Oct 27 06:27:53 EDT 2008
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]
Here're GHC's current haddocks (for HEAD):
2008/10/27 Anatoly Yakovenko <aeyakovenko at gmail.com>:
>> 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 at haskell.org
More information about the Haskell-Cafe