Closed rrnewton closed 9 years ago
It seems to me this was a testing bug; the code had:
writeArray arr 4 33
putStrLn "Wrote array elements..."
tick <- readArrayElem arr 4 -- TICKET FROM IX 4
putStrLn$ "(Peeking at array gave: "++show (peekTicket tick)++")"
(res1,tick2) <- casArrayElem arr 3 tick 44 -- BEING USED ON IX 3
(res2,_) <- casArrayElem arr 3 tick 44
When I change the last two lines above to 4
as well the test passes. AFAICT the behavior of the original was undefined and shouldn't be expected to work. If that sounds right I'll close the ticket when I commit.
Yes, indeed, that looks like a simple bug in the test! Thanks for catching it.
As mentioned in #40, this was one of the two tests that failed under GHC 7.10. It needs to be investigated.