`foo !f = id . f` becomes non-strict with -O2
The following program:
foo :: (a -> b) -> a -> b foo !f = id . f main :: IO () main = print (foo undefined `seq` "ok")
Prelude.undefined when compiled without
-O2, but prints
"ok" with it. As far as I can tell the optimizer shouldn't be allowed to do that.