Skip to content

Commit 28e569b

Browse files
Fix warnings revealed by v0.14.1 PS release; export functions (#139)
* Fix warnings revealed by v0.14.1 PS release; export functions Exported functions - mapCont - withCont * Update changelog
1 parent 8465817 commit 28e569b

File tree

5 files changed

+9
-5
lines changed

5 files changed

+9
-5
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,12 @@ Notable changes to this project are documented in this file. The format is based
77
Breaking changes:
88

99
New features:
10+
- Export `mapCont` and `withCont` functions originally added in #70 by @parsonsmatt (#139 by @JordanMartinez)
1011

1112
Bugfixes:
1213

1314
Other improvements:
15+
- Fix warnings revealed by v0.14.1 PS release (#139 by @JordanMartinez)
1416

1517
## [v5.0.0](https://github.com/purescript/purescript-transformers/releases/tag/v5.0.0) - 2021-02-26
1618

src/Control/Comonad/Env/Trans.purs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ instance extendEnvT :: Extend w => Extend (EnvT e w) where
4242
extend f (EnvT (Tuple e x)) = EnvT $ Tuple e (f <$> ((Tuple e >>> EnvT) <<= x))
4343

4444
instance comonadEnvT :: Comonad w => Comonad (EnvT e w) where
45-
extract (EnvT (Tuple e x)) = extract x
45+
extract (EnvT (Tuple _ x)) = extract x
4646

4747
instance comonadTransEnvT :: ComonadTrans (EnvT e) where
48-
lower (EnvT (Tuple e x)) = x
48+
lower (EnvT (Tuple _ x)) = x
4949

5050
instance foldableEnvT :: Foldable f => Foldable (EnvT e f) where
5151
foldl fn a (EnvT (Tuple _ x)) = foldl fn a x

src/Control/Comonad/Store/Class.purs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ seeks :: forall s a w. ComonadStore s w => (s -> s) -> w a -> w a
5252
seeks f = peeks f <<< duplicate
5353

5454
instance comonadStoreStoreT :: Comonad w => ComonadStore s (StoreT s w) where
55-
pos (StoreT (Tuple f s)) = s
55+
pos (StoreT (Tuple _ s)) = s
5656
peek s (StoreT (Tuple f _)) = extract f s
5757

5858
instance comonadStoreEnvT :: ComonadStore s w => ComonadStore s (EnvT e w) where

src/Control/Monad/Cont.purs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ module Control.Monad.Cont
44
( Cont
55
, cont
66
, runCont
7+
, mapCont
8+
, withCont
79
, module Control.Monad.Cont.Trans
810
, module Control.Monad.Cont.Class
911
) where

src/Control/Monad/List/Trans.purs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ repeat = iterate identity
142142

143143
-- | Take a number of elements from the front of a list.
144144
take :: forall f a. Applicative f => Int -> ListT f a -> ListT f a
145-
take 0 fa = nil
145+
take 0 _ = nil
146146
take n fa = stepMap f fa where
147147
f (Yield a s) = Yield a (take (n - 1) <$> s)
148148
f (Skip s) = Skip (take n <$> s)
@@ -159,7 +159,7 @@ takeWhile f = stepMap g where
159159
drop :: forall f a. Applicative f => Int -> ListT f a -> ListT f a
160160
drop 0 fa = fa
161161
drop n fa = stepMap f fa where
162-
f (Yield a s) = Skip (drop (n - 1) <$> s)
162+
f (Yield _ s) = Skip (drop (n - 1) <$> s)
163163
f (Skip s) = Skip (drop n <$> s)
164164
f Done = Done
165165

0 commit comments

Comments
 (0)