"Manuel M. T. Chakravarty" wrote:
> 
> Malcolm Wallace <[EMAIL PROTECTED]> wrote,
> 
> > Can I propose a change to the -i / -I flags?  Currently, the -idir (or
> > -Idir) options add a directory to the search path for imports.  This
> > directory is either relative to the current dir, or absolute.  My
> > suggestion is that it could also be used for "relative to a standard
> > installation directory".  For instance, -Idata/edison would look first
> > in ./data/edison if it exists, then in $prefix/data/edison, where
> > $prefix has the value /usr/local/lib/ghc, or whatever.
I don't think this scheme would solve my problem at all.  As has been pointed
out before, I can already get the GHC include files appended by calling "ghc"
and not "gcc".  It's a good suggestion and one I shall probably follow.  BUT
it is not ideal because (a) ghc seems to munge up its arguments rather a lot -
for example, it rearranges libraries which is a problem for Solaris when you
are using the system linker; (b) if you had a huge C program to which you
wanted to link a little Haskell, it would be silly to compile all the code
in the C program with ghc, and it would also be silly to compile some C code
with gcc and some with gcc.  I'm not sure what would be best; perhaps
what I want is ghc options which won't do any compiling, but just tell me
where the include files and libraries are.   So then I can type
GHC_INCLUDES = `$(GHC) -display-includes`
or something like that . . .

Reply via email to