Re: GHCI/FFI/GMP/Me madness

2004-08-08 Thread Sigbjorn Finne
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 pointing into the heap. Which is fine, until a GC occurs and the

Re: Double - CDouble, realToFrac doesn't work

2004-08-08 Thread Sven Panne
Hal Daume III wrote: [...] Prelude Foreign.C (0 :: CDouble) / 0 NaN Prelude Foreign.C (0 :: Double) / 0 NaN Prelude Foreign.C realToFrac ((0 :: Double) / 0) :: CDouble -Infinity yikes! the NaN got turned into a -Infinity!!! aside from manually checking for 'strange' Double/CDouble values and

Re: [Haskell] Eliminating Array Bound Checking through Non-dependent types

2004-08-08 Thread oleg
Hello! Bjorn Lisper wrote: What is the relation to the sized types by Lars Pareto and John Hughes? It is orthogonal and complementary, as the message in response to Conor T. McBride indicated. What is the relation to classical range analyses for (e.g.) array index expressions, which have