@@ -231,9 +231,9 @@ makeIO = Make . ErrorT . fmap (either (Left . show) Right) . tryIOError
231instance P.MonadMake Make where
231instance P.MonadMake Make where
232 getTimestamp path = makeIO $ do
232 getTimestamp path = makeIO $ do
233 exists <- doesFileExist path
233 exists <- doesFileExist path
234− case exists of
234+ if exists
235− True -> Just <$> getModificationTime path
235+ then Just <$> getModificationTime path
236− False -> return Nothing
236+ else return Nothing
237 readTextFile path = makeIO $ U.readFile path
237 readTextFile path = makeIO $ U.readFile path
238 writeTextFile path text = makeIO $ do
238 writeTextFile path text = makeIO $ do
239 mkdirp path
239 mkdirp path
@@ -302,7 +302,7 @@ handleDeclaration value = do
302 case e of
302 case e of
303 Left err -> PSCI $ outputStrLn err
303 Left err -> PSCI $ outputStrLn err
304 Right _ -> do
304 Right _ -> do
305− psciIO $ writeFile indexFile $ "require('$PSCI').main();"
305+ psciIO $ writeFile indexFile "require('$PSCI').main();"
306 process <- psciIO findNodeProcess
306 process <- psciIO findNodeProcess
307 result <- psciIO $ traverse (\node -> readProcessWithExitCode node [indexFile] "") process
307 result <- psciIO $ traverse (\node -> readProcessWithExitCode node [indexFile] "") process
308 case result of
308 case result of
@@ -472,7 +472,7 @@ handleCommand Reset = do
472 files <- psciImportedFilenames <$> PSCI (lift get)
472 files <- psciImportedFilenames <$> PSCI (lift get)
473 modulesOrFirstError <- psciIO $ loadAllModules files
473 modulesOrFirstError <- psciIO $ loadAllModules files
474 case modulesOrFirstError of
474 case modulesOrFirstError of
475− Left err -> psciIO $ putStrLn (show err) >> exitFailure
475+ Left err -> psciIO $ print err >> exitFailure
476 Right modules -> PSCI . lift $ put (PSCiState files defaultImports modules [])
476 Right modules -> PSCI . lift $ put (PSCiState files defaultImports modules [])
477handleCommand (TypeOf val) = handleTypeOf val
477handleCommand (TypeOf val) = handleTypeOf val
478handleCommand (KindOf typ) = handleKindOf typ
478handleCommand (KindOf typ) = handleKindOf typ
@@ -513,7 +513,7 @@ loop singleLineMode files = do
513 config <- loadUserConfig
513 config <- loadUserConfig
514 modulesOrFirstError <- loadAllModules files
514 modulesOrFirstError <- loadAllModules files
515 case modulesOrFirstError of
515 case modulesOrFirstError of
516− Left err -> putStrLn (show err) >> exitFailure
516+ Left err -> print err >> exitFailure
517 Right modules -> do
517 Right modules -> do
518 historyFilename <- getHistoryFilename
518 historyFilename <- getHistoryFilename
519 let settings = defaultSettings { historyFile = Just historyFilename }
519 let settings = defaultSettings { historyFile = Just historyFilename }