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

2012-07-19 Thread Christian Maeder
You're right. That's a good case for a feature request. In fact any binding that binds no variables should be warned about: let Just _ = ... Cheers Christian Am 19.07.2012 12:50, schrieb Herbert Valerio Riedel: Hello, Recently, I was a bit suprised that GHC didn't warn about useless `where

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 htt

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 -- u

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 foo