RULE traverse = traverse_?

Joachim Breitner mail at
Tue Mar 31 10:43:06 UTC 2015


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.

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).


Joachim “nomeata” Breitner
  mail at joachim-breitner.de
  Jabber: nomeata at  • GPG-Key: 0xF0FBF51F
  Debian Developer: nomeata at
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <>

More information about the Libraries mailing list