[GHC] #12925: GHC panic: Can't serialise IfaceTcTyVar
GHC
ghc-devs at haskell.org
Mon Dec 5 02:23:21 UTC 2016
#12925: GHC panic: Can't serialise IfaceTcTyVar
-------------------------------------+-------------------------------------
Reporter: RyanGlScott | Owner:
Type: bug | Status: new
Priority: high | Milestone: 8.2.1
Component: Compiler | Version: 8.1
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: GHC rejects
Unknown/Multiple | valid program
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
This bug currently prevents `vector` from being built with GHC HEAD. Here
is a minimized test case:
{{{
module Bug where
data Foo a x = Foo x
refoo :: Foo a x -> Foo b x
refoo (Foo x) = Foo x
{-# RULES
"refoo/refoo" forall s.
refoo (refoo s) = s #-}
}}}
You'll need to compile with optimizations on to trigger this:
{{{
$ /opt/ghc/head/bin/ghc -O1 Bug.hs
[1 of 1] Compiling Bug (.hs -> .o)
Bug.hs:10:1: warning: [-Winline-rule-shadowing]
Rule "refoo/refoo" may never fire
because ‘refoo’ might inline first
Probable fix: add an INLINE[n] or NOINLINE[n] pragma for ‘refoo’
Bug.hs:10:1: warning: [-Winline-rule-shadowing]
Rule "refoo/refoo" may never fire
because ‘refoo’ might inline first
Probable fix: add an INLINE[n] or NOINLINE[n] pragma for ‘refoo’
ghc: panic! (the 'impossible' happened)
(GHC version 8.1.20161125 for x86_64-unknown-linux):
Can't serialise IfaceTcTyVar
a_ary[sk:1]
Call stack:
CallStack (from HasCallStack):
prettyCurrentCallStack, called at
compiler/utils/Outputable.hs:1076:58 in ghc:Outputable
callStackDoc, called at compiler/utils/Outputable.hs:1080:37 in
ghc:Outputable
pprPanic, called at compiler/iface/IfaceType.hs:1331:10 in
ghc:IfaceType
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
}}}
If I had to guess, this commit (
http://git.haskell.org/ghc.git/commit/5f349fe24066e7b0af85934664e27636d2e84fe5
) is responsible. Simon, do you know what's going on here?
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12925>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list