packages feed

hlint 1.9.34 → 1.9.35

raw patch · 5 files changed

+17/−7 lines, 5 filesdep ~extraPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: extra

API changes (from Hackage documentation)

Files

CHANGES.txt view
@@ -1,5 +1,9 @@ Changelog for HLint +1.9.35+    #245, fix parse error reports+    #243, update hlint.ghci to work with modern GHC+    Require extra-1.4.9 1.9.34     #154, fix some incorrect line numbers in literate Haskell     #161, fix literate Haskell and CPP
README.md view
@@ -97,7 +97,7 @@  ### GHCi Integration -GHCi integration has been provided by Gwern Branwen. The integration allows running `:hlint` from the GHCi prompt. The script is at [hlint.ghci](https://raw.githubusercontent.com/ndmitchell/hlint/master/data/hlint.ghci), and a copy is installed locally in the data directory. To use, add the contents to your [GHCi startup file](http://www.haskell.org/ghc/docs/latest/html/users_guide/ghci-dot-files.html).+GHCi integration has been provided by Gwern Branwen. The integration allows running `:hlint` from the GHCi prompt. The script is at [hlint.ghci](https://raw.githubusercontent.com/ndmitchell/hlint/master/data/hlint.ghci), and a copy is installed locally in the data directory. To use, add the contents to your [GHCi startup file](https://www.haskell.org/ghc/docs/latest/html/users_guide/ghci.html#the-ghci-and-haskeline-files).  ### Parallel Operation 
data/hlint.ghci view
@@ -8,11 +8,11 @@                 [":set -fno-print-bind-result"                 ,"tmp <- System.Directory.getTemporaryDirectory"                 ,"(f,h) <- System.IO.openTempFile tmp \"ghci\""-                ,"sto <- GHC.Handle.hDuplicate System.IO.stdout"-                ,"GHC.Handle.hDuplicateTo h System.IO.stdout"+                ,"sto <- GHC.IO.Handle.hDuplicate System.IO.stdout"+                ,"GHC.IO.Handle.hDuplicateTo h System.IO.stdout"                 ,"System.IO.hClose h"                 ,cmd-                ,"GHC.Handle.hDuplicateTo sto System.IO.stdout"+                ,"GHC.IO.Handle.hDuplicateTo sto System.IO.stdout"                 ,"let readFileNow f = readFile f >>= \\t->Data.List.length t `seq` return t"                 ,var++" <- readFileNow f"                 ,"System.Directory.removeFile f"
hlint.cabal view
@@ -1,7 +1,7 @@ cabal-version:      >= 1.8 build-type:         Simple name:               hlint-version:            1.9.34+version:            1.9.35 license:            BSD3 license-file:       LICENSE category:           Development@@ -52,7 +52,7 @@         haskell-src-exts >= 1.17 && < 1.18,         uniplate >= 1.5,         ansi-terminal >= 0.6.2,-        extra >= 0.5,+        extra >= 1.4.9,         refact >= 0.3      if flag(gpl)
src/HSE/All.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE ViewPatterns #-}  module HSE.All(     module X,@@ -52,7 +53,11 @@ runCpp :: CppFlags -> FilePath -> String -> IO String runCpp NoCpp _ x = return x runCpp CppSimple _ x = return $ unlines [if "#" `isPrefixOf` trimStart x then "" else x | x <- lines x]-runCpp (Cpphs o) file x = drop 1 . dropWhile (/= '\n') <$> runCpphs o file x+runCpp (Cpphs o) file x = dropLine <$> runCpphs o file x+    where+        -- LINE pragmas always inserted when locations=True+        dropLine (line1 -> (a,b)) | "{-# LINE " `isPrefixOf` a = b+        dropLine x = x   ---------------------------------------------------------------------@@ -76,6 +81,7 @@             ParseOk (x, cs) -> return $ Right (applyFixity fixity x, cs)             ParseFailed sl msg -> do                 -- figure out the best line number to grab context from, by reparsing+                -- but not generating {-# LINE #-} pragmas                 flags <- return $ parseFlagsNoLocations flags                 ppstr2 <- runCpp (cppFlags flags) file str                 let pe = case parseFileContentsWithMode (mode flags) ppstr2 of