nick8325 / quickcheck

Automatic testing of Haskell programs.
Other
713 stars 119 forks source link

Noncanonical `return` #339

Closed andreasabel closed 5 months ago

andreasabel commented 2 years ago

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 commented 1 year ago

@nick8325 : Triage?

MaximilianAlgehed commented 5 months ago

This has been fixed