Possible bug in Renamer when dealing with orphans
In a branch of GHC with Growable ASTs, the code compiles with devel2
configuration, but fails with ./validate
. It passes all the test cases, except two that already fail in HEAD (see #14126).
Especifically, the compiler returns the following error:
ghc-stage1: panic! (the 'impossible' happened)
(GHC version 8.3.20170806 for x86_64-unknown-linux):
ASSERT failed!
HsPat [GHC.Base, GHC.Float, Data.Binary.Generic,
Data.ByteString.Builder, HsBinds, HsDoc, HsExpr, HsLit, HsPat,
HsTypes, PprCore, GHC.LanguageExtensions,
Data.Time.Calendar.Gregorian, Data.Time.Format.Parse,
Data.Time.LocalTime.Internal.LocalTime,
Data.Time.LocalTime.Internal.ZonedTime]
Call stack:
CallStack (from HasCallStack):
prettyCurrentCallStack, called at compiler/utils/Outputable.hs:1133:58 in ghc:Outputable
callStackDoc, called at compiler/utils/Outputable.hs:1188:22 in ghc:Outputable
assertPprPanic, called at compiler/rename/RnNames.hs:364:99 in ghc:RnNames
Call stack:
CallStack (from HasCallStack):
prettyCurrentCallStack, called at compiler/utils/Outputable.hs:1133:58 in ghc:Outputable
callStackDoc, called at compiler/utils/Outputable.hs:1137:37 in ghc:Outputable
pprPanic, called at compiler/utils/Outputable.hs:1186:5 in ghc:Outputable
assertPprPanic, called at compiler/rename/RnNames.hs:364:99 in ghc:RnNames
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
I suspect (as hinted above) it has to do with a bug in the renamer when dealing with orphan instances (and probably in conjunction with boot files).
Trac metadata
Trac field | Value |
---|---|
Version | 8.2.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler (Type checker) |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | alanz, simonpj |
Operating system | |
Architecture |