Skip to content

Panic when using a type synonym

I'm getting the following "the impossible happened" error when trying to compile the code in the attachment:

[2 of 3] Compiling Data.Mod.FiniteRing ( Data/Mod/FiniteRing.hs, dist/build/Data/Mod/FiniteRing.o )
ghc: panic! (the 'impossible' happened)
  (GHC version 7.4.1 for x86_64-unknown-linux):
	tyThingTyCon
    Data constructor `modular-0.1.0:Data.Mod.Types.FiniteRing{d r0}'

This only happens when I use the Mod type synonym. When I spell the full GenMod type everything works fine. Also the first compilation run after a "cabal clean" works fine.

Steps to reproduce:

  1. Unpack the attached cabal package.
  2. Compile (cabal configure, cabal build).
  3. Touch Data/Mod/FiniteRing.hs.
  4. Compile again (cabal build).
Trac metadata
Trac field Value
Version 7.4.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