summaryrefslogtreecommitdiff
path: root/ghc
diff options
context:
space:
mode:
authorPaolo Capriotti <p.capriotti@gmail.com>2012-09-02 17:40:51 +0100
committerPaolo Capriotti <p.capriotti@gmail.com>2012-09-03 10:52:54 +0100
commit6def8bcf537eda726e7ae493a3fb73104ee129e5 (patch)
tree391a5200c62f732fc25a1f9ad542b26bf3fb9d4d /ghc
parentdb5c6adc0c39a9ea997adca821fc7561afe1d500 (diff)
downloadhaskell-6def8bcf537eda726e7ae493a3fb73104ee129e5.tar.gz
Disable the MR by default in GHCi (#3202)
Diffstat (limited to 'ghc')
-rw-r--r--ghc/InteractiveUI.hs8
1 files changed, 6 insertions, 2 deletions
diff --git a/ghc/InteractiveUI.hs b/ghc/InteractiveUI.hs
index 9eab445191..60748ba1c0 100644
--- a/ghc/InteractiveUI.hs
+++ b/ghc/InteractiveUI.hs
@@ -359,9 +359,13 @@ interactiveUI config srcs maybe_exprs = do
initInterpBuffering
-- The initial set of DynFlags used for interactive evaluation is the same
- -- as the global DynFlags, plus -XExtendedDefaultRules
+ -- as the global DynFlags, plus -XExtendedDefaultRules and
+ -- -XNoMonomorphismRestriction.
dflags <- getDynFlags
- GHC.setInteractiveDynFlags (xopt_set dflags Opt_ExtendedDefaultRules)
+ let dflags' = (`xopt_set` Opt_ExtendedDefaultRules)
+ . (`xopt_unset` Opt_MonomorphismRestriction)
+ $ dflags
+ GHC.setInteractiveDynFlags dflags'
liftIO $ when (isNothing maybe_exprs) $ do
-- Only for GHCi (not runghc and ghc -e):