Quasi-quoting syntax is ambiguous with list comprehensions
There is an unfortunate ambiguity between list comprehension syntax and quasi-quotation. Consider the following with and without -XQuasiQuotes
(noted here,
let x = [ v | v <- [1,2,3]]
let x = [v| v <- [1,2,3]]
While the former is always a list comprehension, the latter is a quasi-quote when -XQuasiQuotes
is enabled.
The original quasi-quoting syntax required a dollar sign before the quoter, although this was dropped in 26f164e5.
9ba922ee suggests that the old dollar sign syntax is slated for eventual removal.
Unfortunately, given it has been five years since the requirement for a dollar sign was dropped I suspect it's a bit late to revert to the previous syntax. This ticket is simply meant to document the fact that this ambiguity exists.
Trac metadata
Trac field | Value |
---|---|
Version | 7.10.3 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | low |
Resolution | Unresolved |
Component | Compiler (Parser) |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |