#2862: GHC Panic in ByteCodeGen
-----------------------------+----------------------------------------------
Reporter: nominolo | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 6.11 | Severity: normal
Keywords: | Testcase:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
-----------------------------+----------------------------------------------
Try to load the following problem with {{{ghc --interactive}}} of the
latest HEAD.
{{{
{-# LANGUAGE MultiParamTypeClasses, FlexibleInstances #-}
class Search id a where
search :: a -> ()
instance Search id () where
search d = undefined
-- works:
-- instance Search () () where search d = undefined
}}}
You get an irrefutable pattern match error in ByteCodeGen:644
The code calls {{{splitApp}}} and expects an {{{AnnVar v}}}. What it gets
instead is:
{{{
\ (@ id{tv af0} [sk]) -> search1{v rfK} [gid] @ id{tv af0} [sk]
}}}
The argument to splitApp was:
{{{
((((\ (@ id{tv af0} [sk]) ->
search1{v rfK} [gid] @ id{tv af0} [sk])
`cast` (forall id{tv af0} [sk].
ghc-prim:GHC.Prim.sym{(w) tc 34v}
(main:Main.NTCo:T:Search{tc rfe}
id{tv af0} [sk] ghc-prim:GHC.Unit.(){(w) tc 40})
:: <pred>forall id{tv af0} [sk].
ghc-prim:GHC.Unit.(){(w) tc 40} -> ghc-
prim:GHC.Unit.(){(w) tc 40}
~
forall id{tv af0} [sk].
main:Main.T:Search{tc rf8}
id{tv af0} [sk] ghc-prim:GHC.Unit.(){(w) tc
40}))
@ etaT_sg1{tv} [tv])
`cast` (main:Main.NTCo:T:Search{tc rfe}
etaT_sg1{tv} [tv] ghc-prim:GHC.Unit.(){(w) tc 40}
:: <pred>main:Main.T:Search{tc rf8}
etaT_sg1{tv} [tv] ghc-prim:GHC.Unit.(){(w) tc 40}
~
ghc-prim:GHC.Unit.(){(w) tc 40}
-> ghc-prim:GHC.Unit.(){(w) tc 40}))
eta_sg2{v} [lid]
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2862>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs