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.

_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to