RULE traverse = traverse_?

Joachim Breitner mail at
Tue Mar 31 10:29:26 UTC 2015


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?


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