diff options
author | Vladislav Zavialov <vlad.z.4096@gmail.com> | 2019-10-30 08:44:34 +0300 |
---|---|---|
committer | Vladislav Zavialov <vlad.z.4096@gmail.com> | 2019-11-27 11:32:18 +0300 |
commit | 8168b42a95ddf37c56958955eef065eb8747470f (patch) | |
tree | a677a67987372dac9732ea67f6ab37a77c02641a /testsuite/tests/module | |
parent | 5a08f7d405bbedfdc20c07f64726899f594e9d07 (diff) | |
download | haskell-8168b42a95ddf37c56958955eef065eb8747470f.tar.gz |
Whitespace-sensitive bang patterns (#1087, #17162)wip/whitespace-and-lookahead
This patch implements a part of GHC Proposal #229 that covers five
operators:
* the bang operator (!)
* the tilde operator (~)
* the at operator (@)
* the dollar operator ($)
* the double dollar operator ($$)
Based on surrounding whitespace, these operators are disambiguated into
bang patterns, lazy patterns, strictness annotations, type
applications, splices, and typed splices.
This patch doesn't cover the (-) operator or the -Woperator-whitespace
warning, which are left as future work.
Diffstat (limited to 'testsuite/tests/module')
-rw-r--r-- | testsuite/tests/module/mod69.stderr | 4 | ||||
-rw-r--r-- | testsuite/tests/module/mod70.stderr | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/testsuite/tests/module/mod69.stderr b/testsuite/tests/module/mod69.stderr index db7487485e..dea161115e 100644 --- a/testsuite/tests/module/mod69.stderr +++ b/testsuite/tests/module/mod69.stderr @@ -1,4 +1,4 @@ mod69.hs:3:7: error: - Pattern syntax in expression context: x@1 - Did you mean to enable TypeApplications? + @-pattern in expression context: x@1 + Type application syntax requires a space before '@' diff --git a/testsuite/tests/module/mod70.stderr b/testsuite/tests/module/mod70.stderr index 093f166ebd..6e9f854b7a 100644 --- a/testsuite/tests/module/mod70.stderr +++ b/testsuite/tests/module/mod70.stderr @@ -1,2 +1,4 @@ -mod70.hs:3:9: error: Pattern syntax in expression context: ~1 +mod70.hs:3:9: error: + Lazy pattern in expression context: ~1 + Did you mean to add a space after the '~'? |