Unicode brackets should be opening/closing tokens
Summary
The characters ⟦
, ⟧
, ⦇
, and ⦈
are not recognized as opening/closing tokens as described in proposal #229, causing some expressions to parse with normal brackets but fail with the Unicode variants (or vise versa).
Steps to reproduce
The following GHCi session demonstrates this:
λ> :set -XArrows -XTemplateHaskell -XUnicodeSyntax
λ> f (_, (x, _)) = x
λ> $[|5|]
5
λ> $⟦5⟧
<interactive>:4:1: error: parse error on input ‘$’
λ> (proc x -> (|f|)$[|x|]) 5
<interactive>:5:18: error: Parse error in command: [| x |]
λ> (proc x -> ⦇f⦈$[|x|]) 5
5
Expected behavior
Replacing brackets with their Unicode variants should not affect parsing (as long as -XUnicodeSyntax
is enabled). Specifically, in the example above $⟦5⟧
should parse successfully and (proc x -> ⦇f⦈$[|x|]) 5
should result in a parse error.
Environment
- GHC version used: HEAD