Improve strictness analysis for bottoming functions
authorsimonpj@microsoft.com <unknown>
Fri, 11 Dec 2009 16:23:24 +0000 (16:23 +0000)
committersimonpj@microsoft.com <unknown>
Fri, 11 Dec 2009 16:23:24 +0000 (16:23 +0000)
commita33b1cd8490faf8a3b6bdc163555c3f986048231
tree19beef8a6e2075e10393bc411bd6726dec2570b8
parentb84ba676034763b3082bbd9405794a4fde499d14
Improve strictness analysis for bottoming functions

I found the following results from strictness analyis:
  f x = error (fst x)      -- Strictness U(SA)b
  g x = error ('y':fst x)  -- Strictness Tb

Surely 'g' is no less strict on 'x' than 'f' is!  The fix turned out
be to very nice and simple.  See Note [Bottom demands] in DmdAnal.
compiler/stranal/DmdAnal.lhs