
19 Jul
2012
19 Jul
'12
6:56 a.m.
On Thu, 19 Jul 2012, Herbert Valerio Riedel wrote:
Recently, I was a bit suprised that GHC didn't warn about useless `where` definitions such as the following when using `-Wall` (and I couldn't find a respective warning GHC CLI flag which would have enabled reporting a warning in this case -- unless I missed it)
module Foo where
foo :: Int -> Int foo n = n + 1 where Nothing = Just n
I think that where x@Nothing = Just n could be useful, if 'x' is evaluated somewhere.