Opened 11 years ago

Closed 11 years ago

Last modified 8 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: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


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):

Change History (3)

comment:1 Changed 11 years ago by mnislaih


comment:2 Changed 11 years ago by simonmar

Resolution: fixed
Status: newclosed

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 8 years ago by simonmar

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