-
Notifications
You must be signed in to change notification settings - Fork 339
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
Generated Haskell code has redundant matches triggering GHC warnings #5758
Comments
Currently, the agda/src/full/Agda/Compiler/MAlonzo/Compiler.hs Lines 1284 to 1292 in 798be60
However, we might process the generated .hs files from outside after --dont-call-ghc , e.g. with cabal or stack . So I think it is better the option is written to each file (just like the LANGUAGE options are).
|
Also separate pragmas from module header by a blank line, if there are pragmas.
If you include |
Good question. I want users to be able to switch on What would be the motivation to force Of course, the current MAlonzo always puts out a catch-all (1), so it will never produce an incomplete match. So atm, we could add this warning without harm. Under the optimistic assumption of the truth of (1), there would also be no use of adding this warning. So, to answer your question:
TL;DR I wanted to silence this pointless warning. |
Note that we do rely on the data Bool : Set where
true : Bool
{-# COMPILE GHC Bool = data Bool (True) #-} fails with
|
Ok, this could be a reason to write it to the files as well. Do you suggest this? |
Also separate pragmas from module header by a blank line, if there are pragmas.
I merged #5759 now, fixing the OP. |
Also separate pragmas from module header by a blank line, if there are pragmas.
Also separate pragmas from module header by a blank line, if there are pragmas.
Generated Haskell code produces tons of
overlapping-patterns
warning because we have a catch-all in every alternative:Suggested fix: Put
into the generated Haskell files.
The text was updated successfully, but these errors were encountered: