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

Edsko de Vries edskodevries at
Tue Nov 12 12:09:01 UTC 2013

Hmmm,  a completely clean build seems to have resolved the issue.
Indicative of a Makefile problem somewhere?


On Tue, Nov 12, 2013 at 10:36 AM, Edsko de Vries <edskodevries at>wrote:

> 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
> ; 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the ghc-devs mailing list