#1060: GHC accepts program with incorrect layout
----------------------------------+-----------------------------------------
Reporter: igloo | Owner:
Type: bug | Status: new
Priority: normal | Milestone: _|_
Component: Compiler (Parser) | Version: 6.6
Severity: normal | Keywords:
Difficulty: Unknown | Testcase: read027
Architecture: Unknown | Os: Unknown
----------------------------------+-----------------------------------------
GHC accepts this program:
{{{
f x = case x of
False -> do
{ return x; }
}}}
but according to the Haskell report the implicit { opened by the `of`
should be closed before the explicit {.
The bug does on to say, in a comment:
{{{
Update: arguably this should be allowed. The fix to the Haskell
layout rule to allow it is simple: in Section 9.3 in the rules that
govern the introduction of the <n> and {n} psuedo-tokens, we need
to prevent <n> being inserted before {. This could be a simple
side-condition on the rule that introduces <n>.
}}}
I can't see a Haskell' ticket for this at first glance.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1060>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs