Ticket #2846 (closed bug: fixed)
Impredicativity bug: GHC crash by type signature
|Reported by:||mm_freak||Owned by:||simonpj|
|Type of failure:||None/Unknown||Difficulty:||Unknown|
|Test Case:||T2846, T2846b||Blocked By:|
Quick and dirty, this is the bug:
Prelude> [1,2,3] :: [Num a => a] ghc: panic! (the 'impossible' happened) (GHC version 6.10.1 for i386-unknown-linux): TcTyFuns.flattenType: unexpected PredType
I'm running Gentoo Linux. I can reproduce this bug in the interpreter as well as in the compiler. It seems like it happens only with -fglasgow-exts, and only if you use show on that specific list. It doesn't happen, if you only use the head or the tail of the list. There is also no problem with appending something using (++) or consing through (:).
This is an amd64 architecture, but I'm using a 32 bits system, so this should be irrelevant.