[GHC] #2431: allow empty case analysis
GHC
trac at galois.com
Mon Aug 18 06:32:43 EDT 2008
#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 simonmar):
Replying to [comment:6 malcolm.wallace at cs.york.ac.uk]:
> 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)?
I realise the example is contrived, but I don't think we need to consider
it. The Haskell report defines tab stops to be 8 characters apart, so you
should always have your editor set to use 8-character tab stops when
editing Haskell code, because that's how the compiler sees it. Anything
else will cause confusion, in many more ways than just the example above.
If you don't like 8-char tabs then fine: use spaces instead, and `-fwarn-
tabs`, but you should still set your editor to use 8-char tabs so that you
can read other people's code.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2431#comment:7>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list