hsc2hs and HsFFI.h

Malcolm Wallace Malcolm.Wallace at cs.york.ac.uk
Wed Feb 11 06:45:25 EST 2009

> Currently, hsc2hs (as shipped with GHC) cannot be used with just
>     hsc2hs Foo.hsc
> as it cannot find HsFFI.h

The hsc2hs repo includes a shell script (yes, I know, no good on Windows)
called hsc2hs.wrapper that already adds some default arguments.
(nhc98 has a modified version of the script, adding a -I$(includedir))

> Another option would be for the user to tell hsc2hs which compiler
> they're using, e.g.
>     hsc2hs --compiler=/usr/bin/ghc Foo.hsc

On my system, hsc2hs is already installed as hsc2hs-ghc, in addition to
the plain hsc2hs, so if I want the compiler-specific tool, I can use it
directly.  (nhc98 should do the same thing, i.e. install hsc2hs-nhc98,
but I believe for historical reasons, it simply avoids installing hsc2hs
at all, to avoid conflicts with the ghc one.)


More information about the Glasgow-haskell-users mailing list