[GHC] #12156: -fdefer-typed-holes causes panic on unbound variable
GHC
ghc-devs at haskell.org
Sun Jun 5 15:07:40 UTC 2016
#12156: -fdefer-typed-holes causes panic on unbound variable
-------------------------------------+-------------------------------------
Reporter: osa1 | Owner:
Type: bug | Status: new
Priority: high | Milestone:
Component: Compiler | Version: 8.1
Keywords: | Operating System: Unknown/Multiple
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
{{{#!haskell
module Main where
main = do
print v
return ()
}}}
Compile it without {{{-fdefer-typed-holes}}} and it fails as expected:
{{{
➜ hole_bug ghc --make Main.hs -fforce-recomp
[1 of 1] Compiling Main ( Main.hs, Main.o )
Main.hs:4:11: error: Variable not in scope: v
}}}
Adding {{{-fdefer-typed-holes}}} is causing a panic instead of runtime
error:
{{{
➜ hole_bug ghc --make Main.hs -fforce-recomp -fdefer-typed-holes
[1 of 1] Compiling Main ( Main.hs, Main.o )
Main.hs:4:11: warning: [-Wtyped-holes] Variable not in scope: v
ghc: panic! (the 'impossible' happened)
(GHC version 8.0.1 for x86_64-unknown-linux):
StgCmmEnv: variable not found
$dShow_aKo
local binds for:
$trModule
$trModule1_r16k
$trModule2_r16s
sat_s16x
sat_s16z
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
}}}
Tried with: 8.0.1, HEAD as of today.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12156>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list