Skip to content

Commit

Permalink
Rerun transcripts
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisPenner committed Nov 20, 2024
1 parent b6f8895 commit 4495ac2
Show file tree
Hide file tree
Showing 2 changed files with 198 additions and 698 deletions.
34 changes: 6 additions & 28 deletions unison-src/transcripts/definition-diff-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,8 @@ take n s =
{ r } -> Some r
handle s() with h n
fakeRefModify f g = g []
foreach f xs = match xs with
[] -> ()
x +: rest -> let
f x
foreach f rest
handleRequest =
use List +:
finalizers = [1, 2, 3]
addFinalizer f = fakeRefModify finalizers (fs -> f +: fs)
foreach (f -> ()) finalizers
id x = x
unitCase = id (x -> 1)
```

Expand Down Expand Up @@ -69,19 +58,8 @@ take n s =
then handle s () with h (n - 1)
else None
fakeRefModify2 f g = g []
foreach xs f = match xs with
[] -> ()
x +: rest -> let
f x
foreach rest f
handleRequest =
use List +:
finalizers = [1, 2, 3]
addFinalizer f = fakeRefModify2 finalizers (fs -> (f +: fs, ()))
foreach finalizers (f -> ())
id x = x
unitCase = id (x -> (1, ()))
```

``` ucm
Expand All @@ -100,10 +78,10 @@ More complex diff
GET /api/projects/diffs/diff/terms?oldBranchRef=main&newBranchRef=new&oldTerm=take&newTerm=take
```

Regression test
Regression test for weird behavior w/r to unit and parens.

``` api
GET /api/projects/diffs/diff/terms?oldBranchRef=main&newBranchRef=new&oldTerm=handleRequest&newTerm=handleRequest
GET /api/projects/diffs/diff/terms?oldBranchRef=main&newBranchRef=new&oldTerm=unitCase&newTerm=unitCase
```


Expand Down
Loading

0 comments on commit 4495ac2

Please sign in to comment.