[GHC] #12156: -fdefer-typed-holes causes panic on unbound variable

#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

#12156: -fdefer-typed-holes causes panic on unbound variable -------------------------------------+------------------------------------- Reporter: osa1 | Owner: Type: bug | Status: new Priority: high | Milestone: Component: Compiler (Type | Version: 8.1 checker) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #10569 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by thomie): * component: Compiler => Compiler (Type checker) * related: => #10569 Comment: The example from the description of #10569 fails with the same panic (it was unfortunately never added to the testsuite), so commit fb7b6922573af76a954d939c85e6af7c39a19896 might be involved. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12156#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12156: -fdefer-typed-holes causes panic on unbound variable
-------------------------------------+-------------------------------------
Reporter: osa1 | Owner:
Type: bug | Status: new
Priority: high | Milestone:
Component: Compiler (Type | Version: 8.1
checker) |
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: #10569 | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Simon Peyton Jones

#12156: -fdefer-typed-holes causes panic on unbound variable -------------------------------------+------------------------------------- Reporter: osa1 | Owner: Type: bug | Status: merge Priority: high | Milestone: 8.0.2 Component: Compiler (Type | Version: 8.1 checker) | Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: partial- | sigs/should_compile/T12156 Blocked By: | Blocking: Related Tickets: #10569 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by simonpj): * testcase: => partial-sigs/should_compile/T12156 * status: new => merge * milestone: => 8.0.2 Comment: Thanks a great report. Simon -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12156#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12156: -fdefer-typed-holes causes panic on unbound variable -------------------------------------+------------------------------------- Reporter: osa1 | Owner: Type: bug | Status: closed Priority: high | Milestone: 8.0.2 Component: Compiler (Type | Version: 8.1 checker) | Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: partial- | sigs/should_compile/T12156 Blocked By: | Blocking: Related Tickets: #10569 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: merge => closed * resolution: => fixed Comment: Merged to `ghc-8.0` as 8de6c607321cdf36336ccab311357c111e895e54. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12156#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12156: -fdefer-typed-holes causes panic on unbound variable -------------------------------------+------------------------------------- Reporter: osa1 | Owner: Type: bug | Status: closed Priority: high | Milestone: 8.0.2 Component: Compiler (Type | Version: 8.0.1 checker) | Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: partial- | sigs/should_compile/T12156 Blocked By: | Blocking: Related Tickets: #10569 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * version: 8.1 => 8.0.1 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12156#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12156: -fdefer-typed-holes causes panic on unbound variable
-------------------------------------+-------------------------------------
Reporter: osa1 | Owner: (none)
Type: bug | Status: closed
Priority: high | Milestone: 8.0.2
Component: Compiler (Type | Version: 8.0.1
checker) |
Resolution: fixed | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case: partial-
| sigs/should_compile/T12156
Blocked By: | Blocking:
Related Tickets: #10569 | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ryan Scott
participants (1)
-
GHC