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

Improve formatter #1840

Merged

Conversation

janmasrovira
Copy link
Collaborator

@janmasrovira janmasrovira commented Feb 10, 2023

Now, if the body of a function clause does not fit in a line, the body will start indented in the next line.

The example presented in the linked issue is now formatted thus:

  go n s :=
    if
      (s < n)
      (go (sub n 1) s)
      (go n (sub s n) + go (sub n 1) s);

@janmasrovira janmasrovira added this to the 0.3 - Valencia milestone Feb 10, 2023
@janmasrovira janmasrovira self-assigned this Feb 10, 2023
@janmasrovira janmasrovira linked an issue Feb 10, 2023 that may be closed by this pull request
@janmasrovira janmasrovira marked this pull request as ready for review February 12, 2023 12:04
@paulcadman paulcadman force-pushed the 1793-the-juvix-formatter-works-poorly-with-multi-line-ifs branch from a1aa49b to a30d80d Compare February 14, 2023 14:17
@paulcadman paulcadman merged commit b47bb83 into main Feb 14, 2023
@paulcadman paulcadman deleted the 1793-the-juvix-formatter-works-poorly-with-multi-line-ifs branch February 14, 2023 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The Juvix formatter works poorly with multi-line ifs
2 participants