File tree 2 files changed +8
-2
lines changed
2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -323,7 +323,13 @@ runGhci GhciOpts{..} targets mainIsTargets pkgs extraFiles exposePackages = do
323
323
fromMaybe (not (null pkgs && null exposePackages)) ghciHidePackages
324
324
hidePkgOpts =
325
325
if shouldHidePackages
326
- then " -hide-all-packages" : concatMap (\ n -> [" -package" , packageNameString n]) exposePackages
326
+ then " -hide-all-packages" :
327
+ -- This is necessary, because current versions of ghci
328
+ -- will entirely fail to start if base isn't visible. This
329
+ -- is because it tries to use the interpreter to set
330
+ -- buffering options on standard IO.
331
+ " -package" : " base" :
332
+ concatMap (\ n -> [" -package" , packageNameString n]) exposePackages
327
333
else []
328
334
oneWordOpts bio
329
335
| shouldHidePackages = bioOneWordOpts bio ++ bioPackageFlags bio
Original file line number Diff line number Diff line change @@ -52,6 +52,6 @@ ghciOptsParser = GhciOpts
52
52
<*> switch (long " load-local-deps" <> help " Load all local dependencies of your targets" )
53
53
-- TODO: deprecate this? probably useless.
54
54
<*> switch (long " skip-intermediate-deps" <> help " Skip loading intermediate target dependencies" <> internal)
55
- <*> optional (boolFlags True " package-hiding" " package hiding" idm)
55
+ <*> optional (boolFlagsNoDefault " package-hiding" " package hiding" idm)
56
56
<*> switch (long " no-build" <> help " Don't build before launching GHCi" <> internal)
57
57
<*> switch (long " only-main" <> help " Only load and import the main module. If no main module, no modules will be loaded." )
You can’t perform that action at this time.
0 commit comments