packages feed

ghcid 0.6.9 → 0.6.10

raw patch · 5 files changed

+27/−9 lines, 5 filesdep ~basedep ~directorydep ~extraPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: base, directory, extra

API changes (from Hackage documentation)

Files

CHANGES.txt view
@@ -1,5 +1,10 @@ Changelog for ghcid +0.6.10, released 2018-02-06+    #96, make it work even if -fdiagnostics-color is active+    #130, pass -fno-it to reduce memory leaks+    #132, work even if -fhide-source-paths is set+    Add isLoading function to test the constructor 0.6.9, released 2018-01-26     #121, add a --poll flag to use polling instead of notifiers     Require time-1.5 or above
ghcid.cabal view
@@ -1,7 +1,7 @@ cabal-version:      >= 1.18 build-type:         Simple name:               ghcid-version:            0.6.9+version:            0.6.10 license:            BSD3 license-file:       LICENSE category:           Development@@ -29,7 +29,7 @@         base >= 4,         filepath,         time >= 1.5,-        directory,+        directory >= 1.2,         extra >= 1.2,         process >= 1.1,         cmdargs >= 0.10@@ -51,7 +51,7 @@         base == 4.*,         filepath,         time >= 1.5,-        directory,+        directory >= 1.2,         containers,         fsnotify,         extra >= 1.2,@@ -83,7 +83,7 @@         base >= 4,         filepath,         time >= 1.5,-        directory,+        directory >= 1.2,         process,         containers,         fsnotify,
src/Language/Haskell/Ghcid.hs view
@@ -160,12 +160,20 @@                 writeInp "import qualified System.IO as INTERNAL_GHCID"                 writeInp $ ":set prompt " ++ ghcid_prefix                 writeInp ":set -v1 -fno-break-on-exception -fno-break-on-error" -- see #43 and #110+                writeInp ":set -fdiagnostics-color=never" -- see #96+                writeInp ":set -fno-hide-source-paths" -- see #132+                    -- only works with GHC 8.2 and above, but failing isn't harmful+                -- writeInp ":set -fno-it" -- see #130+                    -- only works with GHC 8.6 and above, but failing isn't harmful                 writeIORef sync =<< syncFresh             echo0 strm s             return Nothing-    r <- parseLoad . reverse <$> ((++) <$> readIORef stderr <*> readIORef stdout)+    r1 <- parseLoad . reverse <$> ((++) <$> readIORef stderr <*> readIORef stdout)+    -- see #132, if hide-source-paths was turned on the modules didn't get printed out properly+    -- so try a showModules to capture the information again+    r2 <- if any isLoading r1 then return [] else map (uncurry Loading) <$> showModules ghci     execStream ghci "" echo0-    return (ghci, r)+    return (ghci, r1 ++ r2)   -- | Execute a command, calling a callback on each response.
src/Language/Haskell/Ghcid/Types.hs view
@@ -4,7 +4,7 @@ module Language.Haskell.Ghcid.Types(     GhciError(..),     Stream(..),-    Load(..), Severity(..), isMessage+    Load(..), Severity(..), isMessage, isLoading     ) where  import Data.Data@@ -43,3 +43,8 @@ isMessage :: Load -> Bool isMessage Message{} = True isMessage _ = False++-- | Is a Load a module and filename?+isLoading :: Load -> Bool+isLoading Loading{} = True+isLoading _ = False
src/Wait.hs view
@@ -47,7 +47,7 @@ waitFiles :: Waiter -> IO ([FilePath] -> IO [String]) waitFiles waiter = do     base <- getCurrentTime-    return $ \files -> handle (\(e :: IOError) -> do sleep 0.1; return [show e]) $ do+    return $ \files -> handle (\(e :: IOError) -> do sleep 1.0; return ["Error when waiting, if this happens repeatedly, raise a ghcid bug.",show e]) $ do         whenLoud $ outStrLn $ "%WAITING: " ++ unwords files         files <- fmap concat $ forM files $ \file ->             ifM (doesDirectoryExist file) (listFilesInside (return . not . isPrefixOf "." . takeFileName) file) (return [file])@@ -92,4 +92,4 @@   canonicalizePathSafe :: FilePath -> IO FilePath-canonicalizePathSafe x = canonicalizePath x `catch_` const (return x)+canonicalizePathSafe x = canonicalizePath x `catch` \(_ :: IOError) -> return x