packages feed

weeder 0.1.5 → 0.1.6

raw patch · 4 files changed

+11/−7 lines, 4 files

Files

CHANGES.txt view
@@ -1,5 +1,7 @@ Changelog for Weeder +0.1.6+    #10, find files generated by alex/happy 0.1.5     If --yaml and no hints give no output 0.1.4
src/Cabal.hs view
@@ -27,9 +27,9 @@         [x] -> return x         _ -> fail $ "Didn't find exactly 1 cabal file in " ++ dir --- | Return the (exposed Hi files, internal Hi files)-selectHiFiles :: Map.HashMap FilePath a -> CabalSection -> ([a], [a], [ModuleName])-selectHiFiles his sect@CabalSection{..} = (external, internal, bad1++bad2)+-- | Return the (exposed Hi files, internal Hi files, not found)+selectHiFiles :: FilePath -> Map.HashMap FilePath a -> CabalSection -> ([a], [a], [ModuleName])+selectHiFiles distDir his sect@CabalSection{..} = (external, internal, bad1++bad2)     where         (bad1, external) = partitionEithers $             [findHi his sect $ Left cabalMainIs | cabalMainIs /= ""] ++@@ -42,8 +42,10 @@             where                 mname = either takeFileName id name                 poss = [ normalise $ joinPath (root : x : either (return . dropExtension) (splitOn ".") name) <.> "dump-hi"-                    | root <- ["build" </> x </> (x ++ "-tmp") | Just x <- [cabalSectionTypeName cabalSectionType]] ++ ["build"]-                    , x <- if null cabalSourceDirs then ["."] else cabalSourceDirs]+                    | extra <- [".",distDir]+                    , root <- ["build" </> extra </> x </> (x ++ "-tmp") | Just x <- [cabalSectionTypeName cabalSectionType]] +++                              ["build", "build" </> distDir </> "build"]+                    , x <- cabalSourceDirs ++ ["."]]   data Cabal = Cabal
src/Main.hs view
@@ -47,7 +47,7 @@     res <- forM cabals $ \(cabalFile, Cabal{..}) -> do         (fileToKey, keyToHi) <- hiParseDirectory $ takeDirectory cabalFile </> stackDistDir         let full = check (keyToHi Map.!) cabalName $-                   map (id &&& selectHiFiles fileToKey) cabalSections+                   map (id &&& selectHiFiles stackDistDir fileToKey) cabalSections         let warn = if cmdShowAll || cmdMatch then full else ignoreWarnings ignore full         unless quiet $             putStrLn $ unlines $ showWarningsPretty cabalName warn
weeder.cabal view
@@ -1,7 +1,7 @@ cabal-version:      >= 1.18 build-type:         Simple name:               weeder-version:            0.1.5+version:            0.1.6 license:            BSD3 license-file:       LICENSE category:           Development