GHC crash: equality and class contexts on datatype accessor
The following program:
{-# LANGUAGE FlexibleContexts, NoMonomorphismRestriction, Rank2Types, TypeFamilies #-}
module Foo where
class A a
data B b = B {
c :: (Int ~ Int, A b) => Int
}
d = c
produces the following bug when compiled with 'ghc foo.hs':
ghc: panic! (the 'impossible' happened)
(GHC version 6.10.4 for i386-unknown-linux):
applyTypeToArgs
ipv{v B4} [lid] $dA{v ag5} [lid]
(ghc-prim:GHC.Types.Int{(w) tc 3J}
~
ghc-prim:GHC.Types.Int{(w) tc 3J},
main:Foo.A{tc rfx} b{tv ag2} [sk]) =>
ghc-prim:GHC.Types.Int{(w) tc 3J}
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
Trac metadata
Trac field | Value |
---|---|
Version | 6.10.4 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler (Type checker) |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |