Add transcript and update existing

This commit is contained in:
Chris Penner 2024-08-30 10:29:48 -07:00
parent e38eebb7d3
commit 1a593388cf
5 changed files with 72 additions and 4 deletions

View File

@ -0,0 +1,14 @@
```ucm
scratch/main> builtins.merge lib.builtins
```
```unison:error
missingDo : 'Nat
missingDo = 2
```
```unison:error
superfluousDo : Nat
superfluousDo = do
2
```

View File

@ -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?
```

View File

@ -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

View File

@ -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
@ -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

View File

@ -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