On Tue, 2009-02-10 at 17:15 +, Ian Lynagh wrote:
Hi all,
Currently, hsc2hs (as shipped with GHC) cannot be used with just
hsc2hs Foo.hsc
as it cannot find HsFFI.h (http://hackage.haskell.org/trac/ghc/ticket/2897).
To make it work you need to run something like
hsc2hs -I
I went ahead and implemented --print-hsc-options to jhc, which will spit
out something like '-I/usr/share/jhc-0.5/include' suitable for passing
to the hsc2hs command line. It seemed like the most straightforward
route of the choices mentioned.
John
--
John Meacham - ⑆repetae.net⑆john⑈
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
Hi all,
Currently, hsc2hs (as shipped with GHC) cannot be used with just
hsc2hs Foo.hsc
as it cannot find HsFFI.h (http://hackage.haskell.org/trac/ghc/ticket/2897).
To make it work you need to run something like
hsc2hs -I /usr/lib/ghc-6.10.1/include Foo.hsc
(it also works when called by
Hi Ian,
it may encompass some of your suggested approaches below, but have
you considered either:
- add --print-hsc-options to the GHC driver, which is akin to
--print-libdir. A ghc-installed hsc2hs shell wrapper or as you
suggest have 'hsc2hs' probe the compiler it is using would then
Q: is the information that --print-libdir returns available programmatically
to Haskell code?
$ ghc --print-libdir
C:\ghc\ghc-6.11.20090118
$ ghc -e GHC.Paths.libdir
C:\\ghc\\ghc-6.11.20090118
$ ghc -e ':browse GHC.Paths'
docdir :: FilePath
ghc :: FilePath
ghc_pkg ::