[project @ 2002-04-24 09:42:18 by simonmar]
[ghc-hetmet.git] / ghc / compiler / ghci / InteractiveUI.hs
index 99f98dc..8d3bd96 100644 (file)
@@ -1,6 +1,6 @@
 {-# OPTIONS -#include "Linker.h" -#include "SchedAPI.h" #-}
 -----------------------------------------------------------------------------
--- $Id: InteractiveUI.hs,v 1.117 2002/04/02 10:18:07 simonmar Exp $
+-- $Id: InteractiveUI.hs,v 1.121 2002/04/24 09:42:18 simonmar Exp $
 --
 -- GHC Interactive User Interface
 --
@@ -273,10 +273,10 @@ interactiveLoop is_tty = do
 
 checkPerms :: String -> IO Bool
 checkPerms name =
-  DriverUtil.handle (\_ -> return False) $ do
 #ifdef mingw32_TARGET_OS
-     doesFileExist name
+  return True
 #else
+  DriverUtil.handle (\_ -> return False) $ do
      st <- getFileStatus name
      me <- getRealUserID
      if fileOwner st /= me then do
@@ -317,7 +317,7 @@ stringLoop (s:ss) = do
                  if quit then return () else stringLoop ss
 
 mkPrompt toplevs exports
-   = concat (intersperse " " (toplevs ++ map ('*':) exports)) ++ "> "
+   = concat (intersperse " " (map ('*':) toplevs ++ exports)) ++ "> "
 
 #if HAVE_READLINE_HEADERS && HAVE_READLINE_LIBS
 readlineLoop :: GHCi ()
@@ -717,12 +717,12 @@ newContext mods = do
   setCmState cms'
 
 separate cmstate []           as bs = return (as,bs)
-separate cmstate (('*':m):ms) as bs = separate cmstate ms (m:as) bs
-separate cmstate (m:ms)       as bs = do 
+separate cmstate (('*':m):ms) as bs = do
    b <- io (cmModuleIsInterpreted cmstate m)
-   if b then separate cmstate ms as (m:bs)
+   if b then separate cmstate ms (m:as) bs
        else throwDyn (CmdLineError ("module `" ++ m ++ "' is not interpreted"))
-       
+separate cmstate (m:ms)       as bs = separate cmstate ms as (m:bs)
+
 prel = "Prelude"
 
 
@@ -1063,7 +1063,7 @@ linkPackages dflags cmdline_lib_specs pkgs
 
 -- Packages that don't need loading, because the compiler shares them with
 -- the interpreted program.
-dont_load_these = [ "gmp", "rts" ]
+dont_load_these = [ "rts" ]
 
 -- Packages that are already linked into GHCi.  For mingw32, we only
 -- skip gmp and rts, since std and after need to load the msvcrt.dll