[GHC] #7778: kindFunResult panic with => inside a constraint

#7778: kindFunResult panic with => inside a constraint -----------------------------+---------------------------------------------- Reporter: monoidal | Owner: Type: bug | Status: new Priority: normal | Component: Compiler (Type checker) Version: 7.6.2 | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: None/Unknown | Blockedby: Blocking: | Related: -----------------------------+---------------------------------------------- Following type (found by arkeet on #haskell) causes kindFunResult panic in 7.6 and HEAD: {{{ v :: ((Num Int => Num) ()) => () v = v }}} In a probably related issue, {{{ Prelude> :set -XFlexibleContexts -XRankNTypes Prelude> type T = Num Int => Num Bool Prelude> :k T T :: Constraint Prelude> :k Num Int => Num Bool Num Int => Num Bool :: * }}} -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7778 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7778: kindFunResult panic with => inside a constraint ----------------------------------------+----------------------------------- Reporter: monoidal | Owner: simonpj Type: bug | Status: new Priority: normal | Milestone: 7.8.1 Component: Compiler (Type checker) | Version: 7.6.2 Keywords: | Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: None/Unknown Difficulty: Unknown | Testcase: Blockedby: | Blocking: Related: | ----------------------------------------+----------------------------------- Changes (by igloo): * owner: => simonpj * difficulty: => Unknown * milestone: => 7.8.1 Comment: {{{ [1 of 1] Compiling Main ( q.hs, interpreted ) ghc-stage2: panic! (the 'impossible' happened) (GHC version 7.7.20130409 for x86_64-unknown-linux): kindFunResult <<details unavailable>> }}} -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7778#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7778: kindFunResult panic with => inside a constraint ----------------------------------------+----------------------------------- Reporter: monoidal | Owner: simonpj Type: bug | Status: new Priority: normal | Milestone: 7.8.1 Component: Compiler (Type checker) | Version: 7.6.2 Keywords: | Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: None/Unknown Difficulty: Unknown | Testcase: Blockedby: | Blocking: Related: | ----------------------------------------+----------------------------------- Comment(by parcs): FYI the first code snippet produces a different panic with a DEBUG build of GHC. Panic with DEBUG build: {{{ ghc-stage2: panic! (the 'impossible' happened) (GHC version 7.7.20130416 for x86_64-unknown-linux): ASSERT failed! file compiler/types/Type.lhs line 1623 base:GHC.Num.Num{tc 2b} ghc-prim:GHC.Types.Int{(w) tc 3J} => base:GHC.Num.Num{tc 2b} ghc-prim:GHC.Prim.*{(w) tc 34d} -> ghc-prim:GHC.Prim.Constraint{(w) tc 34s} }}} Panic with non-DEBUG buird: {{{ [1 of 1] Compiling Main ( q.hs, interpreted ) ghc-stage2: panic! (the 'impossible' happened) (GHC version 7.7.20130421 for x86_64-unknown-linux): kindFunResult ghc-prim:GHC.Prim.*{(w) tc 34d} }}} -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7778#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7778: kindFunResult panic with => inside a constraint
----------------------------------------+-----------------------------------
Reporter: monoidal | Owner: simonpj
Type: bug | Status: new
Priority: normal | Milestone: 7.8.1
Component: Compiler (Type checker) | Version: 7.6.2
Keywords: | Os: Unknown/Multiple
Architecture: Unknown/Multiple | Failure: None/Unknown
Difficulty: Unknown | Testcase:
Blockedby: | Blocking:
Related: |
----------------------------------------+-----------------------------------
Comment(by simonpj@…):
commit d3149f6096a987e94d4989e537c1a133bcbb9a6f
{{{
Author: Simon Peyton Jones

#7778: kindFunResult panic with => inside a constraint ------------------------------------------+--------------------------------- Reporter: monoidal | Owner: simonpj Type: bug | Status: closed Priority: normal | Milestone: 7.8.1 Component: Compiler (Type checker) | Version: 7.6.2 Resolution: fixed | Keywords: Os: Unknown/Multiple | Architecture: Unknown/Multiple Failure: None/Unknown | Difficulty: Unknown Testcase: typecheck/should_fail/T7778 | Blockedby: Blocking: | Related: ------------------------------------------+--------------------------------- Changes (by simonpj): * status: new => closed * testcase: => typecheck/should_fail/T7778 * resolution: => fixed Comment: Thanks for the test case. It showed up a real infelicity. Simon -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7778#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC