How to access defines and enums in a convenient way?
Martin Norbäck
d95mback at dtek.chalmers.se
Fri Jun 6 09:24:19 EDT 2003
fre 2003-06-06 klockan 14.55 skrev Malcolm Wallace:
> Martin Norbäck <d95mback at dtek.chalmers.se> writes:
>
> > hsc2hs solved my problem! It would be even greater if ghc --make could
> > accept .hsc as source and not generate a .hs file at all, like it does
> > with .lhs.
>
> Just a quick reminder that although 'ghc --make' does not know about
> preprocessors, 'hmake' does, and should be able to handle .hsc files
> automatically exactly as you wish.
Weel as I said, I got ghc --make to work by giving it a pair of extra
arguments, which I suppose I would have to do with hmake as well.
My main arguments for using ghc --make instead of hmake is that I can
avoid the startup time for ghc (hmake calls it once per source file),
and that it does more fine-grained dependency, so that if the interface
of a module is unchanged, modules that depend on it need not be
recompiled. Maybe the last one is fixed now.
And the solution I gave (-pgmF) also works for ghci (it probably invokes
the same functions as --make does).
But since hsc2hs is (somewhat) integrated into ghc, I see no reason
(apart from the fact that someone has to implement it of course) why
--make shouldn't be able to handle .hsc files automatically without
extra arguments.
Regards,
Martin
--
Martin Norbäck d95mback at dtek.chalmers.se
Kapplandsgatan 40 +46 (0)708 26 33 60
S-414 78 GÖTEBORG http://www.dtek.chalmers.se/~d95mback/
SWEDEN OpenPGP ID: 3FA8580B
More information about the FFI
mailing list