Skip to content

GADT code from RepLib causes panic!

While compiling RepLib generics library I encountered a ghc panic. I have isolated the failure to very small example that does some simple computation over a heterogenous list. I have attached the following files

RepMinimal.hs. This is the problem reduced to small example. The function that seems to cause the problem is "badFunction". If I remove this function the file compiles.

RepSmall.hs. This is a trimmed down core of RepLib where the original problem occurs. I only include it if someone looking at the bug wants to know what this code was used for.

below is the output of ghc run.

[ben@lapdog RepLib]$ ghc -v RepCombined3.hs Glasgow Haskell Compiler, Version 6.10.1, for Haskell 98, stage 2 booted by GHC version 6.10.1 Using package config file: /usr/lib/ghc-6.10.1/./package.conf hiding package base-3.0.3.0 to avoid conflict with later version base-4.0.0.0 wired-in package ghc-prim mapped to ghc-prim-0.1.0.0 wired-in package integer mapped to integer-0.1.0.0 wired-in package base mapped to base-4.0.0.0 wired-in package rts mapped to rts-1.0 wired-in package haskell98 mapped to haskell98-1.0.1.0 wired-in package syb mapped to syb-0.1.0.0 wired-in package template-haskell mapped to template-haskell-2.3.0.0 wired-in package dph-seq mapped to dph-seq-0.3 wired-in package dph-par mapped to dph-par-0.3 Hsc static flags: -static Created temporary directory: /tmp/ghc3284_0

  • ** Checking old interface for main:Data.RepLib.RepCombined:
  • ** Parser:
  • ** Renamer/typechecker:
  • ** Desugar:

Result size = 176

  • ** Simplify:

Result size = 283

Result size = 283

  • ** Tidy Core:

Result size = 283

  • ** CorePrep:

Result size = 465

  • ** Stg2Stg:
  • ** CodeGen:
  • ** CodeOutput:
  • ** Deleting temp files:

Deleting: /tmp/ghc3284_0/ghc3284_0.s

  • ** Deleting temp dirs:

Deleting: /tmp/ghc3284_0 ghc: panic! (the 'impossible' happened)

(GHC version 6.10.1 for i386-unknown-linux):

initC: srt_lbl

Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug

Trac metadata
Trac field Value
Version 6.10.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information