Opened 5 years ago

Closed 5 years ago

#6072 closed bug (fixed)

Irrefutable pattern error while compiling GHC

Reported by: sjoerd_visscher Owned by: simonpj
Priority: highest Milestone: 7.6.1
Component: Compiler Version: 7.5
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Building GHC failed Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description (last modified by igloo)

While doing "make" on GHC HEAD I got this error:

"inplace/bin/ghc-stage1" -prof  -H32m -O    -package-name ghc-7.5.20120503 -hide-all-packages -i -icompiler/basicTypes -icompiler/cmm -icompiler/codeGen -icompiler/coreSyn -icompiler/deSugar -icompiler/ghci -icompiler/hsSyn -icompiler/iface -icompiler/llvmGen -icompiler/main -icompiler/nativeGen -icompiler/parser -icompiler/prelude -icompiler/profiling -icompiler/rename -icompiler/simplCore -icompiler/simplStg -icompiler/specialise -icompiler/stgSyn -icompiler/stranal -icompiler/typecheck -icompiler/types -icompiler/utils -icompiler/vectorise -icompiler/stage2/build -icompiler/stage2/build/autogen -Icompiler/stage2/build -Icompiler/stage2/build/autogen -Icompiler/../rts/dist/build -Icompiler/stage2 -Icompiler/. -Icompiler/parser -Icompiler/utils   -optP-DGHCI -optP-include -optPcompiler/stage2/build/autogen/cabal_macros.h -package Cabal-1.14.0 -package array- -package base- -package bin-package-db- -package bytestring- -package containers- -package directory- -package filepath- -package hoopl- -package hpc- -package process- -package template-haskell- -package time-1.4 -package unix-  -Wall -fno-warn-name-shadowing -fno-warn-orphans -XHaskell98 -XNondecreasingIndentation -XCPP -XMagicHash -XUnboxedTuples -XPatternGuards -XForeignFunctionInterface -XEmptyDataDecls -XTypeSynonymInstances -XMultiParamTypeClasses -XFlexibleInstances -XRankNTypes -XScopedTypeVariables -XDeriveDataTypeable -XBangPatterns -DGHCI_TABLES_NEXT_TO_CODE -DSTAGE=2 -O2  -no-user-package-conf -rtsopts      -odir compiler/stage2/build -hidir compiler/stage2/build -stubdir compiler/stage2/build -hisuf p_hi -osuf  p_o -hcsuf p_hc -c compiler/main/HscMain.hs -o compiler/stage2/build/HscMain.p_o
ghc-stage1: panic! (the 'impossible' happened)
  (GHC version 7.5.20120503 for x86_64-apple-darwin):
	compiler/simplCore/SimplUtils.lhs:1668:5-25: Irrefutable pattern failed for pattern ((_, _, rhs1) : _)

Please report this as a GHC bug:

make[1]: *** [compiler/stage2/build/HscMain.p_o] Error 1
make: *** [all] Error 2

Change History (4)

comment:1 Changed 5 years ago by igloo

Description: modified (diff)
difficulty: Unknown

comment:2 Changed 5 years ago by igloo

Architecture: x86_64 (amd64)Unknown/Multiple
Component: Build SystemCompiler
Milestone: 7.6.1
Owner: set to simonpj
Priority: normalhighest
Type of failure: None/UnknownBuilding GHC failed

Thanks for the report.

Simon, this looks like fall-out from "Allow cases with empty alterantives"?

comment:3 Changed 5 years ago by simonpj

Sorry yes my fault. Don't know why it didn't show up in my validate. Simon M has the patch; he is just validating before pushing.

comment:4 Changed 5 years ago by simonmar

Resolution: fixed
Status: newclosed

commit 1169351dca19dc3973448336ae168ddba154e606

Author: Simon Marlow <>
Date:   Thu May 3 08:47:40 2012 +0100

    Fix overnight build breakage (fix from simonpj)
    compiler/simplCore/SimplUtils.lhs:1668:5-25: Irrefutable pattern failed for 
pattern ((_, _, rhs1) : _)
Note: See TracTickets for help on using tickets.