[GHC] #8806: Invalid constraints should fail to type check

#8806: Invalid constraints should fail to type check -------------------------------------------+------------------------------- Reporter: erikd | Owner: erikd Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type checker) | Version: 7.6.3 Keywords: | Operating System: Architecture: Unknown/Multiple | Unknown/Multiple Difficulty: Unknown | Type of failure: Blocked By: | None/Unknown Related Tickets: | Test Case: | Blocking: -------------------------------------------+------------------------------- With ghc-7.6.3 the following code: {{{ f :: Int => Int f x = x + 1 }}} should fail to type check, but instead compiles and runs as if it was: {{{ f :: Int -> Int f x = x + 1 }}} With 7.8rc1 and git HEAD this results in an error: {{{ Expected a constraint, but ‛Int’ has kind ‛*’ In the type signature for ‛f’: f :: Int => Int }}} We should add a "shouldn't type check" test to avoid the possibilty of a regression. Also: {{{ g :: (Int => Show a) => Int g = undefined }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8806 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8806: Invalid constraints should fail to type check
--------------------------------------------+------------------------------
Reporter: erikd | Owner: erikd
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler (Type checker) | Version: 7.6.3
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: None/Unknown | Unknown/Multiple
Test Case: | Difficulty: Unknown
Blocking: | Blocked By:
| Related Tickets:
--------------------------------------------+------------------------------
Comment (by Erik de Castro Lopo

#8806: Invalid constraints should fail to type check ------------------------------------------------+-------------------------- Reporter: erikd | Owner: erikd Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler (Type checker) | Version: 7.6.3 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Test Case: typecheck/should_fail/T8806 | Difficulty: Blocking: | Unknown | Blocked By: | Related Tickets: ------------------------------------------------+-------------------------- Changes (by simonpj): * status: new => closed * testcase: => typecheck/should_fail/T8806 * resolution: => fixed Comment: Thanks Erik. I'm just adding the test case to the ticket, and closing since it's now done (as I understand it). Simon -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8806#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC