From e20f887aa37bf98937c98a0430ab9ac4bce0b70b Mon Sep 17 00:00:00 2001 From: PureFunctor Date: Wed, 21 Apr 2021 17:52:47 +0800 Subject: [PATCH 1/5] Fix dependency warnings --- spago.dhall | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/spago.dhall b/spago.dhall index 22082ac..faa4bc7 100644 --- a/spago.dhall +++ b/spago.dhall @@ -1,17 +1,30 @@ { name = "formatters" , dependencies = [ "aff" + , "arrays" , "assert" + , "bifunctors" , "console" + , "control" , "datetime" , "effect" - , "fixed-points" + , "either" + , "enums" + , "foldable-traversable" + , "integers" , "lists" + , "math" + , "maybe" + , "newtype" , "numbers" + , "ordered-collections" , "parsing" + , "partial" , "prelude" , "psci-support" + , "strings" , "transformers" + , "tuples" ] , packages = ./packages.dhall , sources = [ "src/**/*.purs", "test/**/*.purs" ] From ced49f4db84be420b5ebc1984c702fa39d42ad1b Mon Sep 17 00:00:00 2001 From: PureFunctor Date: Wed, 21 Apr 2021 17:55:25 +0800 Subject: [PATCH 2/5] Fix UnusedName warnings --- src/Data/Formatter/Internal.purs | 2 +- test/src/Interval.purs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Data/Formatter/Internal.purs b/src/Data/Formatter/Internal.purs index 14a678c..95c66d5 100644 --- a/src/Data/Formatter/Internal.purs +++ b/src/Data/Formatter/Internal.purs @@ -11,7 +11,7 @@ repeat ∷ ∀ a. Monoid a ⇒ a → Int → a repeat = repeat' mempty where repeat' ∷ a → a → Int → a - repeat' accum part count + repeat' accum _ count | count < one = accum repeat' accum part count = repeat' (accum <> part) part (count - one) diff --git a/test/src/Interval.purs b/test/src/Interval.purs index bb2f8f8..4bc3ff6 100644 --- a/test/src/Interval.purs +++ b/test/src/Interval.purs @@ -31,10 +31,10 @@ intervalTest = describe "Data.Formatter.Interval" do prop "should unformat RecurringInterval" arbRecurringInterval \({ str, interval }) → do (unformatRecurringInterval str) `shouldEqual` (Right interval) - prop "format (unformat s) = s" arbRecurringInterval \({ str, interval, formatedStr }) → do + prop "format (unformat s) = s" arbRecurringInterval \({ str, formatedStr }) → do (formatRecurringInterval <$> (unformatRecurringInterval str)) `shouldEqual` (Right formatedStr) - prop "unformat (format s) = s" arbRecurringInterval \({ str, interval, formatedStr }) → do + prop "unformat (format s) = s" arbRecurringInterval \({ interval }) → do (unformatRecurringInterval $ formatRecurringInterval interval) `shouldEqual` (Right interval) From 491ac449c41418616f84d390a4a3632caa0db3ae Mon Sep 17 00:00:00 2001 From: PureFunctor Date: Thu, 22 Apr 2021 00:08:01 +0800 Subject: [PATCH 3/5] Remove filter and fix UnusedDeclaration warning --- test/src/DateTime.purs | 3 --- 1 file changed, 3 deletions(-) diff --git a/test/src/DateTime.purs b/test/src/DateTime.purs index 643519a..c96cee1 100644 --- a/test/src/DateTime.purs +++ b/test/src/DateTime.purs @@ -196,6 +196,3 @@ dateformats = ] } ] - -filter ∷ ∀ m a. Alternative m ⇒ Monad m ⇒ (a → Boolean) → m a → m a -filter f m = m >>= \x → if f x then pure x else empty From 6407e3433e7f9dab4eb4a2c97d6ef54b6ae82f8c Mon Sep 17 00:00:00 2001 From: PureFunctor Date: Thu, 22 Apr 2021 00:10:45 +0800 Subject: [PATCH 4/5] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d5c0d32..2cfc9a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ New features: Bugfixes: Other improvements: +- Removed unused names and declaration found by the v0.14.1 PureScript release (#68 by @PureFunctor) +- Installed dependencies directly imported into source code that were previously installed transitively and removed unused `fixed-point` dependency (#68 by @PureFunctor) ## [v5.0.0](https://github.com/purescript-contrib/purescript-formatters/releases/tag/v5.0.0) - 2021-02-26 From c5d195199630d8dde9bf041f14c2021500ba325d Mon Sep 17 00:00:00 2001 From: PureFunctor Date: Thu, 22 Apr 2021 00:20:23 +0800 Subject: [PATCH 5/5] Fix warning for unused explicit import --- test/src/DateTime.purs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/src/DateTime.purs b/test/src/DateTime.purs index c96cee1..167ee66 100644 --- a/test/src/DateTime.purs +++ b/test/src/DateTime.purs @@ -3,7 +3,7 @@ module Test.DateTime (datetimeTest) where import Prelude import Control.Monad.Reader.Class (class MonadReader) -import Control.Alternative (class Alternative, empty, guard) +import Control.Alternative (guard) import Data.DateTime (DateTime) import Data.Either (Either(..)) import Data.Formatter.DateTime as FDT