Opened 9 years ago

Closed 9 years ago

Last modified 5 years ago

#852 closed bug (fixed)

Browsing a module in ghci can cause a panic

Reported by: mnislaih Owned by:
Priority: normal Milestone: 6.6
Component: Driver Version: 6.5
Keywords: ghci module package Cc:
Operating System: MacOS X Architecture: x86
Type of failure: Test Case:
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description

Consider a file Test2.hs containing

module Test.Test2 where
...

Then, in the ghci prompt:

> :l Test2
> :b Test2

results in a panic in my 6.5 (08 Aug) system:

*main:Test.Test2> :b Test2
Could not find module `Test2':ghc-6.5: panic! (the 'impossible' happened)
  (GHC version 6.5 for i386-apple-darwin):
        cantFindErr

Change History (3)

comment:1 Changed 9 years ago by mnislaih

  • Version changed from 6.4.2 to 6.5

comment:2 Changed 9 years ago by simonmar

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

This no longer crashes:

*Test.Test2> :b Test2
module main:Test2 is not loaded

The problem here is that the file Test2.hs contains the wrong module name. GHC is confused: you asked to browse a module called Test2, and it found a file that should contain it, but it knows that the current session does not contain a module called Test2 so it refuses to browse it.

The error message is slightly cryptic but I don't see an easy way to improve it.

comment:3 Changed 5 years ago by simonmar

  • difficulty changed from Easy (1 hr) to Easy (less than 1 hour)
Note: See TracTickets for help on using tickets.