Confusion about GHC and GMP

I wonder if someone might be able to clear a few things up for me about implementing Integer with GMP. First, is the link below the most up-to-date information regarding GHC's situation? http://hackage.haskell.org/trac/ghc/wiki/ReplacingGMPNotes#BinaryDropinRepla... I assume that "INTEGER_LIBRARY=integer-foo" is an option when compiling GHC itself and not when using GHC, correct? If so, what version of GHC was this added? 6.10, 6.12, HEAD? Lastly, I'm confused about GHC's posted license, should it actually be LGPL so long as it statically links GMP? Aren't there a number of companies releasing binaries that were compiled with GHC? Thanks, Greg

On Fri, Feb 12, 2010 at 01:17:13PM -0800, Greg Fitzgerald wrote:
I wonder if someone might be able to clear a few things up for me about implementing Integer with GMP. First, is the link below the most up-to-date information regarding GHC's situation?
http://hackage.haskell.org/trac/ghc/wiki/ReplacingGMPNotes#BinaryDropinRepla...
I assume you mean http://hackage.haskell.org/trac/ghc/wiki/ReplacingGMPNotes#CurrentStatus in which case, yes.
I assume that "INTEGER_LIBRARY=integer-foo" is an option when compiling GHC itself and not when using GHC, correct?
Yes.
If so, what version of GHC was this added? 6.10, 6.12, HEAD?
6.12.
Lastly, I'm confused about GHC's posted license, should it actually be LGPL so long as it statically links GMP?
IANAL, but on most platforms GMP is dynamically linked, and see also http://haskell.forkio.com/gmpwindows Thanks Ian

I assume you mean http://hackage.haskell.org/trac/ghc/wiki/ReplacingGMPNotes#CurrentStatus in which case, yes.
I assume that "INTEGER_LIBRARY=integer-foo" is an option when compiling GHC itself and not when using GHC, correct?
Yes.
Great, thanks for your help Ian. Building GHC with "INTEGER_LIBRARY=integer-simple" is exactly what I was looking for. So naturally though, I'd like to avoid maintaining an internal branch of GHC. Are there any plans to make integer-simple the default integer library? I was able to build GHC on Linux with no trouble. But on Windows, I go down because (I think) the preprocessor is choking on ^M characters. I get errors like this: libraries\haskeline\.\System\Console\Haskeline\Backend\Win32.hsc:153: error: syntax error before ')' token libraries\haskeline\.\System\Console\Haskeline\Backend\Win32.hsc: In function `main': libraries\haskeline\.\System\Console\Haskeline\Backend\Win32.hsc:155: error: syntax error before ';' token compiling libraries/haskeline/dist-install/build/System/Console/Haskeline/Backend/Win32_hsc_make.c After removing those ^M's from Win32.hsc and Win32_hsc_make.c, things are moving along, slowly but surely. The build is using the "inplace" gcc so I assume the problem is not gcc, but whatever generates those files. Any idea how the extra line feeds slip in? Thanks, Greg

On Wed, Feb 17, 2010 at 04:04:16PM -0800, Greg Fitzgerald wrote:
I was able to build GHC on Linux with no trouble. But on Windows, I go down because (I think) the preprocessor is choking on ^M characters.
I get errors like this: libraries\haskeline\.\System\Console\Haskeline\Backend\Win32.hsc:153: error: syntax error before ')' token libraries\haskeline\.\System\Console\Haskeline\Backend\Win32.hsc: In function `main': libraries\haskeline\.\System\Console\Haskeline\Backend\Win32.hsc:155: error: syntax error before ';' token compiling libraries/haskeline/dist-install/build/System/Console/Haskeline/Backend/Win32_hsc_make.c
After removing those ^M's from Win32.hsc and Win32_hsc_make.c, things are moving along, slowly but surely. The build is using the "inplace" gcc so I assume the problem is not gcc, but whatever generates those files. Any idea how the extra line feeds slip in?
That's not ringing any bells with me. We'd need more details to work out what's going on, e.g. the commandline, what version of GHC you are bootstrapping with, what versino you're compiling, whether you are using msys or cygwin, etc. It may also help to see what the generated Win32_hsc_make.c looks like. Thanks Ian
participants (2)
-
Greg Fitzgerald
-
Ian Lynagh