#2431: allow empty case analysis
---------------------------------+------------------------------------------
Reporter: RalfHinze | Owner:
Type: feature request | Status: new
Priority: low | Milestone: _|_
Component: Compiler | Version: 6.8.3
Severity: minor | Resolution:
Keywords: empty case analysis | Difficulty: Unknown
Testcase: | Architecture: Unknown
Os: Unknown |
---------------------------------+------------------------------------------
Comment (by [EMAIL PROTECTED]):
I tried to think of how parsing might go wrong. Consider the following
(contrived) example:
{{{
case foo of
[] ->
case bar of
(x:xs) ->
baz
}}}
Did you spot that the second alternative is indented with a tab rather
than spaces, (with editor tab width set to 2 instead of 8)? So although I
_intended_ to have the two alternatives for the outer case, and the inner
case empty, in fact the second pattern is indented further than the first,
and so there is a single alternative for each of the inner and outer
cases?
Well, I did say it was contrived. -fwarn-incomplete-patterns would catch
it.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2431#comment:6>
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