Closed effectfully closed 9 months ago
You are correct in that none of those bang patterns are critically important, but I very much doubt that removing them would result in the same code being generated across many different versions of GHC, and I would expect that in most cases, the bangs do result in slightly better code being generated.
But yes, the emphasis is on slight here.
Here are the definitions:
There is no need to force
n
in both the functions, because it gets forced inn > hi
. There is no need to forceas
inforM'
, because it's already always in WHNF.