Re: hsc2hs and HsFFI.h

2009-02-18 Thread Duncan Coutts
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

Re: hsc2hs and HsFFI.h

2009-02-18 Thread John Meacham
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⑈

Re: hsc2hs and HsFFI.h

2009-02-11 Thread Malcolm Wallace
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

hsc2hs and HsFFI.h

2009-02-10 Thread Ian Lynagh
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

Re: hsc2hs and HsFFI.h

2009-02-10 Thread Sigbjorn Finne
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

Re: hsc2hs and HsFFI.h

2009-02-10 Thread Claus Reinke
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 ::