#1307: Warning refers to code not in the source
-------------------------+--------------------------------------------------
Reporter: guest | Owner:
Type: bug | Status: new
Priority: lowest | Milestone: _|_
Component: Compiler | Version: 6.7
Severity: normal | Resolution:
Keywords: | Difficulty: Unknown
Os: Windows | Testcase:
Architecture: Unknown |
-------------------------+--------------------------------------------------
Comment (by simonpj):
There are three things going on here:
* Whether a warning is generated at all for this particular program. It
should not be; and Ian says he can't reproduce it. Perhpas a glitch?
* How to report missing patterns. Lennart, how would you like GHC to
report "you have not covered the case where the head of the input list is
'!' or '_'"? In general, of course. Maybe we should replace the
`notElem` with "is not one of".
* Another bad thing about the current report is that it exposes the
representation of characters. This is structural: the overlap checker
first expands character patterns and only then checks for overlap. It's
easily fixed -- when someone re-engineers the overlap checker.
Incidentally, there's a new paper out about overlap warnings "Warnings for
pattern matching" by Luc Maranget, JFP 17(3), May 07. All ready for
someone to implement.
Simon
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1307>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs