
#14086: Empty case does not detect kinds -------------------------------------+------------------------------------- Reporter: dfeuer | Owner: (none) Type: bug | Status: new Priority: low | Milestone: 8.4.1 Component: Compiler | Version: 8.2.1 (Type checker) | Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: Incorrect Unknown/Multiple | error/warning at compile-time Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- {{{#!hs {-# language TypeInType, EmptyCase #-} module Silly where import Data.Kind f :: Type -> Int f x = case x of }}} GHC warns {{{ Pattern match(es) are non-exhaustive In a case alternative: Patterns not matched: _ :: * }}} In fact, `Type` is only a type because of `TypeInType`. It has no actual values, so the empty case is exhaustive. To be honest, I kind of wish GHC would give me a warning for doing something so silly as to even give a function an argument of type `Type`, but I imagine that might be hard. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14086 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler