Skip to content

-O results in incorrect behavior

HUnit 1.2.2.1 ships with a set of unit tests. Incorrect behavior occurs when these tests are compiled into a program using Cabal and GHC 6.12.1 (Haskell Platform 2010.1).

Correct behavior occurs when these tests are:

  • compiled using ghc --make using GHC 6.12.1.
  • run using GHCi 6.12.1.
  • compiled into a program using Cabal and GHC 6.10.4 (Haskell Platform 2009.2).
  • compiled using ghc --make using GHC 6.10.4.
  • run using GHCi 6.10.4.

This behavior appears to involve interactions between the Testable and Assertable classes and instances in Test/HUnit/Base.hs. This affects the correctness of the programs.

Trac metadata
Trac field Value
Version 6.12.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
Edited by Ian Lynagh -
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information