packages feed

hackage-diff 0.1.0.0 → 0.1.0.1

raw patch · 2 files changed

+15/−10 lines, 2 filesdep ~Cabaldep ~base

Dependency ranges changed: Cabal, base

Files

Main.hs view
@@ -26,6 +26,7 @@ import qualified Data.Text as T import qualified Data.Text.IO as TI import Data.Attoparsec.Text hiding (try)+import Data.Attoparsec.Combinator (lookAhead) import Text.Printf import Distribution.PackageDescription import Distribution.PackageDescription.Parse@@ -84,8 +85,6 @@                                (either id id verA)                                (either id id verB)     outputDiff diff disableColor silentFlag-  where die :: String -> IO a-        die str = putStrLn str >> exitFailure  data FlagMode = ModeDownloadDB | ModeBuildDB | ModeParseHS                 deriving (Eq)@@ -102,7 +101,7 @@   where     header =       "hackage-diff | Compare the public API of different versions of a Hackage library\n" ++-      "github.com/blitzcode/hackage-diff | www.blitzcode.net | (C) 2014 Tim C. Schroeder\n\n" +++      "github.com/blitzcode/hackage-diff | www.blitzcode.net | (C) 2016 Tim C. Schroeder\n\n" ++       "Usage: " ++ prgName ++ " [options] <package-name> <old-version|path> <new-version|path>"     footer =       "\nExamples:\n" ++@@ -238,7 +237,9 @@     -- Parse     putS "Parsing Hoogle DBs..."     [parsedDBA, parsedDBB] <- forM [dbA, dbB] $ \db ->-        either throwError return $ parseOnly hoogleDBParser db+        either throwError return $ parseOnly (hoogleDBParser <* endOfInput) db+    -- Debug parser in GHCi: parseOnly hoogleDBParser <$> TI.readFile "base.txt" >>=+    --                           \(Right db) -> mapM_ (putStrLn . show) db     -- Compare     putS "Comparing Hoogle DBs..."     return $ diffHoogleDB parsedDBA parsedDBB@@ -497,10 +498,14 @@                     ( (DBNewtype <$> takeTill (`elem` [ ' ', '\n' ]) <* endOfLine <*> "") <|>                       (DBNewtype <$> takeTill (== ' ') <* skipSpace <*> tillEoL)                     )-    parseCtor     = do peekChar' >>= flip unless (fail "lowercase") . isAsciiUpper+                    -- TODO: At some point Hoogle DBs started to have Ctors and functions+                    --       names wrapped in brackets. Not sure what's up with that, just+                    --       parse them as part of the name so the parser doesn't stop+    parseCtor     = do void . lookAhead $ satisfy isAsciiUpper <|>+                                          (char '[' *> satisfy isAsciiUpper)                        DBCtor <$> takeTill (== ' ') <* string " :: " <*> tillEoL-    parseFunction = do peekChar' >>=-                           flip unless (fail "uppercase") . (\c -> isAsciiLower c || c == '(')+                    -- TODO: This doesn't parse function lists correctly+    parseFunction = do void . lookAhead $ satisfy isAsciiLower <|> char '[' <|> char '('                        DBFunction <$> takeTill (== ' ') <* string " :: " <*> tillEoL     parseInstance = do void $ string "instance "                        line <- T.words <$> tillEoL
hackage-diff.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/  name:                hackage-diff-version:             0.1.0.0+version:             0.1.0.1 synopsis:            Compare the public API of different versions of a Hackage library description:         Please see <https://github.com/blitzcode/hackage-diff github.com/blitzcode/hackage-diff> for a user's manual.                      .@@ -68,7 +68,7 @@ maintainer:          www.blitzcode.net homepage:            https://github.com/blitzcode/hackage-diff bug-reports:         https://github.com/blitzcode/hackage-diff/issues-copyright:           (C) 2014 Tim C. Schroeder+copyright:           (C) 2016 Tim C. Schroeder category:            Distribution build-type:          Simple -- extra-source-files:  @@ -82,7 +82,7 @@   main-is:             Main.hs   -- other-modules:   -- other-extensions:-  build-depends:       base             >=4.7 && <4.8,+  build-depends:       base             >=4.8 && <5.0,                        Cabal            >=1.20.0.0,                        haskell-src-exts >=1.15.0,                        ansi-terminal    >=0.6.1.1,