From 3e4f49b04e6e97256b4d34221e209e1051bf06ae Mon Sep 17 00:00:00 2001 From: Muhaimin Ahsan Date: Fri, 21 Nov 2014 11:31:44 -0600 Subject: Fixes ghci :unset -X 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: https://phabricator.haskell.org/D516 GHC Trac Issues: #9293 --- ghc/InteractiveUI.hs | 1 + 1 file changed, 1 insertion(+) (limited to 'ghc/InteractiveUI.hs') diff --git a/ghc/InteractiveUI.hs b/ghc/InteractiveUI.hs index f5a1bbe938..7fdda0b0fd 100644 --- a/ghc/InteractiveUI.hs +++ b/ghc/InteractiveUI.hs @@ -2182,6 +2182,7 @@ unsetOptions str ] no_flag ('-':'f':rest) = return ("-fno-" ++ rest) + no_flag ('-':'X':rest) = return ("-XNo" ++ rest) no_flag f = throwGhcException (ProgramError ("don't know how to reverse " ++ f)) in if (not (null rest3)) -- cgit v1.2.1