RE: Double - CDouble, realToFrac doesn't work

2004-08-09 Thread Simon Peyton-Jones
| Hmmm, this is a little bit of a dark corner in the H98 report, but there are | probably other people on this list who know better than me. :-] The problem | is that 'realToFrac' is defined as 'fromRational . toRational', so the first | question is: How is 'toRational' supposed to handle NaN? One

GHCI/FFI/GMP/Me madness

2004-08-09 Thread Remi Turk
Hi all, I recently tried to create a ffi-binding to gmp in ghc, and failed miserably. After a few days of debugging, simplifying the code and tearing my hear out, I'm slightly completely stumped, and crying for help ;) In short: calling gmp-functions from GHCI *with a prompt between* them seems

RE: ghci: catching up with hugs?-)

2004-08-09 Thread Simon Marlow
On 29 July 2004 17:48, Claus Reinke wrote: - especially when working with gui libs, I often find myself wanting to know which instances some type belongs to (as that determines the attributes/properties/etc one may use with that type). Absolutely. This is on my ToDo list, but I

RE: FFI, Ghc and Libs

2004-08-09 Thread Simon Marlow
Title: Nachricht GHCi supports loading .o and .DLL files only, I'm afriad. Although I believe it might be possible to link against .LIB files when linking a standalone binary. Cheers, Simon From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dominik OesterreichSent: 02 August

Re: GHCI/FFI/GMP/Me madness

2004-08-09 Thread Remi Turk
On Sun, Aug 08, 2004 at 07:34:04AM -0700, Sigbjorn Finne wrote: Hi, please be aware that the RTS uses GMP as well, and upon initialisation it sets GMP's 'memory functions' to allocate memory from the RTS' heap. So, in the code below, the global variable 'p' will end up having components

Re: GHCI/FFI/GMP/Me madness

2004-08-09 Thread Tomasz Zielonka
On Sun, Aug 08, 2004 at 07:34:04AM -0700, Sigbjorn Finne wrote: Hi, please be aware that the RTS uses GMP as well, and upon initialisation it sets GMP's 'memory functions' to allocate memory from the RTS' heap. What about linking Haskell programs with C libraries that use GMP internally?

Re: GHCI/FFI/GMP/Me madness

2004-08-09 Thread Abraham Egnor
FWIW, I couldn't reproduce this problem on my system (i.e. str_test always printed 1). GHC 6.2.1, libgmp 4.1.3, debian unstable Abe On Mon, 9 Aug 2004 17:57:14 +0200, Remi Turk [EMAIL PROTECTED] wrote: On Sun, Aug 08, 2004 at 07:34:04AM -0700, Sigbjorn Finne wrote: Hi, please be aware

Re: GHCI/FFI/GMP/Me madness

2004-08-09 Thread Remi Turk
On Mon, Aug 09, 2004 at 01:09:40PM -0400, Abraham Egnor wrote: FWIW, I couldn't reproduce this problem on my system (i.e. str_test always printed 1). GHC 6.2.1, libgmp 4.1.3, debian unstable Abe Same versions here, on an old heavily-patched/FUBAR rock linux 1.4 system. Does the following