Skip to content

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

@ivanperez-keera

Description

@ivanperez-keera

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.

Metadata

Metadata

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions