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

Christopher Done chrisdone at gmail.com
Thu Jul 19 13:07:38 CEST 2012

In your case the Nothing is unused so will never be a problem.

Perhaps more worrying:

foo :: Int -> Int
foo n = x + 1
      Just x = Nothing

This gives no warnings.

More information about the Glasgow-haskell-users mailing list