[GHC] #8755: Happy parser file compilation causes panic

#8755: Happy parser file compilation causes panic ----------------------------------+--------------------------------------- Reporter: wting | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Keywords: | Operating System: Unknown/Multiple Architecture: x86_64 (amd64) | Type of failure: Compile-time crash Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | ----------------------------------+--------------------------------------- Sorry I can't be more descriptive, but I'm not exactly sure what's causing the compile time crash. I can compile it on GHC 7.4.1, but it crashes for GHC 7.6.3. {{{ ╭─ting@noa ~/panic ‹python-2.7.3› ‹master› ╰─➤ ghc DeclareParse.hs [1 of 4] Compiling Base ( Base.hs, Base.o ) [2 of 4] Compiling Lexer ( Lexer.hs, Lexer.o ) [3 of 4] Compiling Declare ( Declare.hs, Declare.o ) [4 of 4] Compiling DeclareParse ( DeclareParse.hs, DeclareParse.o ) ghc: panic! (the 'impossible' happened) (GHC version 7.6.3 for x86_64-unknown-linux): Prelude.head: empty list Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug }}} I've uploaded all the files here to check out: https://gist.github.com/wting/a6787a3f50ee41dda611 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8755 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8755: Happy parser file compilation causes panic ---------------------------------------+---------------------------------- Reporter: wting | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: x86_64 (amd64) Type of failure: Compile-time crash | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: ---------------------------------------+---------------------------------- Comment (by wting): Sorry, this also fails on 7.4.1: {{{ ╭─ting@sloth ~/code/cs345 ‹python-2.7.3› ‹hw2› ╰─➤ ghc DeclareParse.hs [1 of 4] Compiling Base ( Base.hs, Base.o ) [2 of 4] Compiling Lexer ( Lexer.hs, Lexer.o ) [3 of 4] Compiling Declare ( Declare.hs, Declare.o ) [4 of 4] Compiling DeclareParse ( DeclareParse.hs, DeclareParse.o ) ghc: panic! (the 'impossible' happened) (GHC version 7.4.1 for x86_64-unknown-linux): Prelude.head: empty list Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug }}} I'm going to try and investigate further. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8755#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8755: Happy parser file compilation causes panic ---------------------------------------+---------------------------------- Reporter: wting | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Resolution: duplicate | Keywords: Operating System: Unknown/Multiple | Architecture: x86_64 (amd64) Type of failure: Compile-time crash | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: ---------------------------------------+---------------------------------- Changes (by goldfire): * status: new => closed * resolution: => duplicate Comment: This seems to be fixed in 7.8: {{{ 23:18:03 ~/temp/bug> ghc --version The Glorious Glasgow Haskell Compilation System, version 7.8.20140130 23:18:06 ~/temp/bug> ghc DeclareParse.hs [1 of 4] Compiling Base ( Base.hs, Base.o ) [2 of 4] Compiling Lexer ( Lexer.hs, Lexer.o ) [3 of 4] Compiling Declare ( Declare.hs, Declare.o ) [4 of 4] Compiling DeclareParse ( DeclareParse.hs, DeclareParse.o ) DeclareParse.hs:177:11: Not in scope: data constructor ‛Subtract’ DeclareParse.hs:193:11: Not in scope: data constructor ‛Multiply’ DeclareParse.hs:202:11: Not in scope: data constructor ‛Divide’ }}} For the record, I was able to produce this with 7.6.3. Thanks for reporting! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8755#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8755: Happy parser file compilation causes panic ---------------------------------------+---------------------------------- Reporter: wting | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Resolution: duplicate | Keywords: Operating System: Unknown/Multiple | Architecture: x86_64 (amd64) Type of failure: Compile-time crash | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: ---------------------------------------+---------------------------------- Comment (by monoidal): For the record: it's bug #7882. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8755#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC