RULE traverse = traverse_?
Joachim Breitner
mail at joachim-breitner.de
Tue Mar 31 10:29:26 UTC 2015
Hi,
has it been considered that the compiler might be instructed to replace
traverse by traverse_ if the result is not used?
Are the conditions where traverse can be replaced by traverse_
well-defined? Probably not in general, but maybe for individual
Traversable instances? Is this expressible in rules?
At a first glance, the rule
"traverse == traverse_"
seems to be sound where the resulting program well-typed, as if it is
well-typed in both cases, this means that the result was not used.
Of course, an explicit "traverse_" is still useful, but wouldn’t it
nevertheless be nice to have a sufficient smart compiler?
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/40b47367/attachment.sig>
More information about the Libraries
mailing list