Skip to content

Fix warnings revealed by v0.14.1 PS release; export functions #139

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 originally added in #70 by @parsonsmatt (#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

Expand Down
4 changes: 2 additions & 2 deletions src/Control/Comonad/Env/Trans.purs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/Control/Comonad/Store/Class.purs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/Control/Monad/Cont.purs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ module Control.Monad.Cont
( Cont
, cont
, runCont
, mapCont
, withCont
, module Control.Monad.Cont.Trans
, module Control.Monad.Cont.Class
) where
Expand Down
4 changes: 2 additions & 2 deletions src/Control/Monad/List/Trans.purs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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

Expand Down