Here are some links that give a little background:

Unfortunately I can't explain it better myself.

I'm in the same situation as Axel: utterly perplexed that you would have acceptable performance in ghci but not a compiled program.


2010/11/25 Herng Yi Cheng <>
It's a lot less jerky, but still unacceptably so. What is "-fno-state-hack"? I find nothing when I google it.

Herng Yi

Date: Thu, 25 Nov 2010 15:22:35 +0000

Subject: Re: [Gtk2hs-users] Gtk2hs, HOpenGL and Progress Bars


On Thu, Nov 25, 2010 at 12:05 PM, Axel Simon <> wrote:
Hi Herng Yi,

On 25.11.2010, at 12:34, Herng Yi Cheng wrote:

The HOpenGL problem wasn't solved, though - I tried compiling with -threaded, -threaded -O, -threaded -O2 and even used +RTS -N2 -RTS for runtime options, but the polyhedron rotation is still jerky and mostly unresponsive.

That is really odd since you say that it is fluent in ghci. The only difference between the two should be removed by the -threaded flag.

Does it work if you compile your program with "-fno-state-hack"?