RULE traverse = traverse_?
Joachim Breitner
mail at joachim-breitner.de
Tue Mar 31 10:43:06 UTC 2015
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 at joachim-breitner.de • http://www.joachim-breitner.de/
Jabber: nomeata at joachim-breitner.de • GPG-Key: 0xF0FBF51F
Debian Developer: nomeata at debian.org
-------------- 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: <http://mail.haskell.org/pipermail/libraries/attachments/20150331/eb74c61b/attachment-0001.sig>
More information about the Libraries
mailing list