[GHC] #14547: Wrong warning by -Wincomplete-patterns
GHC
ghc-devs at haskell.org
Tue Apr 24 23:32:18 UTC 2018
#14547: Wrong warning by -Wincomplete-patterns
-------------------------------------+-------------------------------------
Reporter: YoshikuniJujo | Owner: (none)
Type: bug | Status: patch
Priority: low | Milestone:
Component: Compiler | Version: 8.2.1
Resolution: | Keywords: incomplete-
| patterns OverloadedLists,
| PatternMatchWarnings TypeFamilies
Operating System: Linux | Architecture: x86
Type of failure: Incorrect | Test Case:
error/warning at compile-time | deSugar/should_compile/T14547
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D4624
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by simonpj):
I'm a bit lost with this example. I think that, because of
`OverloadedLists` it desugars as
{{{
foo (toList -> []) = Empty
foo (toList -> (x : xs)) = x :! foo xs
}}}
But then we actually need the `[]` (list) instance of `toList` which is
the identity function? Then what? How does the bogus error message
arise?
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14547#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list