[GHC] #12925: GHC panic: Can't serialise IfaceTcTyVar

#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/5f349fe24066e7b0af85934664e27636d2e84f... ) 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

#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
Resolution: | 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: |
-------------------------------------+-------------------------------------
Comment (by simonpj):
So you have this in your tree?
{{{
commit f8c8de8ebf73cd77faa0249d92f280e33a8d2624
Author: Simon Peyton Jones

#12925: GHC panic: Can't serialise IfaceTcTyVar -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: Type: bug | Status: closed Priority: high | Milestone: 8.2.1 Component: Compiler | Version: 8.1 Resolution: invalid | 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: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * status: new => closed * resolution: => invalid Comment: Thanks Simon, that explains it. I was using a slightly older build from https://launchpad.net/~hvr/+archive/ubuntu/ghc which included 5f349fe24066e7b0af85934664e27636d2e84fe5, but not f8c8de8ebf73cd77faa0249d92f280e33a8d2624. I can verify that that commit fixes the above issue. Apologies for the noise. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12925#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12925: GHC panic: Can't serialise IfaceTcTyVar
-------------------------------------+-------------------------------------
Reporter: RyanGlScott | Owner:
Type: bug | Status: closed
Priority: high | Milestone: 8.2.1
Component: Compiler | Version: 8.1
Resolution: invalid | 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: |
-------------------------------------+-------------------------------------
Comment (by Simon Peyton Jones

#12925: GHC panic: Can't serialise IfaceTcTyVar -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: Type: bug | Status: closed Priority: high | Milestone: 8.2.1 Component: Compiler | Version: 8.1 Resolution: invalid | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: GHC rejects | Test Case: valid program | typecheck/should_compile/T12925 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by simonpj): * testcase: => typecheck/should_compile/T12925 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12925#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC