packages feed

ghcid 0.7.6 → 0.7.7

raw patch · 4 files changed

+14/−10 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGES.txt view
@@ -1,5 +1,7 @@ Changelog for ghcid (* = breaking change) +0.7.7, released 2019-11-24+    #287, only lint reloaded files 0.7.6, released 2019-10-13     #283, support Clashi     #278, allow --lint to take a shell command rather than just an executable@@ -8,7 +10,7 @@     #263, fix not resizing on terminal resize     #262, add --test-message flag     #253, try and keep the cursor visible after Ctrl-C-    #248, add --eval flag to evaluate code snippets+    #248, add --allow-eval flag to evaluate code snippets     #245, link with -rtsopts to be able to use RTS flags 0.7.4, released 2019-04-17     #237, ability to cope better with large error messages
ghcid.cabal view
@@ -1,7 +1,7 @@ cabal-version:      >= 1.18 build-type:         Simple name:               ghcid-version:            0.7.6+version:            0.7.7 license:            BSD3 license-file:       LICENSE category:           Development
src/Ghcid.hs view
@@ -306,8 +306,8 @@      project <- if project /= "" then return project else takeFileName <$> getCurrentDirectory -    -- fire, given a waiter, the messages/loaded-    let fire nextWait (messages, loaded) = do+    -- fire, given a waiter, the messages/loaded/touched+    let fire nextWait (messages, loaded, touched) = do             currTime <- getShortTime             let loadedCount = length loaded             whenLoud $ do@@ -366,7 +366,7 @@                         whenNormal $ outStrLn "\n...done"             whenJust lint $ \lintcmd ->                 unless hasErrors $ do-                    (exitcode, stdout, stderr) <- readCreateProcessWithExitCode (shell . unwords $ lintcmd : map escape loaded) ""+                    (exitcode, stdout, stderr) <- readCreateProcessWithExitCode (shell . unwords $ lintcmd : map escape touched) ""                     unless (exitcode == ExitSuccess) $ outStrLn (stdout ++ stderr)              reason <- nextWait $ restart ++ reload ++ loaded@@ -383,7 +383,7 @@                 nextWait <- waitFiles waiter                 fire nextWait =<< sessionReload session -    fire nextWait (messages, loaded)+    fire nextWait (messages, loaded, loaded)   -- | Given an available height, and a set of messages to display, show them as best you can.
src/Session.hs view
@@ -150,7 +150,7 @@         forM cmds' $ \(num, cmd) -> do             ref <- newIORef []             execStream ghci (unwords $ lines cmd) $ \_ resp -> modifyIORef ref (resp :)-            resp <- concat . reverse <$> readIORef ref+            resp <- unlines . reverse <$> readIORef ref             return $ Eval $ EvalResult file (num, 1) cmd resp  @@ -179,7 +179,7 @@ -- | Reload, returning the same information as 'sessionStart'. In particular, any --   information that GHCi doesn't repeat (warnings from loaded modules) will be --   added back in.-sessionReload :: Session -> IO ([Load], [FilePath])+sessionReload :: Session -> IO ([Load], [FilePath], [FilePath]) sessionReload session@Session{..} = do     -- kill anything async, set stuck if you didn't succeed     old <- modifyVar running $ \b -> return (False, b)@@ -187,7 +187,9 @@         Just ghci <- readIORef ghci         fmap isNothing $ timeout 5 $ interrupt ghci -    if stuck then sessionRestart session else do+    if stuck+      then (\(messages,loaded) -> (messages,loaded,loaded)) <$> sessionRestart session+      else do         -- actually reload         Just ghci <- readIORef ghci         dir <- readIORef curdir@@ -203,7 +205,7 @@         messages <- return $ messages ++ filter validWarn warn          writeIORef warnings $ getWarnings messages-        return (messages ++ evals, nubOrd $ loaded ++ reloaded)+        return (messages ++ evals, nubOrd (loaded ++ reloaded), reloaded)   -- | Run an exec operation asynchronously. Should not be a @:reload@ or similar.