[GHC] #7368: kindFunResult panic in the
GHC
cvs-ghc at haskell.org
Fri Oct 26 17:47:27 CEST 2012
#7368: kindFunResult panic in the
----------------------------------------+-----------------------------------
Reporter: ChrisN | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler (Type checker) | Version: 7.6.1
Keywords: Kinds, kindfunresult | Os: Unknown/Multiple
Architecture: Unknown/Multiple | Failure: Compile-time crash
Difficulty: Unknown | Testcase: typecheck/should_fail/T7368
Blockedby: | Blocking:
Related: |
----------------------------------------+-----------------------------------
Changes (by simonpj):
* testcase: => typecheck/should_fail/T7368
* version: 7.7 => 7.6.1
Comment:
Good bug. Yes 7.6.1 fails, thus
{{{
T7368.hs:3:10:
Couldn't match kind `* -> *' with `*'
Expected type: a0 -> b0
Actual type: a0 -> b0
Kind incompatibility when matching types:
b_w :: * -> *
b0 :: *
In the return type of a call of `l'
In the first argument of `b', namely `(l ())'
T7368.hs:3:13:ghc-stage1: panic! (the 'impossible' happened)
(GHC version 7.6.1.20121011 for x86_64-unknown-linux):
kindFunResult ghc-prim:GHC.Prim.*{(w) tc 34d}
}}}
However HEAD (will be 7.8) is (happily) ok:
{{{
T7368.hs:3:10:
Couldn't match kind `* -> *' with `*'
When matching types
c0 :: (* -> *) -> *
(->) a0 :: * -> *
Expected type: a0 -> b0
Actual type: c0 b1
In the return type of a call of `l'
Probable cause: `l' is applied to too many arguments
In the first argument of `b', namely `(l ())'
In the expression: b (l ())
T7368.hs:3:13:
Couldn't match type `()' with `b0 a1'
Expected type: b1 a1
Actual type: ()
In the first argument of `l', namely `()'
In the first argument of `b', namely `(l ())'
In the expression: b (l ())
}}}
I don't know where exactly the problem lies in 7.6, and I'm very swamped,
so I'm going to leave this open and unfixed. If it turns out to bite some
mission-critical package I can look into fixing it in 7.6, I'd prefer not
to have to do that.
I have added a regression test though.
Simon
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7368#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list