Missing "Defined but not used" for recursive expressions
a :: Int
a =
let b = "foo"++b
in 42
In this example b
is not really used, but there is no warning by GHC.
I assume this is so because b
calls itself.
If I remove ++b
then I get the warning as expected.
(This reminds on the difference between a purely reference counting garbage collector and a correct one.)
Trac metadata
Trac field | Value |
---|---|
Version | 6.8.2 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | ghc@henning-thielemann.de |
Operating system | |
Architecture |