Opened 8 years ago

Closed 8 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: 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 8 years ago.
Main.hs (70 bytes) - added by spookylukey 8 years ago.

Download all attachments as: .zip

Change History (5)

Changed 8 years ago by spookylukey

comment:1 Changed 8 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 8 years ago by spookylukey

comment:2 Changed 8 years ago by simonpj

  • difficulty set to Unknown
  • Owner set to igloo
  • Test Case set to rename/should_fail/T2901
  • Type changed from bug to merge

Fixed by

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

Pls merge


comment:3 Changed 8 years ago by igloo

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


Note: See TracTickets for help on using tickets.