git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Removed excess loading of prelude filename.
commit863bfb431bfc69b7cc3b5cf38bd1be52ff0dcc3d authorjoneshf <jones3.hardy@gmail.com> dateMon 24 Feb 2014, 18:05 (13 years ago) parent0af5229
1 file changed+4−5
psci/Main.hs+4−5
psci/Main.hs+4−5
@@ -219,7 +219,7 @@ handleDeclaration value st = do
219219 Left err -> outputStrLn err
220220 Right (js, _, _) -> do
221221 process <- lift . lift $ findNodeProcess
222− result <- lift . lift $ traverse (\node -> readProcessWithExitCode node [] js) process
222+ result <- lift . lift $ traverse (\node -> readProcessWithExitCode node [] js) process
223223 case result of
224224 Just (ExitSuccess, out, _) -> outputStrLn out
225225 Just (ExitFailure _, _, err) -> outputStrLn err
@@ -259,9 +259,9 @@ getCommand = do
259259--
260260handleCommand :: Command -> InputT (StateT PSCiState IO) ()
261261handleCommand (Expression val) = lift get >>= handleDeclaration val
262−handleCommand (Let l) = lift $ modify (updateLets l)
263262handleCommand Help = outputStrLn helpMessage
264263handleCommand (Import moduleName) = lift $ modify (updateImports moduleName)
264+handleCommand (Let l) = lift $ modify (updateLets l)
265265handleCommand (LoadFile filePath) = do
266266 absPath <- lift . lift $ expandTilde filePath
267267 exists <- lift . lift $ doesFileExist absPath
@@ -271,12 +271,11 @@ handleCommand (LoadFile filePath) = do
271271 else
272272 outputStrLn $ "Couldn't locate: " ++ filePath
273273handleCommand Reset = do
274− preludeFilename <- lift . lift $ getPreludeFilename
275274 files <- psciImportedFilenames <$> lift get
276− modulesOrFirstError <- fmap concat . sequence <$> mapM (lift . lift . loadModule) (preludeFilename : files)
275+ modulesOrFirstError <- fmap concat . sequence <$> mapM (lift . lift . loadModule) files
277276 case modulesOrFirstError of
278277 Left err -> lift . lift $ putStrLn err >> exitFailure
279− Right modules -> lift $ put (PSCiState (preludeFilename : files) defaultImports modules [])
278+ Right modules -> lift $ put (PSCiState files defaultImports modules [])
280279handleCommand (TypeOf val) = lift get >>= handleTypeOf val
281280handleCommand _ = outputStrLn "Unknown command"
282281