Opened 4 years ago

Closed 4 years ago

#9293 closed bug (fixed)

GHCI :unset -XLanguageExtension returns "don't know how to reverse -XLanguageExtension"

Reported by: jfeltz Owned by: leroux
Priority: normal Milestone: 7.10.1
Component: GHCi Version: 7.8.2
Keywords: newcomer Cc: hvr
Operating System: Unknown/Multiple Architecture: x86
Type of failure: None/Unknown Test Case: ghci/scripts/T9293
Blocked By: Blocking:
Related Tickets: Differential Rev(s): Phab:D516
Wiki Page:


Any language extension tried appears to not work with :unset. To make matters worse, :unset expands to a number of options, misleading the user into thinking that it should (if that is the case). I eventually had to ask someone on IRC #haskell, leading to the :set -XNoLanguageExtension trick to do what I needed. A fix to :unset is suggested, or removing the misleading/non-working command.

Change History (7)

comment:1 Changed 4 years ago by nomeata

Is :unset -XExt the same as :set -XNoExt? Probably not for extensions that are on by default.

This looks like a ticket suitable for new contributors to GHC.

comment:2 Changed 4 years ago by thomie

Keywords: newcomer added

Also consider :unset -XNoExt.

comment:3 Changed 4 years ago by leroux

Owner: set to leroux

comment:4 Changed 4 years ago by leroux

Test Case: :set -XCPP followed by :unset -XCPPT9293

comment:5 Changed 4 years ago by leroux

Differential Rev(s): Phab:D516
Status: newpatch

Patch that essentially rewrites :unset -X<ext> to :set -XNo<ext>.

comment:6 Changed 4 years ago by Austin Seipp <austin@…>

In 3e4f49b04e6e97256b4d34221e209e1051bf06ae/ghc:

Fixes ghci :unset -X<ext> so that it doesn't fail to reverse option. (fixes trac #9293)

Summary: ghci unset could not reverse language extensions.

Reviewers: hvr, thomie, austin

Reviewed By: hvr, thomie, austin

Subscribers: goldfire, hvr, thomie, carter

Differential Revision:

GHC Trac Issues: #9293

comment:7 Changed 4 years ago by thomie

Milestone: 7.10.1
Resolution: fixed
Status: patchclosed
Test Case: T9293ghci/scripts/T9293
Note: See TracTickets for help on using tickets.