Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#8755 closed bug (duplicate)

Happy parser file compilation causes panic

Reported by: wting Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.6.3
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: x86_64 (amd64)
Type of failure: Compile-time crash Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

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

Attachments (6)

Base.hs (1.4 KB) - added by wting 2 years ago.
Declare.hs (1.9 KB) - added by wting 2 years ago.
DeclareParse.hs (14.7 KB) - added by wting 2 years ago.
DeclareTest.hs (594 bytes) - added by wting 2 years ago.
Lexer.hs (1.1 KB) - added by wting 2 years ago.
README.md (766 bytes) - added by wting 2 years ago.

Download all attachments as: .zip

Change History (9)

Changed 2 years ago by wting

Changed 2 years ago by wting

Changed 2 years ago by wting

Changed 2 years ago by wting

Changed 2 years ago by wting

Changed 2 years ago by wting

comment:1 Changed 2 years ago 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.

comment:2 Changed 2 years ago by goldfire

  • Resolution set to duplicate
  • Status changed from new to closed

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 reproduce the bug with 7.6.3.

Thanks for reporting!

Last edited 2 years ago by goldfire (previous) (diff)

comment:3 Changed 2 years ago by monoidal

For the record: it's bug #7882.

Note: See TracTickets for help on using tickets.