Ticket #1555 (closed feature request: wontfix)
Reverse do notation: lexer bug?
| Reported by: | dons | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | _|_ |
| Component: | Compiler (Parser) | Version: | 6.6.1 |
| Keywords: | Cc: | dons@…, dherman@… | |
| Operating System: | Unknown/Multiple | Architecture: | Unknown/Multiple |
| Type of failure: | None/Unknown | Difficulty: | Easy (less than 1 hour) |
| Test Case: | Blocked By: | ||
| Blocking: | Related Tickets: |
Description
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?
Change History
Note: See
TracTickets for help on using
tickets.
