How lose can we be with strictness
Joachim Breitner
mail at joachim-breitner.de
Sat May 20 16:56:56 UTC 2017
Hi,
I just observed that GHC optimizes
fun (n::Int) = n == 0 + n
to essentially
fun (n::Int) = n `seq` True
I am wondering under what circumstances we would be happy to transform
this further to
fun _ = True
Clearly, we do not want to drop `seq`s in general. But is there some
commonly accepted rule about which strictness we generally allow the
compiler to get rid of, if it turns out that the compiler can do
without? Or are all such transformations out of bounds for GHC?
Greetings,
Joachim
--
Joachim Breitner
mail at joachim-breitner.de
http://www.joachim-breitner.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20170520/1538ffb2/attachment.sig>
More information about the ghc-devs
mailing list