Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Template Haskell expressions with Unicode mathematical white square brackets: ParseFailed. #466

Open
kindaro opened this issue Nov 8, 2022 · 0 comments

Comments

@kindaro
Copy link

kindaro commented Nov 8, 2022

expected

The following code:

parseExpWithMode defaultParseMode {extensions = EnableExtension TemplateHaskell: EnableExtension UnicodeSyntax: extensions defaultParseMode} "⟦x⟧"

— Works and outputs some syntax tree.

actual

A parse error comes out:

ParseFailed ( SrcLoc "<unknown>.hs" 1 1 ) "Parse error: ⟦"

discussion

it works fine with ASCII

The following:

parseExpWithMode defaultParseMode {extensions = EnableExtension TemplateHaskell: EnableExtension UnicodeSyntax: extensions defaultParseMode} "[|x|]"

— Works and outputs some syntax tree.

the test case is broken

There is a test case tests/examples/brackets.hs that is expected to fail!

For example, this is the contents of the file tests/examples/brackets.hs.prettyprinter.golden:

ParseFailed (SrcLoc "tests/examples/brackets.hs" 17 3) "Parse error: \10631"

I reckon so because of #364. However, this test case checks for two things:

  • Unicode syntax for arrows.
  • Unicode syntax for Template Haskell.

There should ideally be two different test cases for these two features. Is there something that stops us from parsing Unicode Template Haskell expressions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant