From 9b1ef6931fb9b827d58f01e0a007440b3906a4ff Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Sun, 18 Apr 2021 17:14:08 -0700 Subject: [PATCH 1/2] Fix UnusedName warning revealed by v0.14.1 PS release --- src/Data/Interval.purs | 10 +++++----- src/Data/Time.purs | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Data/Interval.purs b/src/Data/Interval.purs index 8d90412..b71de85 100644 --- a/src/Data/Interval.purs +++ b/src/Data/Interval.purs @@ -80,8 +80,8 @@ instance bifunctorInterval :: Bifunctor Interval where instance foldableInterval :: Foldable (Interval d) where foldl f z (StartEnd x y) = (z `f` x) `f` y - foldl f z (DurationEnd d x) = z `f` x - foldl f z (StartDuration x d) = z `f` x + foldl f z (DurationEnd _ x) = z `f` x + foldl f z (StartDuration x _) = z `f` x foldl _ z _ = z foldr x = foldrDefault x foldMap = foldMapDefaultL @@ -109,7 +109,7 @@ instance bitraversableInterval :: Bitraversable Interval where bisequence = bisequenceDefault instance extendInterval :: Extend (Interval d) where - extend f a@(StartEnd x y) = StartEnd (f a) (f a) - extend f a@(DurationEnd d x) = DurationEnd d (f a) - extend f a@(StartDuration x d) = StartDuration (f a) d + extend f a@(StartEnd _ _) = StartEnd (f a) (f a) + extend f a@(DurationEnd d _) = DurationEnd d (f a) + extend f a@(StartDuration _ d) = StartDuration (f a) d extend f (DurationOnly d) = DurationOnly d diff --git a/src/Data/Time.purs b/src/Data/Time.purs index 4adde81..bf9a464 100644 --- a/src/Data/Time.purs +++ b/src/Data/Time.purs @@ -100,7 +100,7 @@ timeToMillis t = Milliseconds + Int.toNumber (fromEnum (millisecond t)) millisToTime :: Milliseconds -> Time -millisToTime ms@(Milliseconds ms') = +millisToTime (Milliseconds ms') = let hourLength = 3600000.0 minuteLength = 60000.0 From 0e2edc5342ca36d7359bea3f00dff592d3c31c39 Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Sun, 18 Apr 2021 17:15:03 -0700 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index eda80a4..54e93c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ New features: Bugfixes: Other improvements: +- Fix UnusedName warnings revealed by v0.14.1 PS release (#91) ## [v5.0.0](https://github.com/purescript/purescript-datetime/releases/tag/v5.0.0) - 2021-02-26