This repository has been archived by the owner on Jun 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement intelligent breaking for poly-var type expressions
Fixes #245 Given: ```rescript type currencyPoly = [#USD | #CAD | #EUR] type currencyPoly = [#USD | #CAD | #EUR] ``` we have two different layouts: In the first example the user wrote them over multiple lines. The second has them on one line. This commit implements a new strategy to print these two examples. We now look at the style of the author: did he write it over multiple lines or not? If it is on one line, keep it on one line (unless it breaks the column width). If it is written over multiple lines, force break it over multiple lines. This is also consistent with how we print variant declaration.
- Loading branch information
Iwan
committed
Jan 22, 2021
1 parent
7415b09
commit 0f72e8c
Showing
3 changed files
with
48 additions
and
5 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