`ApplicativeDo` needlessly uses `join` too much
foo = do
A 1
B 2
C 3
return ()
produces very different code than
foo = do
A 1
B 2
C 3
for no good reason. Currently we check to see if the last clause is a return
or something else, and then bolt a join
in if it isn't return
. But this check is too conservative. If it isn't a return
but doesn't reference any of the variables above, you can still desugar it with (<*>)
.
We found this during a twitch livestream in front of an audience of 127 people. =)
Trac metadata
Trac field | Value |
---|---|
Version | 8.4.2 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler (CodeGen) |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |