#1555: Reverse do notation: lexer bug?
--------------------------------+-------------------------------------------
Reporter: dons | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler (Parser) | Version: 6.6.1
Severity: normal | Keywords:
Difficulty: Easy (1 hr) | Os: Unknown
Testcase: | Architecture: Unknown
--------------------------------+-------------------------------------------
Noticed here:
http://calculist.blogspot.com/2007/07/cute-idiom-from-haskell.html
The following is accepted by GHC:
{{{
main = do
getChar -> c
print c
}}}
Yielding the same program as if we'd written;
{{{
main = do
c <- getChar
print c
}}}
The above blogger uses this to ingeniously embed:
{{{
gamma |- e -> v
}}}
in Haskell, but surely this is either a lexer bug, or an interesting
syntactic feature that shouldn't be enabled by default?
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1555>
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