Alastair Reid <[EMAIL PROTECTED]> writes:

> Shouldn't we encourage people to use the compiler-independent
> mechanism instead (and exclusively)?

Yes, you are right.  I'm all in favour of standard mechanisms.

> That is, you put all your flags, includes, prototypes, etc. into a 
> header file, ... and then mention foo.h in all relevant foreign imports:
> 
>     foreign import "foo.h" x :: ...

Yup, this approach is the most platform-independent we managed to
come up with.  Now I just need to catch up with ghc and Hugs by
implementing it in nhc98...

> They still have to use compiler-specific mechanisms to specify
> #include search paths, linker options, etc.

Indeed, but these things are not only compiler-specific, they are
also often OS-specific, so it is right that they should not be in
the program source.

Regards,
    Malcolm
_______________________________________________
FFI mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/ffi

Reply via email to