hackage-meta: some scripts for filling out missing bounds

This commit is contained in:
Daniel Gröber
2016-10-30 22:45:44 +01:00
parent 27feb31e18
commit 3bb2e26b4d
4 changed files with 157 additions and 0 deletions

11
scripts/diff.hs Normal file
View File

@@ -0,0 +1,11 @@
import Data.Tuple
import System.FilePath
import System.Environment
import System.Process
main = do
vs <- lines <$> getContents
[pkg, dir] <- getArgs
mapM_ system $ map (\(v1, v2) -> "diff -u --color=always " ++ file pkg dir v1 ++ " " ++ file pkg dir v2 ++ "; echo; echo; echo") $ map swap $ drop 1 vs `zip` vs
where
file pkg dir v = dir </> (pkg ++ "-" ++ v) <.> "cabal"