Opened 6 years ago

Closed 5 years ago

#2210 closed bug (fixed)

ghci gets into weird state if loading a module with a bad LANGUAGE pragma

Reported by: bos Owned by:
Priority: normal Milestone: 6.12 branch
Component: GHCi Version: 6.8.2
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

Try loading a module like this into ghci:

{-# LANGUAGE BreakMe #-}

This gets ghci into an odd wedged state, with a strange prompt, in which Prelude is not available.

Change History (5)

comment:1 Changed 6 years ago by igloo

  • Component changed from Compiler to GHCi
  • Difficulty set to Unknown
  • Milestone set to 6.10 branch

Thanks for the report. GHCi is actually perfectly happy, it just hasn't got Prelude in scope. If you type :m + Prelude then all will be well.

However, we ought to be consistent with what we do when we fail for other reasons (i.e. Prelude ought to be in scope in this case).

comment:2 Changed 6 years ago by simonmar

  • Architecture changed from Unknown to Unknown/Multiple

comment:3 Changed 6 years ago by simonmar

  • Operating System changed from Unknown to Unknown/Multiple

comment:4 Changed 5 years ago by igloo

  • Milestone changed from 6.10 branch to 6.12 branch

comment:5 Changed 5 years ago by igloo

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

This is fixed in the HEAD:

b.hs:1:13: unsupported extension: BreakMe
Failed, modules loaded: none.
Prelude> 
Note: See TracTickets for help on using tickets.