-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make pretty Terms format prettier (#1464)
- improve layout of terms: - break lines on binds, unless it fits on one line - lambdas go on same line, but the body _can_ go to next line - def and let can have long body on next line (indented for def) - parens and braces have body indented if it does not fit on line - closes #11 Example using `--format` from #1459: ``` > cabal run swarm -O0 -- format scenarios/Challenges/_blender/patrol-clockwise.sw def forever = \c. c; force forever c end; def encircle = \lDir. \rDir. turn lDir; b <- blocked; if b {turn rDir} {wait 1}; fwBlocked <- blocked; if fwBlocked {turn rDir} {move} end; def patrolCW = force forever (force encircle right left) end; force patrolCW ```
- Loading branch information
Showing
4 changed files
with
108 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters