Why GHC doesn't warn about LHS nullary-constructor pattern bindings?

2012-07-19 Thread Herbert Valerio Riedel
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

Re: Why GHC doesn't warn about LHS nullary-constructor pattern bindings?

2012-07-19 Thread Henning Thielemann
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 --

Re: Why GHC doesn't warn about LHS nullary-constructor pattern bindings?

2012-07-19 Thread Christopher Done
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