[GHC] #15886: Spurious warning about incomplete pattern with PatternSynonyms
GHC
ghc-devs at haskell.org
Sat Nov 10 16:07:09 UTC 2018
#15886: Spurious warning about incomplete pattern with PatternSynonyms
-------------------------------------+-------------------------------------
Reporter: selinger | Owner: (none)
Type: bug | Status: closed
Priority: normal | Milestone: 8.6.3
Component: Compiler | Version: 8.6.1
Resolution: invalid | Keywords:
| PatternSynonyms,
| PatternMatchWarnings
Operating System: Linux | Architecture: x86_64
Type of failure: Incorrect | (amd64)
error/warning at compile-time | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by selinger):
Interesting. Thanks for pointing this out. I assumed (wrongly, it turns
out) that since pattern synonyms are just syntactic sugar, the checker
could desugar it for the purposes of coverage checking. Are there good
reasons for "the checker is very naive"?
For sure, there are good uses cases for COMPLETE pragmas, because there
are cases (even without using pattern synonyms) that's aren't readily
decidable. I'm just surprised that the checker can't solve obvious cases.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15886#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list