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

Avoid line breaks in applications within a type signature #1850

Closed
paulcadman opened this issue Feb 16, 2023 · 0 comments · Fixed by #1852
Closed

Avoid line breaks in applications within a type signature #1850

paulcadman opened this issue Feb 16, 2023 · 0 comments · Fixed by #1852

Comments

@paulcadman
Copy link
Collaborator

The result of formatting:

exampleFunction : {A : Type} -> List A -> List A -> List A -> List A -> List A -> List A -> List A -> Nat;

is currently:

exampleFunction : {A : Type} -> List A -> List A -> List
      A -> List A -> List A -> List A -> List A -> Nat;

This type signature would be clearer if there was no line break between List and A.

paulcadman added a commit that referenced this issue Feb 21, 2023
I paired with @janmasrovira on this work.

Before this change - long type signatures were formatted to contain line
breaks within applications:

```
  exampleFunction : {A : Type} -> List A -> List A -> List
        A -> List A -> List A -> List A -> List A -> Nat;
```

After this change we treat `->` and an infix operator and format like
other infix applications:

```
  exampleFunction :
    {A : Type}
      -> List A
      -> List A
      -> List A
      -> List A
      -> List A
      -> List A
      -> List A
      -> Nat;
```

* Fixes #1850
Co-authored-by: @janmasrovira
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant