Hello,
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
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 --
In your case the Nothing is unused so will never be a problem.
Perhaps more worrying:
foo :: Int - Int
foo n = x + 1
where
Just x = Nothing
This gives no warnings.
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org