weeder 0.1.11 → 0.1.12
raw patch · 5 files changed
+12/−22 lines, 5 filesdep ~foundation
Dependency ranges changed: foundation
Files
- CHANGES.txt +2/−0
- LICENSE +1/−1
- src/CmdLine.hs +2/−2
- src/Str.hs +3/−15
- weeder.cabal +4/−4
CHANGES.txt view
@@ -1,5 +1,7 @@ Changelog for Weeder +0.1.12, released 2018-01-16+ Make available on Mac 0.1.11, released 2017-12-29 #29, deal with case-insensitive FilePath on Windows 0.1.10, released 2017-12-28
LICENSE view
@@ -1,4 +1,4 @@-Copyright Neil Mitchell 2017.+Copyright Neil Mitchell 2017-2018. All rights reserved. Redistribution and use in source and binary forms, with or without
src/CmdLine.hs view
@@ -30,7 +30,7 @@ automatic cmd | cmdTest cmd = cmd{cmdTest=False,cmdProjects=["test"],cmdBuild=True,cmdMatch=True} | null $ cmdProjects cmd = cmd{cmdProjects=["."]}- | otherwise = cmd + | otherwise = cmd mode :: Mode (CmdArgs Cmd) mode = cmdArgsMode $ Cmd@@ -43,6 +43,6 @@ ,cmdShowAll = nam "show-all" &= help "Show even ignored warnings" ,cmdDistDir = nam "dist-dir" &= typDir &= help "Stack dist-dir, defaults to 'stack path --dist-dir'" } &= explicit &= name "weeder" &= verbosity- &= summary ("Weeder v" ++ showVersion version ++ ", (C) Neil Mitchell 2017")+ &= summary ("Weeder v" ++ showVersion version ++ ", (C) Neil Mitchell 2017-2018") where nam xs = def &= explicit &= name xs &= name [head xs]
src/Str.hs view
@@ -1,18 +1,15 @@-{-# LANGUAGE ViewPatterns #-} module Str( Str,- linesCR, stripPrefix,+ linesCR, readFileUTF8,- S.null, S.isPrefixOf, S.drop, S.span, S.length, S.toList, S.all, S.uncons,+ S.null, S.isPrefixOf, S.drop, S.span, S.length, S.toList, S.all, S.uncons, S.stripPrefix, ugly, showLength ) where import qualified Foundation as S import qualified Foundation.String as S import qualified Foundation.IO as S-import qualified Foundation.Conduit as C-import qualified Foundation.Conduit.Textual as C import Data.Tuple.Extra @@ -21,20 +18,11 @@ showLength :: S.CountOf a -> String showLength (S.CountOf x) = show x -stripPrefix :: Str -> Str -> Maybe Str-stripPrefix (S.toBytes S.UTF8 -> pre) (S.toBytes S.UTF8 -> x) =- if pre `S.isPrefixOf` x then Just $ S.fromBytesUnsafe $ S.drop (S.length pre) x else Nothing--removeR :: Str -> Str-removeR s | Just (s, c) <- S.unsnoc s, c == '\r' = s- | otherwise = s- linesCR :: Str -> [Str]-linesCR s = map removeR $ C.runConduitPure (C.yield s C..| C.lines C..| C.sinkList)+linesCR = S.lines ugly :: S.Integral a => Integer -> a ugly = S.fromInteger- readFileUTF8 :: FilePath -> IO Str readFileUTF8 = fmap (fst3 . S.fromBytes S.UTF8) . S.readFile . S.fromString
weeder.cabal view
@@ -1,13 +1,13 @@ cabal-version: >= 1.18 build-type: Simple name: weeder-version: 0.1.11+version: 0.1.12 license: BSD3 license-file: LICENSE category: Development author: Neil Mitchell <ndmitchell@gmail.com> maintainer: Neil Mitchell <ndmitchell@gmail.com>-copyright: Neil Mitchell 2017+copyright: Neil Mitchell 2017-2018 synopsis: Detect dead code description: Find redundant package dependencies or redundant module exports.@@ -16,7 +16,7 @@ extra-doc-files: README.md CHANGES.txt-tested-with: GHC==8.2.1, GHC==8.0.2, GHC==7.10.3, GHC==7.8.4+tested-with: GHC==8.2.1, GHC==8.0.2, GHC==7.10.3 source-repository head type: git@@ -42,7 +42,7 @@ aeson, yaml, bytestring,- foundation >= 0.0.10,+ foundation >= 0.0.13, process >= 1.2.3.0, extra other-modules: