Skip to content

GHC Panic On Recompile

Perhaps related to DataKinds or ConstraintKinds, but on rebuild without a clean, the following error is emitted:

Building glyph-0.1...
Preprocessing executable 'glyph' for glyph-0.1...
[34 of 60] Compiling Language.Glyph.HM.InferType ( src/Language/Glyph/HM/InferType.hs, dist/build/glyph/glyph-tmp/Language/Glyph/HM/InferType.p_o )
ghc: panic! (the 'impossible' happened)
  (GHC version 7.4.1 for x86_64-unknown-linux):
	tyThingTyCon
    Data constructor `main:Language.Glyph.Type.Normal{d r3iU}'

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

This can be recreated by building this cabal project:

https://github.com/sonyandy/glyph/tree/ghc-panic

To recreate:

git clone https://github.com/sonyandy/glyph/tree/ghc-panic

cabal configure

cabal build

touch src/Language/Glyph/HM/InferType.hs

cabal build
Edited by Simon Peyton Jones
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information