Title: Can declare roles multiple times · Issue #3876 · purescript/purescript · GitHub
Open Graph Title: Can declare roles multiple times · Issue #3876 · purescript/purescript
X Title: Can declare roles multiple times · Issue #3876 · purescript/purescript
Description: Description Multiple roles declarations are authorized but only the last one is considered. To Reproduce module Example where import Safe.Coerce (coerce) data A a = A type role A nominal type role A phantom example :: ∀ a b. A a -> A b e...
Open Graph Description: Description Multiple roles declarations are authorized but only the last one is considered. To Reproduce module Example where import Safe.Coerce (coerce) data A a = A type role A nominal type role ...
X Description: Description Multiple roles declarations are authorized but only the last one is considered. To Reproduce module Example where import Safe.Coerce (coerce) data A a = A type role A nominal type role ...
Opengraph URL: https://github.com/purescript/purescript/issues/3876
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Can declare roles multiple times","articleBody":"## Description\r\n\r\nMultiple roles declarations are authorized but only the last one is considered.\r\n\r\n## To Reproduce\r\n\r\n```purs\r\nmodule Example where\r\n\r\nimport Safe.Coerce (coerce)\r\n\r\ndata A a = A\r\ntype role A nominal\r\ntype role A phantom\r\n\r\nexample :: ∀ a b. A a -> A b\r\nexample = coerce\r\n```\r\n\r\n## Expected behavior\r\n\r\nThe compiler shouldn’t allow duplicate role annotations.\r\n\r\nGHC fails with the following message in that situation:\r\n\r\n\r\n```\r\nExample.hs:6:1: error:\r\n Duplicate role annotations for ‘A’:\r\n type role A nominal -- written at Example.hs:6:1-19\r\n type role A phantom -- written at Example.hs:7:1-19\r\n |\r\n6 | type role A nominal\r\n | ^^^^^^^^^^^^^^^^^^^\r\n```\r\n\r\n## PureScript version\r\n\r\nmaster (df3170f5bb0ba21517e2ca72db6aee5c479c99df)\r\n","author":{"url":"https://github.com/kl0tl","@type":"Person","name":"kl0tl"},"datePublished":"2020-05-16T15:17:57Z","url":"https://github.com/purescript/purescript/issues/3876"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ed8f5196-4fdf-0714-191b-6f30b7d4e054 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8396:2270F4:9B9FCE:D0E0AC:6B00E8D4 |
| html-safe-nonce | a14c1a28543a385e428538da5f5bc4437600dcda844537d674c874e431219e6b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4Mzk2OjIyNzBGNDo5QjlGQ0U6RDBFMEFDOjZCMDBFOEQ0IiwidmlzaXRvcl9pZCI6IjIxMTU1NjcwMzA1NTkxMDcyODQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | c3045567f060494ff37dad3f2ccea0c652ff0f6ad2ac0e1deb932356ff6c5772 |
| hovercard-subject-tag | issue:619496653 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/purescript/purescript/3876/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6975e1da7ce620aef40d610695d9990374ebb30d26a623e4bfded91348f06737/purescript/purescript/issues/3876 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6975e1da7ce620aef40d610695d9990374ebb30d26a623e4bfded91348f06737/purescript/purescript/issues/3876 |
| og:image:alt | Description Multiple roles declarations are authorized but only the last one is considered. To Reproduce module Example where import Safe.Coerce (coerce) data A a = A type role A nominal type role ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | kl0tl |
| hostname | github.com |
| expected-hostname | github.com |
| None | 27088b6977484d0d3321d9a11c907c6d6637b315cfa359ef7952dbf6292f9b14 |
| turbo-cache-control | no-preview |
| go-import | github.com/purescript/purescript git https://github.com/purescript/purescript.git |
| octolytics-dimension-user_id | 6556677 |
| octolytics-dimension-user_login | purescript |
| octolytics-dimension-repository_id | 13206906 |
| octolytics-dimension-repository_nwo | purescript/purescript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 13206906 |
| octolytics-dimension-repository_network_root_nwo | purescript/purescript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 624179fb8b88d26ba5bba08894eb60a1c5a1d93d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width