What does unsafePerformIO do to the stack

2008-01-31 Thread Bernd Brassel
Consider the following program: module Stack where import System.IO.Unsafe main = print (sim (replicate 1299959 ())) sim [] = True sim (_:xs) = goodStack (sim xs) goodStack x = fromJust (Just x) --no stack overflow badStack x = unsafePerformIO (return x) --stack overflow

Re: Using

2008-01-31 Thread Mads Lindstrøm
Mads Lindstrøm mads_lindstroem at yahoo.dk writes: So is it only possible to load home-grown/non-standard modules when also doing a regular import? Here I really mean: So is it only possible to load home-grown/non-standard modules _without_ also doing a regular import? I could also pose

Is GHC 6.8.2 on solaris 32 bits or 64 bits

2008-01-31 Thread hsing-chou chen
Thank you for porting GHC 6.8.2 to solaris, I am assigned a job to make sure GHC run 64 bits on solaris. Is your solaris port 64 bits. Or it only 32 BITS. I know 32 bits GHC can still run on 64 bits solaris. However company want to run really 64 bits GHC on solaris. Thanks a lot if you can

Re: Is GHC 6.8.2 on solaris 32 bits or 64 bits

2008-01-31 Thread Christian Maeder
hsing-chou chen wrote: Thank you for porting GHC 6.8.2 to solaris, I am assigned a job to make sure GHC run 64 bits on solaris. Good, I was waiting for (someone like) you! I'm interested in a true 64 bits GHC on solaris, too, but I have no idea how to build one. I hope Ian or Simon can help

Re: Using GHC as a library with own functions makes runStmt return RunBreak

2008-01-31 Thread Mads Lindstrøm
Mads Lindstrøm mads_lindstroem at yahoo.dk writes: Hi I am trying to use GHC as a library. From runStmt, I want to load and run functions from a home-grown module. Lets call my home-grown module HomeGrown.hs. I have tried to model my application after

Deforesting edtiInt

2008-01-31 Thread Robin Houston
Recently I wrote a short program that builds an array containing the number of divisors of the first 10^7 natural numbers. (Some of you can guess why I did this, but I won't say explicitly lest this post become a Googleable spoiler.) Here's the relevant part of the code. incElem a i =