[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 <simonpj@…>): In [changeset:"af21e38855f7d517774542b360178b05045ecb08/ghc" af21e38/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="af21e38855f7d517774542b360178b05045ecb08" Don't omit any evidence bindings This fixes Trac #12156, where we were omitting to make an evidence binding (because cec_suppress was on), but yet the program was compiled and run. The fix is easy, and involves deleting code :-). }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12156#comment:2> 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: 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 <ryan.gl.scott@…>): In [changeset:"38a381912f67c0f6f3fba8de1026d7464826b851/ghc" 38a38191/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="38a381912f67c0f6f3fba8de1026d7464826b851" Add regression tests for #12947, #13640 Summary: Commit b4bdbe4957ae8b82c4cda5584203b44d3c4f004f (the fix for #12156) wound up being the fix for #12947 and #13640 as well. This adds regression tests for the latter two tickets to keep them fixed. Test Plan: make test TEST="T12947 T13640" Reviewers: bgamari, austin Reviewed By: bgamari Subscribers: rwbarton, thomie GHC Trac Issues: #12947, #13640 Differential Revision: https://phabricator.haskell.org/D3528 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12156#comment:6> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC