smuggler 0.0.1 → 0.1.0
raw patch · 7 files changed
+74/−22 lines, 7 filesdep ~basedep ~bytestringdep ~containerssetup-changednew-component:exe:play-smuggler
Dependency ranges changed: base, bytestring, containers, filepath, ghc, ghc-exactprint, hash-store, unordered-containers
Files
- CHANGELOG.md +8/−1
- README.md +28/−5
- Setup.hs +0/−2
- smuggler.cabal +23/−14
- test/Test/ConstructorsUnused.hs +5/−0
- test/Test/WildcardUnused.hs +5/−0
- test/Test/WildcardUsed.hs +5/−0
CHANGELOG.md view
@@ -4,10 +4,17 @@ smuggler uses [PVP Versioning][1]. The change log is available [on GitHub][2]. +0.1.0+=====++* [#29](https://github.com/kowainik/smuggler/issues/29)+ Improve documentation.+* [#43](https://github.com/kowainik/smuggler/issues/43)+ Remove `cabal.project` (there's no need in it anymore).+ 0.0.0 ===== * Initially created. [1]: https://pvp.haskell.org [2]: https://github.com/kowainik/smuggler/releases-
README.md view
@@ -1,22 +1,45 @@ # smuggler + [](https://hackage.haskell.org/package/smuggler) [](https://travis-ci.org/kowainik/smuggler) [](https://github.com/kowainik/smuggler/blob/master/LICENSE) -Haskell Compiler Plugin which removes unused imports automatically.+> “So many people consider their work a daily punishment. Whereas I love my work+> as a translator. Translation is a journey over a sea from one shore to the+> other. Sometimes I think of myself as a smuggler: I cross the frontier of+> language with my booty of words, ideas, images, and metaphors.”+>+> ― Amara Lakhous, Clash of Civilizations Over an Elevator in Piazza Vittorio -## Build instructions+Haskell Source Plugin which removes unused imports automatically. +## How to use++Add `smuggler` to the dependencies of your project. Then add the following+compiler options:++```+-fplugin=Smuggler.Plugin+```++## For contributors+ Requirements: -* `ghc >= ghc-8.6.1-alpha2`+* `ghc-8.6.1` -### Build project+### Cabal: How to build? ```shell $ cabal new-update-$ cabal new-build --allow-newer+$ cabal new-build+```++#### Stack on MacOS: How to build?++```shell+$ STACK_YAML=stack-mac-8.6.1.yaml stack build ``` ### Run tests
− Setup.hs
@@ -1,2 +0,0 @@-import Distribution.Simple-main = defaultMain
smuggler.cabal view
@@ -1,7 +1,14 @@+cabal-version: 2.0 name: smuggler-version: 0.0.1-synopsis: Smuggling-description: GHC compiler plugin which helps to manage imports+version: 0.1.0+synopsis: GHC Source Plugin that helps to manage imports+description:+ == Usage+ .+ Add @smuggler@ to the dependencies of your project.+ .+ Then add the following options: @-fplugin=Smuggler.Plugin@+ homepage: https://github.com/kowainik/smuggler bug-reports: https://github.com/kowainik/smuggler/issues license: MPL-2.0@@ -13,7 +20,6 @@ build-type: Simple extra-doc-files: README.md , CHANGELOG.md-cabal-version: 2.0 tested-with: GHC == 8.6.1 source-repository head@@ -30,14 +36,14 @@ -- Smuggler.Import -- Smuggler.Name - build-depends: base >= 4.9 && < 5- , bytestring >= 0.10- , containers >= 0.5- , filepath >= 1.4- , ghc >= 8.6.0- , ghc-exactprint >= 0.5.7.0- , hash-store >= 0.1.0- , unordered-containers >= 0.2.7+ build-depends: base >= 4.12 && < 5+ , bytestring ^>= 0.10+ , containers >= 0.5 && < 0.7+ , filepath ^>= 1.4+ , ghc ^>= 8.6.0+ , ghc-exactprint ^>= 0.5.8.0+ , hash-store ^>= 0.1.0+ , unordered-containers ^>= 0.2.7 -- Debug dependencies; in separate section to easy comment before release -- , fmt@@ -56,11 +62,11 @@ default-language: Haskell2010 -executable smuggler+executable play-smuggler hs-source-dirs: app main-is: Main.hs ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N- -fplugin=Smuggler.Plugin+-- -fplugin=Smuggler.Plugin build-depends: base , smuggler @@ -82,6 +88,7 @@ Test.BoolBoolUnused Test.BoolPartlyUsedFirst Test.BoolPartlyUsedLast+ Test.ConstructorsUnused Test.Dummy Test.ImportEmpty Test.MultilineUnused@@ -89,6 +96,8 @@ Test.TypeConstructorUnused Test.TypeUnused Test.TypeUsed+ Test.WildcardUsed+ Test.WildcardUnused build-depends: base , directory
+ test/Test/ConstructorsUnused.hs view
@@ -0,0 +1,5 @@+module Test.ConstructorsUnused where++import Data.Bool (Bool (True, False), not)++foo = not
+ test/Test/WildcardUnused.hs view
@@ -0,0 +1,5 @@+module Test.WildcardUnused where++import Data.Bool (Bool (..), not)++foo = not
+ test/Test/WildcardUsed.hs view
@@ -0,0 +1,5 @@+module Test.WildcardUsed where++import Data.Bool (Bool (..))++foo = False