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

Writer produces incorrect code for StringPattern #109

Closed
MartinSStewart opened this issue Feb 7, 2021 · 0 comments · Fixed by #110
Closed

Writer produces incorrect code for StringPattern #109

MartinSStewart opened this issue Feb 7, 2021 · 0 comments · Fixed by #110

Comments

@MartinSStewart
Copy link
Collaborator

This code

StringPattern "test"
    |> Node emptyRange
    |> Writer.writePattern
    |> Writer.write

produces test instead of "test".

This causes problems in case expressions where instead of generating

toString : MyType -> String
toString value =
    "Variant1" -> Variant1

elm-syntax's writer generates

toString : MyType -> String
toString value =
    Variant1 -> Variant1
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

Successfully merging a pull request may close this issue.

1 participant