ghcid 0.6.7 → 0.6.8
raw patch · 4 files changed
+20/−4 lines, 4 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGES.txt +3/−0
- ghcid.cabal +3/−1
- src/Ghcid.hs +13/−2
- src/Language/Haskell/Ghcid.hs +1/−1
CHANGES.txt view
@@ -1,5 +1,8 @@ Changelog for ghcid +0.6.8+ #110, work even if -v0 is passed to ghci+ Read additional arguments from .ghcid file if present 0.6.7 #104, add --ignore-loaded flag for use with -fobject-code #103, deal with new GHC error formatting
ghcid.cabal view
@@ -1,7 +1,7 @@ cabal-version: >= 1.18 build-type: Simple name: ghcid-version: 0.6.7+version: 0.6.8 license: BSD3 license-file: LICENSE category: Development@@ -73,6 +73,7 @@ Language.Haskell.Ghcid.Terminal Language.Haskell.Ghcid.Util Language.Haskell.Ghcid+ Paths_ghcid Session Wait @@ -107,6 +108,7 @@ Language.Haskell.Ghcid.Terminal Language.Haskell.Ghcid.Types Language.Haskell.Ghcid.Util+ Paths_ghcid Session Test.API Test.Ghcid
src/Ghcid.hs view
@@ -14,11 +14,13 @@ import Session import qualified System.Console.Terminal.Size as Term import System.Console.CmdArgs+import System.Console.CmdArgs.Explicit import System.Console.ANSI+import System.Environment import System.Directory.Extra import System.Exit import System.FilePath-import System.IO+import System.IO.Extra import Paths_ghcid import Language.Haskell.Ghcid.Terminal@@ -126,14 +128,23 @@ escape x | ' ' `elem` x = "\"" ++ x ++ "\"" | otherwise = x +-- | Use arguments from .ghcid if present+withGhcidArgs :: IO a -> IO a+withGhcidArgs act = do+ b <- doesFileExist ".ghcid"+ if not b then act else do+ extra <- concatMap splitArgs . lines <$> readFile' ".ghcid"+ orig <- getArgs+ withArgs (extra ++ orig) act + -- | Like 'main', but run with a fake terminal for testing mainWithTerminal :: IO (Int,Int) -> ([(Style,String)] -> IO ()) -> IO () mainWithTerminal termSize termOutput = withWindowIcon $ withSession $ \session -> do -- On certain Cygwin terminals stdout defaults to BlockBuffering hSetBuffering stdout LineBuffering hSetBuffering stderr NoBuffering- opts <- cmdArgsRun options+ opts <- withGhcidArgs $ cmdArgsRun options withCurrentDirectory (directory opts) $ do opts <- autoOptions opts opts <- return $ opts{restart = nubOrd $ restart opts, reload = nubOrd $ reload opts}
src/Language/Haskell/Ghcid.hs view
@@ -159,7 +159,7 @@ writeIORef stderr [] writeInp "import qualified System.IO as INTERNAL_GHCID" writeInp $ ":set prompt " ++ ghcid_prefix- writeInp ":set -fno-break-on-exception -fno-break-on-error" -- see #43+ writeInp ":set -v1 -fno-break-on-exception -fno-break-on-error" -- see #43 and #110 writeIORef sync =<< syncFresh echo0 strm s return Nothing