-XDefaultSignatures panic in type error diagnostic
The following piece of code shouldn't (and doesn't) typecheck, however GHC panics during the diagnostic.
$ cat /tmp/Weird.hs
{-# LANGUAGE DefaultSignatures #-}
module Weird where
import Control.Monad.Trans
class Class a where
fun :: () -> () -> a
default fun :: () -> () -> m a
fun = lift
$ ghc /tmp/Weird.hs
[1 of 1] Compiling Weird ( /tmp/Weird.hs, /tmp/Weird.o )
/tmp/Weird.hs:9:11:
Couldn't match kind `* -> *' with `*'
Expected type: ()ghc: panic! (the 'impossible' happened)
(GHC version 7.6.3 for x86_64-unknown-linux):
kindFunResult ghc-prim:GHC.Prim.*{(w) tc 34d}
Trac metadata
Trac field | Value |
---|---|
Version | 7.6.3 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |