{-# 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
--
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
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 ()
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"
-- 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