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

falsely removes parens #32

Open
lue-bird opened this issue Sep 7, 2021 · 1 comment
Open

falsely removes parens #32

lue-bird opened this issue Sep 7, 2021 · 1 comment

Comments

@lue-bird
Copy link
Contributor

lue-bird commented Sep 7, 2021

In the example

import Elm.CodeGen exposing (construct, parens, val, access)
import Elm.Pretty exposing (prettyExpression)
import Pretty exposing (pretty)

expression =
    construct "f"
        [ access
            (parens (construct "A" [ val "()" ]))
            "a"
        ]

When the expression is printed, the result is

expression |> prettyExpression |> pretty 120
--> "f A ().a"

but it should be

--> "f (A ()).a"
@rupertlssmith
Copy link
Collaborator

Thanks for the test case.

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

2 participants