#2843: Missing "Defined but not used" for recursive expressions
-----------------------------+----------------------------------------------
Reporter: guest | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 6.8.2 | Severity: normal
Keywords: | Testcase:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
-----------------------------+----------------------------------------------
{{{
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.)
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2843>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs