From 4609d2ba18205a0a3c3db1f28ca805a444cbcb21 Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Sun, 25 Apr 2021 07:34:44 -0700 Subject: [PATCH 1/4] Fix warnings revealed by v0.14.1 PS release; export functions Exported functions - mapCont - withCont --- src/Control/Comonad/Env/Trans.purs | 4 ++-- src/Control/Comonad/Store/Class.purs | 2 +- src/Control/Monad/Cont.purs | 2 ++ src/Control/Monad/List/Trans.purs | 4 ++-- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Control/Comonad/Env/Trans.purs b/src/Control/Comonad/Env/Trans.purs index 2f8b2c6a..1a8d5896 100644 --- a/src/Control/Comonad/Env/Trans.purs +++ b/src/Control/Comonad/Env/Trans.purs @@ -42,10 +42,10 @@ instance extendEnvT :: Extend w => Extend (EnvT e w) where extend f (EnvT (Tuple e x)) = EnvT $ Tuple e (f <$> ((Tuple e >>> EnvT) <<= x)) instance comonadEnvT :: Comonad w => Comonad (EnvT e w) where - extract (EnvT (Tuple e x)) = extract x + extract (EnvT (Tuple _ x)) = extract x instance comonadTransEnvT :: ComonadTrans (EnvT e) where - lower (EnvT (Tuple e x)) = x + lower (EnvT (Tuple _ x)) = x instance foldableEnvT :: Foldable f => Foldable (EnvT e f) where foldl fn a (EnvT (Tuple _ x)) = foldl fn a x diff --git a/src/Control/Comonad/Store/Class.purs b/src/Control/Comonad/Store/Class.purs index fde4f130..d9bd420d 100644 --- a/src/Control/Comonad/Store/Class.purs +++ b/src/Control/Comonad/Store/Class.purs @@ -52,7 +52,7 @@ seeks :: forall s a w. ComonadStore s w => (s -> s) -> w a -> w a seeks f = peeks f <<< duplicate instance comonadStoreStoreT :: Comonad w => ComonadStore s (StoreT s w) where - pos (StoreT (Tuple f s)) = s + pos (StoreT (Tuple _ s)) = s peek s (StoreT (Tuple f _)) = extract f s instance comonadStoreEnvT :: ComonadStore s w => ComonadStore s (EnvT e w) where diff --git a/src/Control/Monad/Cont.purs b/src/Control/Monad/Cont.purs index 91b5884c..0b64fec8 100644 --- a/src/Control/Monad/Cont.purs +++ b/src/Control/Monad/Cont.purs @@ -4,6 +4,8 @@ module Control.Monad.Cont ( Cont , cont , runCont + , mapCont + , withCont , module Control.Monad.Cont.Trans , module Control.Monad.Cont.Class ) where diff --git a/src/Control/Monad/List/Trans.purs b/src/Control/Monad/List/Trans.purs index aad5bd7d..c2e62fbe 100644 --- a/src/Control/Monad/List/Trans.purs +++ b/src/Control/Monad/List/Trans.purs @@ -142,7 +142,7 @@ repeat = iterate identity -- | Take a number of elements from the front of a list. take :: forall f a. Applicative f => Int -> ListT f a -> ListT f a -take 0 fa = nil +take 0 _ = nil take n fa = stepMap f fa where f (Yield a s) = Yield a (take (n - 1) <$> s) f (Skip s) = Skip (take n <$> s) @@ -159,7 +159,7 @@ takeWhile f = stepMap g where drop :: forall f a. Applicative f => Int -> ListT f a -> ListT f a drop 0 fa = fa drop n fa = stepMap f fa where - f (Yield a s) = Skip (drop (n - 1) <$> s) + f (Yield _ s) = Skip (drop (n - 1) <$> s) f (Skip s) = Skip (drop n <$> s) f Done = Done From 0671e98e37d650ae04fd50da43ba3d8bc34753b2 Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Sun, 25 Apr 2021 07:36:23 -0700 Subject: [PATCH 2/4] Update changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c739b02..95f0fe2f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,10 +7,12 @@ Notable changes to this project are documented in this file. The format is based Breaking changes: New features: +- Export `mapCont` and `withCont` functions (#139 by @JordanMartinez) Bugfixes: Other improvements: +- Fix warnings revealed by v0.14.1 PS release (#139 by @JordanMartinez) ## [v5.0.0](https://github.com/purescript/purescript-transformers/releases/tag/v5.0.0) - 2021-02-26 From 6301f3361da2be4009d7f6a6b74e664161b2104b Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Sun, 25 Apr 2021 07:46:04 -0700 Subject: [PATCH 3/4] Refer to PR that introduced functions now exported --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 95f0fe2f..8b5b5da2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ Notable changes to this project are documented in this file. The format is based Breaking changes: New features: -- Export `mapCont` and `withCont` functions (#139 by @JordanMartinez) +- Export `mapCont` and `withCont` functions originally added in #70 by @parsonmatt (#139 by @JordanMartinez) Bugfixes: From dc2908afabfb314d3e5d6570dba43455771a1097 Mon Sep 17 00:00:00 2001 From: Jordan Martinez Date: Sun, 25 Apr 2021 12:40:30 -0700 Subject: [PATCH 4/4] Fix typo --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b5b5da2..16bdd870 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ Notable changes to this project are documented in this file. The format is based Breaking changes: New features: -- Export `mapCont` and `withCont` functions originally added in #70 by @parsonmatt (#139 by @JordanMartinez) +- Export `mapCont` and `withCont` functions originally added in #70 by @parsonsmatt (#139 by @JordanMartinez) Bugfixes: