Pattern match failure in StgCmmExpr.hs when adding new out-of-line primop

Edsko de Vries edskodevries at gmail.com
Tue Nov 12 10:36:51 UTC 2013


Hi guys,

I'm trying to add a new primop; as a starting point I just copied the
definition of "catch#" in primops.txt.pp and renamed "catch#" to
"catchRethrow#", and added the corresponding declarations following
https://ghc.haskell.org/trac/ghc/wiki/Commentary/PrimOps#AddinganewPrimOp
; however, when I do this, I get

ghc-stage1: panic! (the 'impossible' happened)
  (GHC version 7.7.20131108 for x86_64-apple-darwin):
  compiler/codeGen/StgCmmExpr.hs:508:15-48: Irrefutable pattern failed
for pattern (CoreSyn.DEFAULT, deflt)

I can't quite figure out why that is happening and how I should
address it. Any suggestions?

Thanks!

-E


More information about the ghc-devs mailing list