Skip to content
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

yampa: Yampa.FRP.Task does not define return in terms of pure #276

Closed
ivanperez-keera opened this issue Aug 8, 2023 · 0 comments
Closed
Assignees
Milestone

Comments

@ivanperez-keera
Copy link
Owner

The monad instance for Yampa.FRP.Task.Task does not define return in terms of the Applicative pure. This is leading to a warning due to upcoming changes in GHC:

src/FRP/Yampa/Task.hs:113:3: warning: [-Wnoncanonical-monad-instances]
    Noncanonical `return' definition detected
    in the instance declaration for `Monad (Task a b)'.
    `return' will eventually be removed in favour of `pure'
    Either remove definition for `return' (recommended) or define as `return = pure'
    See also: https://gitlab.haskell.org/ghc/ghc/-/wikis/proposal/monad-of-no-return

The definition is the same as that of pure, so there's no reason not to rely on it.

@ivanperez-keera ivanperez-keera added this to the 0.14.5 milestone Oct 6, 2023
@ivanperez-keera ivanperez-keera self-assigned this Oct 6, 2023
ivanperez-keera added a commit that referenced this issue Oct 6, 2023
The monad instance for Yampa.FRP.Task.Task does not define return in
terms of the Applicative pure. This is leading to a warning due to
upcoming changes in GHC. The definition is the same as that of pure, so
there's no reason not to rely on it.

This commit modifies the Monad instance of Yampa.FRP.Task to define
return in terms of the Applicative pure.
ivanperez-keera added a commit that referenced this issue Oct 6, 2023
The monad instance for Yampa.FRP.Task.Task does not define return in
terms of the Applicative pure. This is leading to a warning due to
upcoming changes in GHC. The definition is the same as that of pure, so
there's no reason not to rely on it.

This commit modifies the Monad instance of Yampa.FRP.Task.Task to define
return in terms of the Applicative pure.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant