8000 Warnings instead of GenericError for ill-formed pragmas by andreasabel · Pull Request #7430 · agda/agda · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Warnings instead of GenericError for ill-formed pragmas #7430

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

Merged
merged 25 commits into from
Aug 18, 2024
Merged

Conversation

andreasabel
Copy link
Member
@andreasabel andreasabel commented Aug 12, 2024
  • Fix internal error for {-# COMPILE GHC Set1 #-}
  • Fix printing of COMPILE pragmas (whitespace)
  • Reproduce error "Failed to parse GHC pragma"
  • Fix internal error on {-# REWRITE Set1 #-}
  • Fix internal error with REWRITE on pattern synonym
  • New deadcode warning NotARewriteRule instead of GenericError
  • Warning instead of error for {-# REWRITE not-in-scope #-}
  • New warning PragmaCompileWrongName for COMPILE not-def-or-con
  • New warning PragmaCompileUnparsable instead of GenericError
  • New warning PragmaCompileWrong instead of GenericError
  • Add AmbiguousQName to warnings NotARewriteRule and PragmaCompileWrongName
  • New warning PragmaExpectsUnambiguousConstructorOrFunction
  • etc. (see commits)

@andreasabel andreasabel changed the title New warning NotARewriteRule New warnings: NotARewriteRule, PragmaCompileWrongName Aug 12, 2024
@andreasabel andreasabel added ux: warnings Issues relating to the reporting of warnings GenericError Concerning GenericError and GenericDocError labels Aug 12, 2024
@andreasabel andreasabel added this to the 2.8.0 milestone Aug 12, 2024
@andreasabel andreasabel self-assigned this Aug 14, 2024
@andreasabel andreasabel changed the title New warnings: NotARewriteRule, PragmaCompileWrongName New warnings: NotARewriteRule, PragmaCompile{Wrong[Name],Unparsable} Aug 14, 2024
This check was previously placed in the main compiler loop, but it
seems more naturally based with the other sanity checks for COMPILE
GHC pragmas.
@andreasabel andreasabel changed the title New warnings: NotARewriteRule, PragmaCompile{Wrong[Name],Unparsable} Warnings instead of GenericError for ill-formed pragmas Aug 16, 2024
Since `WarningName` is an Enum type, its serialisation can be obtained generically.

There has been a discussion to not automatically generate
serialisation as folks would forget to bump the interface version when
adding new constructors.
But note that `WarningName` tracks the constructors of `Warning`,
so there is still manual work implementing the serialisation of a new
warning, prompting to increase the interface version.
@andreasabel andreasabel merged commit 4b77f7c into master Aug 18, 2024
29 checks passed
@andreasabel andreasabel deleted the ghc-pragma branch August 18, 2024 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GenericError Concerning GenericError and GenericDocError ux: warnings Issues relating to the reporting of warnings
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0