Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
GHC
GHC
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,319
    • Issues 4,319
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 368
    • Merge Requests 368
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #12925

Closed
Open
Opened Dec 05, 2016 by Ryan Scott@RyanGlScottMaintainer

GHC panic: Can't serialise IfaceTcTyVar

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?

Trac metadata
Trac field Value
Version 8.1
Type Bug
TypeOfFailure OtherFailure
Priority high
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC simonpj
Operating system
Architecture
Assignee
Assign to
8.2.1
Milestone
8.2.1 (Past due)
Assign milestone
Time tracking
None
Due date
None
Reference: ghc/ghc#12925