
#9036: ghc: panic! (the 'impossible' happened) (Binder's type (SingI Symbol <a
String>) /= RHS type (String))
--------------------------------+---------------------------------------
Reporter: ntc2 | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.6.3
Keywords: GHC.TypeLits | Operating System: Linux
Architecture: x86 | Type of failure: Compile-time crash
Difficulty: Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: |
--------------------------------+---------------------------------------
Compilation error message:
{{{
ghc: panic! (the 'impossible' happened)
(GHC version 7.6.3 for i386-unknown-linux):
cgLookupPanic (probably invalid Core; try -dcore-lint)
cobox{v a212} [lid]
static binds for:
local binds for:
main:Debug.Trace.LogTree.Test.$p1AllShow{v r1pg} [gid[ClassOp]]
main:Debug.Trace.LogTree.Test.$p2AllShow{v r1ph} [gid[ClassOp]]
main:Debug.Trace.LogTree.Test.$p3AllShow{v r1pi} [gid[ClassOp]]
main:Debug.Trace.LogTree.Test.$p4AllShow{v r1pj} [gid[ClassOp]]
main:Debug.Trace.LogTree.Test.$p5AllShow{v r1pk} [gid[ClassOp]]
main:Debug.Trace.LogTree.Test.$p6AllShow{v r1pl} [gid[ClassOp]]
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
}}}
Error in -dcore-lint:
{{{
[10 of 10] Compiling Debug.Trace.LogTree.Test (
src/Debug/Trace/LogTree/Test.hs, tmp/Debug/Trace/LogTree/Test.o )
*** Core Lint errors : in result of Desugar (after optimization) ***
{-# LINE 122 "src/Debug/Trace/LogTree/Test.hs #-}: Warning:
[RHS of $dSingI_a20r :: GHC.TypeLits.SingI GHC.TypeLits.Symbol "h"]
The type of this binder doesn't match the type of its RHS:
$dSingI_a20r
Binder's type: GHC.TypeLits.SingI GHC.TypeLits.Symbol "h"
Rhs type: [GHC.Types.Char]
}}}
So, it looks like it's related to !TypeLits. The full -dcore-lint output
is attached.
To reproduce:
1. git clone https://github.com/ntc2/haskell-call-trace.git
2. cd haskell-call-trace
3. git checkout break-ghc
3.