Let's get this finished

Simon Marlow simonmar at microsoft.com
Wed Jan 10 05:50:25 EST 2001

> "Manuel M. T. Chakravarty" wrote:
> > If hslibs is meant to be used with systems other than ghc,
> > too - which I think was the idea - there is no choice but to
> > rewrite it into H98.  But I guess this is essentially up to
> > Mr. HsLibs aka SimonM.
> Well, doing some simple local transformations to get H98 compliance
> should be possible without consulting Mr. HsLibs in advance.  :-)

[ blimey.  I go away for a couple of days and you guys are going
bananas.  Slow down! ]

I should say that I've recently been working on moving most of the FFI
code into ghc/lib/std, removing GHC's use of deprecated features (eg.
using Ptr instead of Addr), and converting some of GHC's standard
libraries to use the new FFI.  Directory has been converted so far.

I think there's no alternative to having two copies of much of the code
- a H98 version in hslibs/lang and GHC-specific code partly in
ghc/lib/std and partly in hslibs/lang, with appropriate #ifdefs.  We'll
need to set up a way to test the H98 code using GHC too.

I don't see any problem with using hsc2hs for the H98 versions, since
hsc2hs is mostly compiler-independent.  (but I notice you've used
autoconf instead of hsc2hs for the errno code.  I haven't looked at it


More information about the FFI mailing list