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

Multiline associative operator usage looks strange #875

Open
tysonzero opened this issue Apr 18, 2022 · 2 comments
Open

Multiline associative operator usage looks strange #875

tysonzero opened this issue Apr 18, 2022 · 2 comments
Labels
style Nitpicking and things related to purely visual aspect for formatting.

Comments

@tysonzero
Copy link

tysonzero commented Apr 18, 2022

For example parsers:

parser = Foo <$> foo
     <|> Bar <$> baz <*> baz
     <|> Qux <$> tux

parser =
    Foo <$> foo
        <|> Bar <$> bar <*> baz
        <|> Qux <$> qux

Also chained lens updates

update = foo .~ 5
     >>> bar ?~ "new"
     >>> baz %~ (+ 1)

update =
    foo .~ 5
        >>> bar ?~ "new"
        >>> baz %~ (+ 1)

An option to be able keep the former would be fantastic.

Would fix fourmolu/fourmolu#168 once downstreamed.

@mrkkrp
Copy link
Member

mrkkrp commented Apr 19, 2022

Why is it strange?

@mrkkrp mrkkrp added the style Nitpicking and things related to purely visual aspect for formatting. label Apr 19, 2022
@tysonzero
Copy link
Author

I don't see how it could be considered reasonable...

Why should the first field modification be singled out and out of line with all the other field modifications? Likewise for parser options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
style Nitpicking and things related to purely visual aspect for formatting.
Projects
None yet
Development

No branches or pull requests

2 participants