Folks,
I thought you might find the following bug I've just
found in GHC entertaining.
In the strictness analyser we need to compare abstract values
so that the fixpoint finder knows when to stop. In the
middle of this code was the following:
sameVal :: AbsVal -> AbsVal -> Bool
...equations for sameVal...
sameVal (AbsApproxFun str1 v1) (AbsApproxFun str2 v2)
= str1 == str2 && sameVal v1 v1
...more equations...
That "sameVal v1 v1" should of course be "sameVal v1 v2".
Because sameVal reports equality more often that it should,
the fixpoint finder stops sooner than it should, so the strictness
analyser finds that things are strict when they aren't. But
this only occurs in slightly obscure situations... and somehow
this bug has gone un-noticed for I dread to think how long!
It showed up in a nofib test -- sing ho for regression tests.
Happy xmas
Simon