
#11806: GHC does not warn for mistakenly empty case -------------------------------------+------------------------------------- Reporter: dfeuer | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.3 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: GHC accepts Unknown/Multiple | invalid program Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- {{{#!hs {-# LANGUAGE EmptyCase #-} {-# OPTIONS_GHC -Wall -fwarn-incomplete-uni-patterns #-} oops :: Int -> a oops x = case x of {} }}} Since `Int` is inhabited, I would expect a warning, but I get none. Since empty case is typically used in situations where programmers want GHC to see an absurdity, this seems most unfortunate. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11806 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler