packages feed

dead-code-detection 0.1.2 → 0.2

raw patch · 3 files changed

+4/−5 lines, 3 files

Files

dead-code-detection.cabal view
@@ -3,7 +3,7 @@ -- see: https://github.com/sol/hpack  name:           dead-code-detection-version:        0.1.2+version:        0.2 synopsis:       detect dead code in haskell projects description:    detect dead code in haskell projects category:       Development
src/Ast.hs view
@@ -138,8 +138,7 @@  instance NameGraph (HsGroup Name) where   nameGraph group =-    nameGraph (hs_valds group) ++-    map (, []) (boundNames (hs_tyclds group))+    nameGraph (hs_valds group)  instance NameGraph (HsValBinds Name) where   nameGraph = \ case
test/AstSpec.hs view
@@ -145,12 +145,12 @@           parseStringGraph ["Foo.hs"] `shouldReturn`             Graph [] [] -      it "does detect selectors" $ do+      it "ignores selectors" $ do         withFooHeader [i|           data A = A { foo :: () }         |] $ do           boundNames <- map fst <$> usageGraph <$> parseStringGraph ["Foo.hs"]-          boundNames `shouldContain` ["Foo.foo"]+          boundNames `shouldBe` []        it "does not detect selectors starting with _" $ do         withFooHeader [i|