Skip to content

Commit

Permalink
Add transcript and update existing
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisPenner committed Aug 30, 2024
1 parent e38eebb commit 1a59338
Show file tree
Hide file tree
Showing 5 changed files with 72 additions and 4 deletions.
14 changes: 14 additions & 0 deletions unison-src/transcripts/delay-mismatch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
```ucm
scratch/main> builtins.merge lib.builtins
```

```unison:error
missingDo : 'Nat
missingDo = 2
```

```unison:error
superfluousDo : Nat
superfluousDo = do
2
```
54 changes: 54 additions & 0 deletions unison-src/transcripts/delay-mismatch.output.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
``` ucm
scratch/main> builtins.merge lib.builtins
Done.
```
``` unison
missingDo : 'Nat
missingDo = 2
```

``` ucm
Loading changes detected in scratch.u.
I found a value of type: Nat
where I expected to find: Unit -> Nat
1 | missingDo : 'Nat
2 | missingDo = 2
from right here:
2 | missingDo = 2
I expected the expression to be delayed, but it was not.
Are you missing a `do`?
```
``` unison
superfluousDo : Nat
superfluousDo = do
2
```

``` ucm
Loading changes detected in scratch.u.
I found a value of type: Unit ->{𝕖} Nat
where I expected to find: Nat
1 | superfluousDo : Nat
2 | superfluousDo = do
3 | 2
from right here:
3 | 2
I didn't expect this expression to be delayed, but it was.
Are you using a `do` where you don't need one,
or are you missing a `()` to force an expression?
```
2 changes: 1 addition & 1 deletion unison-src/transcripts/fix2354.output.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ x = 'f
Loading changes detected in scratch.u.
I found a value of type: (a1 ->{𝕖} a1) ->{𝕖} Nat
I found a value of type: (a1 ->{𝕖} a1) ->{𝕖} Nat
where I expected to find: (a -> 𝕣1) -> 𝕣
1 | f : (forall a . a -> a) -> Nat
Expand Down
4 changes: 2 additions & 2 deletions unison-src/transcripts/fix614.output.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ ex2 = do
Loading changes detected in scratch.u.
I found a value of type: a ->{Stream a} Unit
I found a value of type: a ->{Stream a} Unit
where I expected to find: Unit
2 | Stream.emit
Expand Down Expand Up @@ -104,7 +104,7 @@ ex4 =
Loading changes detected in scratch.u.
I found a value of type: [Nat]
I found a value of type: [Nat]
where I expected to find: Unit
2 | [1,2,3] -- no good
Expand Down
2 changes: 1 addition & 1 deletion unison-src/transcripts/hello.output.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ hmm = "Not, in fact, a number"
Loading changes detected in scratch.u.
I found a value of type: Text
I found a value of type: Text
where I expected to find: Nat
1 | hmm : .builtin.Nat
Expand Down

0 comments on commit 1a59338

Please sign in to comment.