[Haskell-cafe] using ghc as a library

Anatoly Yakovenko aeyakovenko at gmail.com
Tue Oct 28 02:01:51 EDT 2008

On Mon, Oct 27, 2008 at 3:23 PM, Thomas Schilling
<nominolo at googlemail.com> wrote:
> 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
> directories.

Well my immediate goal was to see if i can make a generic build system
ala ruby's rake or rant in haskell.  But the overall goal was to
understand how the compiler works and what i can do with it.  I hate
gui's so i prefer having a interface to my programs that's as
expressive as the language that they are written in, and being
typesafe is always nice :).

I think you suggestion on using the preprocessor is an excellent idea,
and should at least get me there.  Can you point me to some
documentation on what gcc expects from the preprocessor?  Does it
basically expect something that has the same interface as cpp?

More information about the Haskell-Cafe mailing list