Skip to content

Commit 5a7e3b4

Browse files
committed
cleanup
1 parent a987756 commit 5a7e3b4

19 files changed

+102
-144
lines changed

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-
Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +0,0 @@
1-
Tests some capabilities for catching runtime exceptions.
2-
3-
```unison
4-
catcher : '{IO} () ->{IO} Result
5-
catcher act =
6-
handle tryEval act with cases
7-
{ raise _ -> _ } -> Ok "caught"
8-
{ _ } -> Fail "nothing to catch"
9-
10-
tests _ =
11-
[ catcher do
12-
_ = 1/0
13-
()
14-
, catcher '(bug "testing")
15-
, handle tryEval (do 1+1) with cases
16-
{ raise _ -> _ } -> Fail "1+1 failed"
17-
{ 2 } -> Ok "got the right answer"
18-
{ _ } -> Fail "got the wrong answer"
19-
]
20-
```
21-
22-
```ucm
23-
24-
Loading changes detected in scratch.u.
25-
26-
I found and typechecked these definitions in scratch.u. If you
27-
do an `add` or `update`, here's how your codebase would
28-
change:
29-
30-
⍟ These new definitions are ok to `add`:
31-
32-
catcher : '{IO} () ->{IO} Result
33-
tests : ∀ _. _ ->{IO} [Result]
34-
35-
```
36-
```ucm
37-
.> add
38-
39-
⍟ I've added these definitions:
40-
41-
catcher : '{IO} () ->{IO} Result
42-
tests : ∀ _. _ ->{IO} [Result]
43-
44-
.> io.test tests
45-
46-
New test results:
47-
48-
◉ tests caught
49-
◉ tests caught
50-
◉ tests got the right answer
51-
52-
✅ 3 test(s) passing
53-
54-
Tip: Use view tests to view the source of a test.
55-
56-
```

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

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
# Tests for TLS builtins
22

3-
```ucm:hide
4-
.> builtins.merge
5-
.> builtins.mergeio
6-
.> load unison-src/transcripts-using-base/base.u
7-
.> add
8-
```
9-
103
```unison:hide
114
-- generated with:
125
-- openssl req -newkey rsa:2048 -subj '/CN=test.unison.cloud/O=Unison/C=US' -nodes -keyout key.pem -x509 -days 3650 -out cert.pem

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
Test for new Text -> Bytes conversions explicitly using UTF-8 as the encoding
22

3-
```ucm:hide
4-
.> builtins.merge
5-
```
6-
73
Unison has function for converting between `Text` and a UTF-8 `Bytes` encoding of the Text.
84

95
```ucm

0 commit comments

Comments
 (0)