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

Noncanonical mappend #35

Open
andreasabel opened this issue Feb 23, 2022 · 3 comments
Open

Noncanonical mappend #35

andreasabel opened this issue Feb 23, 2022 · 3 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@andreasabel
Copy link

This warning should be addressed at some point:

Building library for strict-0.4.0.1..
...
[4 of 7] Compiling Data.Strict.Tuple ( src/Data/Strict/Tuple.hs, dist/build/Data/Strict/Tuple.o, dist/build/Data/Strict/Tuple.dyn_o )

src/Data/Strict/Tuple.hs:171:3: warning: [-Wnoncanonical-monoid-instances]
    Noncanonical ‘mappend’ definition detected
    in the instance declaration for ‘Monoid (Pair a b)’.
    ‘mappend’ will eventually be removed in favour of ‘(<>)’
    Either remove definition for ‘mappend’ (recommended) or define as ‘mappend = (<>)’
    See also: https://gitlab.haskell.org/ghc/ghc/-/wikis/proposal/semigroup-monoid
    |
171 |   (x1 :!: y1) `mappend` (x2 :!: y2) = (x1 `mappend` x2) :!: (y1 `mappend` y2)
    |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@phadej
Copy link
Contributor

phadej commented Feb 23, 2022

let's disable the warning. CPP is not worth it in this case.

@phadej phadej added good first issue Good for newcomers help wanted Extra attention is needed labels Feb 23, 2022
@andreasabel
Copy link
Author

let's disable the warning. CPP is not worth it in this case.

So you don't believe what the warning says:

‘mappend’ will eventually be removed in favour of ‘(<>)’

Because if it is true, CPP will be needed anyway...

@phadej
Copy link
Contributor

phadej commented Jan 12, 2023

Because if it is true, CPP will be needed anyway...

Or the lower bound support can be trimmed so it isn't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants