+ no_hs_main <- readIORef v_NoHsMain
+
+ -- Issue a warning for the confusing case where the user
+ -- said '-o foo' but we're not going to do any linking.
+ -- We attempt linking if either (a) one of the modules is
+ -- called Main, or (b) the user said -no-hs-main, indicating
+ -- that main() is going to come from somewhere else.
+ --
+ let do_linking = a_root_is_Main || no_hs_main
+ when (ghci_mode == Batch && isJust ofile && not do_linking