[Haskell-cafe] using ghc as a library
nominolo at googlemail.com
Mon Oct 27 18:23:36 EDT 2008
Not at the moment. I was thinking about abstracting out the finder,
which might be useful for other things, too. Can you maybe describe
your actual goal? Adding an import "foo/bar" would not parse, so you
must have some kind of preprocessing going on, so you might be able to
insert some dummy imports there which you then have to provide. E.g.:
import "foo/bar.hs" ~~> import CafeF00d.Foo.Bar, and you then copy (or
symlink) foo/bar.hs to CafeF00d/Foo/Bar.hs. You can put those into a
special directory which you prepend to the list of searched
I still can't see a good use case for this, though.
2008/10/27 Anatoly Yakovenko <aeyakovenko at gmail.com>:
> On Mon, Oct 27, 2008 at 3:27 AM, Thomas Schilling
> <nominolo at googlemail.com> wrote:
>> 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]
> right, but I cant do that from inside a module in place of an import.
> Is there any way to for me to somehow tell ghc, or my wrapper, that I
> want to load a module from a specific directory, regardless of what
> the current include flags are?
More information about the Haskell-Cafe