Skip to content

Commit d93d442

Browse files
authored
Merge pull request #4885 from unisonweb/transcripts-cleanup
transcripts `mergeio` cleanup
2 parents 2f0c2e5 + d0bdd55 commit d93d442

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+177
-283
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ interpreter-tests.md
1111

1212
# Stack
1313
.stack-work
14+
.stack-work-hls
1415

1516
# Cabal
1617
dist-newstyle

unison-src/transcripts-manual/scheme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ This transcript executes very slowly, because the compiler has an
22
entire copy of base (and other stuff) within it.
33

44
```ucm:hide
5-
.> builtins.mergeio
5+
.> builtins.merge
66
.> pull.without-history unison.public.base.trunk base
77
```
88

unison-src/transcripts-using-base/_base.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ transcripts which contain less boilerplate.
1010
## Usage
1111

1212
```ucm:hide
13-
.> builtins.merge
1413
.> builtins.mergeio
1514
.> load unison-src/transcripts-using-base/base.u
1615
.> add

unison-src/transcripts-using-base/binary-encoding-nats.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
1-
2-
```ucm:hide
3-
.> builtins.merge
4-
.> builtins.mergeio
5-
.> load unison-src/transcripts-using-base/base.u
6-
.> add
7-
.> find
8-
```
9-
101
```unison
112
unique type EncDec = EncDec Text (Nat -> Bytes) (Bytes -> Optional (Nat, Bytes))
123

unison-src/transcripts-using-base/binary-encoding-nats.output.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
```unison
32
unique type EncDec = EncDec Text (Nat -> Bytes) (Bytes -> Optional (Nat, Bytes))
43

unison-src/transcripts-using-base/codeops.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11

22
Test for code serialization operations.
33

4-
```ucm:hide
5-
.> builtins.merge
6-
```
7-
84
Define a function, serialize it, then deserialize it back to an actual
95
function. Also ask for its dependencies for display later.
106

@@ -138,8 +134,8 @@ verified name link =
138134
with handleTest ("verified " ++ name)
139135
140136
rejected : Text -> [(Link.Term,Code)] ->{io2.IO} Result
141-
rejected name rco =
142-
handle verify name rco
137+
rejected name rco =
138+
handle verify name rco
143139
with expectFailure ("rejected " ++ name)
144140
145141
missed : Text -> Link.Term -> Result

unison-src/transcripts-using-base/codeops.output.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ verified name link =
134134
with handleTest ("verified " ++ name)
135135
136136
rejected : Text -> [(Link.Term,Code)] ->{io2.IO} Result
137-
rejected name rco =
138-
handle verify name rco
137+
rejected name rco =
138+
handle verify name rco
139139
with expectFailure ("rejected " ++ name)
140140
141141
missed : Text -> Link.Term -> Result

unison-src/transcripts-using-base/doc.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
# Computable documents in Unison
22

3-
```ucm:hide
4-
.> builtins.mergeio
5-
```
6-
73
Unison documentation is written in Unison and has some neat features:
84

95
* The documentation type provides a rich vocabulary of elements that go beyond markdown, including asides, callouts, tooltips, and more.

unison-src/transcripts-using-base/failure-tests.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ Exception ability directly, and the last is code validation. I don't
66
have an easy way to test the last at the moment, but the other two are
77
tested here.
88

9-
```ucm:hide
10-
.> builtins.mergeio
11-
```
12-
139
```unison
1410
test1 : '{IO, Exception} [Result]
1511
test1 = do
Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +0,0 @@
1-
```ucm:hide
2-
.> builtins.mergeio
3-
```
4-
5-
Tests some capabilities for catching runtime exceptions.
6-
7-
```unison
8-
catcher : '{IO} () ->{IO} Result
9-
catcher act =
10-
handle tryEval act with cases
11-
{ raise _ -> _ } -> Ok "caught"
12-
{ _ } -> Fail "nothing to catch"
13-
14-
tests _ =
15-
[ catcher do
16-
_ = 1/0
17-
()
18-
, catcher '(bug "testing")
19-
, handle tryEval (do 1+1) with cases
20-
{ raise _ -> _ } -> Fail "1+1 failed"
21-
{ 2 } -> Ok "got the right answer"
22-
{ _ } -> Fail "got the wrong answer"
23-
]
24-
```
25-
26-
```ucm
27-
.> add
28-
.> io.test tests
29-
```
30-

0 commit comments

Comments
 (0)