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

Put end on separate line when pretty printing definitions #2100

Merged
merged 1 commit into from
Aug 9, 2024

Conversation

xsebek
Copy link
Member

@xsebek xsebek commented Aug 9, 2024

 def intersperse
   = \n. \f2. \f1.
-  if (n > 0) {f1; if (n > 1) {f2} {}; intersperse (n - 1) f2 f1} {} end
+  if (n > 0) {f1; if (n > 1) {f2} {}; intersperse (n - 1) f2 f1} {}
+ end

You can test it with:

swarm format -i data/scenarios/Challenges/_arbitrage/solution.sw

```diff
 def intersperse
   = \n. \f2. \f1.
-  if (n > 0) {f1; if (n > 1) {f2} {}; intersperse (n - 1) f2 f1} {} end
+  if (n > 0) {f1; if (n > 1) {f2} {}; intersperse (n - 1) f2 f1} {}
+ end
```

* caused by #1928 where def was made more similar to let
@xsebek xsebek requested a review from byorgey August 9, 2024 15:05
@xsebek xsebek added the merge me Trigger the merge process of the Pull request. label Aug 9, 2024
@mergify mergify bot merged commit 6d1027c into main Aug 9, 2024
12 checks passed
@mergify mergify bot deleted the fix/xsebek/def-end-pretty branch August 9, 2024 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge me Trigger the merge process of the Pull request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants