
Hi, Am Dienstag, den 31.03.2015, 12:33 +0200 schrieb Henning Thielemann:
If it works it will still surprise programmers if the magic does not happen for a custom function similar to 'traverse'. E.g. I had a data structure with two type parameters and thus two traverse function parameters. I think it is better to tell programmers about the general problem instead of fixing a selection of instances. True.
But that is a problem with every compiler optimization. If you have a recursive function taking some Int, the compiler might be able to determine that you use it strictly and unbox it, and great things happen. It will not always figure this out, and if it does not, you have to help it (e.g. using strictness annotations). Greetings, Joachim -- Joachim “nomeata” Breitner mail@joachim-breitner.de • http://www.joachim-breitner.de/ Jabber: nomeata@joachim-breitner.de • GPG-Key: 0xF0FBF51F Debian Developer: nomeata@debian.org