
#8262: Ill-kinded value is not rejected immediately -------------------------------------+------------------------------------- Reporter: monoidal | Owner: Type: bug | Status: new Priority: low | Milestone: Component: Compiler (Type | Version: 7.7 checker) | Operating System: Unknown/Multiple Keywords: | Type of failure: GHC accepts Architecture: Unknown/Multiple | invalid program Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | -------------------------------------+------------------------------------- The expression `Just (1#)` is ill-kinded, since `Just` expects a parameter of type `a :: *` not `#`. GHC 7.6.3 recognizes this {{{ λ> :t Just (1#) <interactive>:1:7: Couldn't match kind `*' against `#' Kind incompatibility when matching types: a0 :: * GHC.Prim.Int# :: # In the first argument of `Just', namely `(1#)' In the expression: Just (1#) }}} while HEAD gives {{{ λ> :t Just (1#) Just (1#) :: a ~ GHC.Prim.Int# => Maybe a }}} Not a big deal, attempting to do anything with this value gives the same error as in 7.6.3. But still, I think it should be rejected as ill-kinded at sight. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8262 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler