This dies. Moreover, if I run without the RTS options and/or let it run for a while, it completely kills my computer and I have to restart it.
I initially thought it may be a thing with output flushing but:
- I added a stdout flush after each individual element of the "list", and it changes nothing.
- I even tried changing what main does so that it stops after the first result. This works when interpreted (takes less than a second), but still the program produces nothing and kills my CPU when compiled.
Maybe relevant is that loading my program into GHCi takes about 30 seconds.
But that seems to be about complicated flags and their implications. As you can see, my flags are fairly simple.
Anyone has any idea what this could be about, or how to avoid it? My purpose is to profile the program to see where most of the time is being spent, but I cannot do that without compiling it, and if the compiled code is running much slower than the interpreted
code, then it seems absurd to even try to profile this (it must not be doing the same that the interpreted code is doing?).
Thanks in advance,
Juan.