Closed ndmitchell closed 6 years ago
I created this list using the script https://gist.github.com/ndmitchell/da7159d724e634c3e2a0599a11bd2ae3
Doing Pat, I found:
PAsPat foo@foo
PIrrPat ~foo
PXETag <foo foo = foo foo />
PXPatTag <% foo %>
PQuasiQuote [$foo|foo|]
PBangPat !foo
Note that Lit and PLit are probably atomic for non-negative numbers, whereas currently via isLexeme (a probably redundant function that should be inlined) they are returned as True.
That script could be turned into a TH computation to keep isAtom
in sync with haskell-src-exts.
The script is useful, but it’s only a first approximation - it needs humans to check it. But an entry in the test suite might be reasonable.
I’m also somewhat weary of TH as it always causes build issues for someone somewhere.
The following things seem to be atomic to me, so probably should be marked as such. I've given the constructor name, and a small example expression.