Re: [Haskell-cafe] ghc -O2 and HUnit weirdness

2011-01-06 Thread Roman Cheplyaka
* Roman Cheplyaka [2011-01-07 01:42:24+0200] > * Jürgen Doser [2011-01-07 00:18:09+0100] > > El jue, 06-01-2011 a las 16:41 -0400, Joey Hess escribió: > > > So, the problem seems to be that ghc -O2 somehow optimises the static > > > assertBool _ True away, in what seems to be a bad way. Remove th

Re: [Haskell-cafe] ghc -O2 and HUnit weirdness

2011-01-06 Thread Roman Cheplyaka
* Jürgen Doser [2011-01-07 00:18:09+0100] > El jue, 06-01-2011 a las 16:41 -0400, Joey Hess escribió: > > So, the problem seems to be that ghc -O2 somehow optimises the static > > assertBool _ True away, in what seems to be a bad way. Remove the -O2 and > > the test fails as expected. Presumably,

Re: [Haskell-cafe] ghc -O2 and HUnit weirdness

2011-01-06 Thread Daniel Fischer
On Friday 07 January 2011 00:18:09, Jürgen Doser wrote: > > I don't have a newer GHC version installed, though, so I can't test if > it works in a newer GHC. > Same with 6.12.3, works with 7.0.1 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org ht

Re: [Haskell-cafe] ghc -O2 and HUnit weirdness

2011-01-06 Thread Jürgen Doser
El jue, 06-01-2011 a las 16:41 -0400, Joey Hess escribió: > So, the problem seems to be that ghc -O2 somehow optimises the static > assertBool _ True away, in what seems to be a bad way. Remove the -O2 and > the test fails as expected. Presumably, although I have not verified, > less static boolean

[Haskell-cafe] ghc -O2 and HUnit weirdness

2011-01-06 Thread Joey Hess
Suppose I'm playing with HUnit for nearly the first time. I might write a test program like this, to see what a test failure looks like in practice: import Test.HUnit import Test.HUnit.Tools main = runVerboseTests $ TestList [ TestCase $ assertBool "should fail" False , TestCase