Updates to FFI spec: hs_init() & friends

Malcolm Wallace Malcolm.Wallace at cs.york.ac.uk
Tue Sep 10 10:13:45 EDT 2002

Alastair Reid <alastair at reid-consulting-uk.ltd.uk> writes:

> > So, my proposal is to:
> > [...]
> I think only GHC implements anything like this (correct me if wrong,
> Malcolm) and they haven't used it in the way John Meacham is
> interested in.

At the moment, nhc98 provides a routine

    void haskellInit (int argc, char **argv)

which collects the command-line args intended for (1) the nhc98 runtime
system, and (2) the response to System.getArgs.  It does not strip any
arguments from the given set, on the basis that the calling C routine
may be interested in the same arguments that nhc98 is interested in.

Also, if the controlling C routine wants to alter the argument
set before Haskell sees it, that is perfectly catered for by this


P.S. The nhc98 internal names will change shortly to match those defined by
     the FFI spec.

More information about the FFI mailing list