-
Notifications
You must be signed in to change notification settings - Fork 272
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5252 from sellout/test-1327
- Loading branch information
Showing
4 changed files
with
126 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
```unison | ||
foo = 4 | ||
bar = 5 | ||
``` | ||
|
||
`alias.many` should be able to consume the numbered args produced by `ls`. Previously, `ls` would produce absolute paths, but `alias.many` required relative ones. | ||
|
||
Now `ls` returns a pair of the absolute search directory and the result relative to that search directory, so it can be used in both absolute and relative contexts. | ||
|
||
```ucm | ||
scratch/main> add | ||
scratch/main> ls | ||
scratch/main> alias.many 1-2 .ns1_nohistory | ||
``` |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
``` unison | ||
foo = 4 | ||
bar = 5 | ||
``` | ||
|
||
``` ucm | ||
Loading changes detected in scratch.u. | ||
I found and typechecked these definitions in scratch.u. If you | ||
do an `add` or `update`, here's how your codebase would | ||
change: | ||
⍟ These new definitions are ok to `add`: | ||
bar : ##Nat | ||
foo : ##Nat | ||
``` | ||
`alias.many` should be able to consume the numbered args produced by `ls`. Previously, `ls` would produce absolute paths, but `alias.many` required relative ones. | ||
|
||
Now `ls` returns a pair of the absolute search directory and the result relative to that search directory, so it can be used in both absolute and relative contexts. | ||
|
||
``` ucm | ||
scratch/main> add | ||
⍟ I've added these definitions: | ||
bar : ##Nat | ||
foo : ##Nat | ||
scratch/main> ls | ||
1. bar (##Nat) | ||
2. foo (##Nat) | ||
scratch/main> alias.many 1-2 .ns1_nohistory | ||
Here's what changed in .ns1_nohistory : | ||
Added definitions: | ||
1. bar : ##Nat | ||
2. foo : ##Nat | ||
Tip: You can use `undo` or use a hash from `reflog` to undo | ||
this change. | ||
``` |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
```ucm:hide | ||
scratch/main> builtins.merge | ||
``` | ||
|
||
Pretty-printing previously didn’t compensate for extra characters on a line that was about to be wrapped, resulting in a line-break without sufficient indentation. Now pretty-printing indents based on the starting column of the wrapped expression, not simply “prevIndent + 2”. | ||
|
||
```unison:hide | ||
failure msg context = Failure (typeLink Unit) msg (Any context) | ||
foo = Left (failure ("a loooooooooooooooooooooooooooooooooong" ++ "message with concatenation") ()) | ||
``` | ||
|
||
```ucm | ||
scratch/main> add | ||
scratch/main> edit foo | ||
scratch/main> load scratch.u | ||
``` |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
Pretty-printing previously didn’t compensate for extra characters on a line that was about to be wrapped, resulting in a line-break without sufficient indentation. Now pretty-printing indents based on the starting column of the wrapped expression, not simply “prevIndent + 2”. | ||
|
||
``` unison | ||
failure msg context = Failure (typeLink Unit) msg (Any context) | ||
foo = Left (failure ("a loooooooooooooooooooooooooooooooooong" ++ "message with concatenation") ()) | ||
``` | ||
|
||
``` ucm | ||
scratch/main> add | ||
⍟ I've added these definitions: | ||
failure : Text -> context -> Failure | ||
foo : Either Failure b | ||
scratch/main> edit foo | ||
☝️ | ||
I added 1 definitions to the top of scratch.u | ||
You can edit them there, then run `update` to replace the | ||
definitions currently in this namespace. | ||
scratch/main> load scratch.u | ||
Loading changes detected in scratch.u. | ||
I found and typechecked the definitions in scratch.u. This | ||
file has been previously added to the codebase. | ||
``` | ||
``` unison:added-by-ucm scratch.u | ||
foo : Either Failure b | ||
foo = | ||
use Text ++ | ||
Left | ||
(failure | ||
("a loooooooooooooooooooooooooooooooooong" | ||
++ "message with concatenation") | ||
()) | ||
``` | ||
|