Skip to content

Whitespace-sensitive bang patterns (#1087, #17162)

Vladislav Zavialov requested to merge wip/whitespace-and-lookahead into master

This patch implements a part of GHC Proposal 229: "Simplify parsing of (~) and (!)" that covers five operators: (!), (~), (@), ($), and ($$).

Based on surrounding whitespace, these operators are disambiguated into bang patterns, lazy patterns, strictness annotations, and type applications, splices, and typed splices.

This patch doesn't cover the (-) operator or the -Woperator-whitespace warning, which are left as future work.

Edited by Vladislav Zavialov

Merge request reports