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

add role annotations #76

Merged
merged 5 commits into from
Mar 1, 2024
Merged

add role annotations #76

merged 5 commits into from
Mar 1, 2024

Conversation

chris-martin
Copy link
Contributor

to satisfy -Weverything on GHC 9.8

src/Graphula.hs Outdated
@@ -191,12 +191,18 @@ data Args backend n m = Args
, gen :: IORef QCGen
}

type role Args representational representational representational
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a ton of overhead with no value. Can we -Wno-missing-role-annotations instead? We've done that many times for new warnings, e.g. with missing-kind-signatures, etc.

When it comes to our warnings choices and use of everything, the intent is not "seek to satisfy everything, only opting out what you must", it's more "everything + opt-out is better than opt-in" -- so there's no stigma to opting out of stuff. Would be good to document this somewhere I guess.

Unless there's some big benefit to this that I'm missing?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dunno, I didn't think it was much overhead and sometimes it's nice to make sure GHC agrees with what you thought a role was? I could go either way though, disabling the warning is fine.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make sure GHC agrees with what you thought a role was

FWIW, I have exactly 0 idea what any role of anything is at any point. What you have here is greek to me 🤷

package.yaml Outdated
Comment on lines 33 to 35
- condition: impl(ghc >= 9.8)
ghc-options:
- -Wno-missing-role-annotations
Copy link
Member

@pbrisbin pbrisbin Mar 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry to be a stickler, but the list of conditionals are currently well-ordered new-to-old, so can you put this first instead of last? (Or reverse the list entirely, I don't care which way it goes.)

@chris-martin chris-martin merged commit 5e22f75 into main Mar 1, 2024
11 checks passed
@chris-martin chris-martin deleted the chris/role-annotations branch March 1, 2024 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants