quickcheck icon indicating copy to clipboard operation
quickcheck copied to clipboard

Noncanonical `return`

Open andreasabel opened this issue 3 years ago • 1 comments

These warnings should be addressed at some point:

src/Test/QuickCheck/Property.hs:220:3: warning: [-Wnoncanonical-monad-instances]
    Noncanonical ‘pure = return’ definition detected
    in the instance declaration for ‘Applicative Rose’.
    Move definition from ‘return’ to ‘pure’
    See also: https://gitlab.haskell.org/ghc/ghc/-/wikis/proposal/monad-of-no-return
    |
220 |   pure = return
    |   ^^^^^^^^^^^^^

src/Test/QuickCheck/Property.hs:225:3: warning: [-Wnoncanonical-monad-instances]
    Noncanonical ‘return’ definition detected
    in the instance declaration for ‘Monad Rose’.
    ‘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
    |
225 |   return x = MkRose x []
    |   ^^^^^^^^^^^^^^^^^^^^^^

andreasabel avatar Feb 23 '22 10:02 andreasabel

@nick8325 : Triage?

andreasabel avatar Nov 20 '22 19:11 andreasabel

This has been fixed

MaximilianAlgehed avatar Mar 19 '24 08:03 MaximilianAlgehed