[Haskell-cafe] GHC, odd concurrency space leak

Daniel Fischer daniel.is.fischer at web.de
Wed Apr 14 19:33:51 EDT 2010

Am Donnerstag 15 April 2010 00:52:22 schrieb Jason Dagit:
> The bad version, ghc --make NonTermination.hs:
> \begin{code}
> {-# OPTIONS -O2 #-}
> {-# LANGUAGE GeneralizedNewtypeDeriving #-}
> -- Note:  Change the optimization to -O1 to get a terminating version

Doesn't seem to terminate with -O1 here (killed after ~30 seconds).
However, it does terminate with -O2 and -fno-state-hack, but leaks (and 
there's no difference between forever and forever' with -O2 -fno-state-

> Can some core expert please look at these and explain the difference?

I'm interested in an explanation too.

> Thanks!
> Jason

& Daniel

More information about the Haskell-Cafe mailing list