Opened 9 years ago

Closed 9 years ago

#2901 closed merge (fixed)

GHC crashes with "impossible happened ... RnEnv.lookupImportedName" if using DisambiguateRecordFields and qualifiers

Reported by: spookylukey Owned by: igloo
Priority: normal Milestone:
Component: Compiler Version: 6.8.2
Keywords: Cc:
Operating System: Linux Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case: rename/should_fail/T2901
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


If you specify DisambiguateRecordFields as an option, and then try to use qualifiers for field names in a data constructor, GHC crashes like this:

ghc-6.8.2: panic! (the 'impossible' happened)
  (GHC version 6.8.2 for i386-unknown-linux):
        RnEnv.lookupImportedName F.field{v}

See attached files for example -- simply do 'ghci Main.hs' to see the bug.

This bug means that if you use field disambiguation in part of a module, you have to use it everywhere in that module.

Attachments (2)

Foo.hs (53 bytes) - added by spookylukey 9 years ago.
Main.hs (70 bytes) - added by spookylukey 9 years ago.

Download all attachments as: .zip

Change History (5)

Changed 9 years ago by spookylukey

Attachment: Foo.hs added

comment:1 Changed 9 years ago by spookylukey

Actually, the 'Foo.hs' file is not needed to reproduce the bug, just download Main.hs and attempt to open in ghci.

Changed 9 years ago by spookylukey

Attachment: Main.hs added

comment:2 Changed 9 years ago by simonpj

difficulty: Unknown
Owner: set to igloo
Test Case: rename/should_fail/T2901
Type: bugmerge

Fixed by

Tue Dec 30 07:04:45 PST 2008
  * Refactor RnEnv to fix Trac #2901

Pls merge


comment:3 Changed 9 years ago by igloo

Resolution: fixed
Status: newclosed


Note: See TracTickets for help on using tickets.