[GHC] #12732: GHC bug

#12732: GHC bug -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.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: -------------------------------------+------------------------------------- A frog told me about this {{{#!hs (a ... b) xs | a == x , (l, _:r) <- break (== x) xs = l ++ [x] }}} {{{ baldur@Loki:~$ ghci -fobject-code -fdefer-typed-holes -ignore-dot-ghci /tmp/tnVL.hs GHCi, version 8.0.1: http://www.haskell.org/ghc/ :? for help [1 of 1] Compiling Main ( /tmp/tnVL.hs, /tmp/tnVL.o ) /tmp/tnVL.hs:2:10: warning: [-Wtyped-holes] Variable not in scope: x /tmp/tnVL.hs:3:27: warning: [-Wtyped-holes] Variable not in scope: x /tmp/tnVL.hs:4:11: warning: [-Wtyped-holes] Variable not in scope: x ghc: panic! (the 'impossible' happened) (GHC version 8.0.1 for x86_64-unknown-linux): StgCmmEnv: variable not found $dEq_a26w local binds for: $trModule $trModule1_r29y $trModule2_r2a9 x_r2aa x1_r2ab x2_r2ac a2_s2ah b_s2ai xs_s2aj fail_s2ak Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
}}} I managed to find a more minimal example {{{#!hs u a | a == x = undefined }}} doesn't trigger error in GHCi. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12732 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12732: GHC bug -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj): Thanks. I think that's been fixed now. With HEAD I get {{{ bash$ c:/code/HEAD/inplace/bin/ghc-stage1 -c T12732.hs T12732.hs:4:11: error: Variable not in scope: x T12732.hs:5:28: error: Variable not in scope: x T12732.hs:6:12: error: Variable not in scope: x }}} I'm not in a position to try with the 8.0 branch today; could someone try? Simon -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12732#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12732: GHC bug -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by RyanGlScott): I can't reproduce it with GHC 8.0.2: {{{ $ /opt/ghc/8.0.2/bin/ghc -fobject-code -fdefer-typed-holes Bug.hs [1 of 1] Compiling Bug ( Bug.hs, Bug.o ) Bug.hs:4:10: error: Variable not in scope: x Bug.hs:5:27: error: Variable not in scope: x Bug.hs:6:11: error: Variable not in scope: x }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12732#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12732: GHC bug -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by simonpj): * status: new => closed * resolution: => fixed Comment: Good; let's jut close it. I doubt it's even worth a regression test, but it'd do no harm to add one if someone wants to take a minute to do so. Simon -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12732#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12732: GHC bug
-------------------------------------+-------------------------------------
Reporter: Iceland_jack | Owner:
Type: bug | Status: closed
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.1
Resolution: fixed | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ryan Scott

#12732: GHC bug -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: Type: bug | Status: merge Priority: normal | Milestone: 8.0.2 Component: Compiler | Version: 8.0.1 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * status: closed => merge * milestone: => 8.0.2 Comment: As this works in GHC 8.0.2, this could be merged safely. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12732#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#12732: GHC bug -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: Type: bug | Status: closed Priority: normal | Milestone: 8.0.2 Component: Compiler | Version: 8.0.1 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: merge => closed Comment: Merged to `ghc-8.0` as 4227f3ea715960cc272a525f37e5d67ba232ae24. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12732#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC