From 1a593388cf3e050d90955d519740e9dfa9b2e0f9 Mon Sep 17 00:00:00 2001 From: Chris Penner Date: Fri, 30 Aug 2024 10:29:48 -0700 Subject: [PATCH] Add transcript and update existing --- unison-src/transcripts/delay-mismatch.md | 14 +++++ .../transcripts/delay-mismatch.output.md | 54 +++++++++++++++++++ unison-src/transcripts/fix2354.output.md | 2 +- unison-src/transcripts/fix614.output.md | 4 +- unison-src/transcripts/hello.output.md | 2 +- 5 files changed, 72 insertions(+), 4 deletions(-) create mode 100644 unison-src/transcripts/delay-mismatch.md create mode 100644 unison-src/transcripts/delay-mismatch.output.md diff --git a/unison-src/transcripts/delay-mismatch.md b/unison-src/transcripts/delay-mismatch.md new file mode 100644 index 0000000000..b2df09efef --- /dev/null +++ b/unison-src/transcripts/delay-mismatch.md @@ -0,0 +1,14 @@ +```ucm +scratch/main> builtins.merge lib.builtins +``` + +```unison:error +missingDo : 'Nat +missingDo = 2 +``` + +```unison:error +superfluousDo : Nat +superfluousDo = do + 2 +``` diff --git a/unison-src/transcripts/delay-mismatch.output.md b/unison-src/transcripts/delay-mismatch.output.md new file mode 100644 index 0000000000..78c24dc8cf --- /dev/null +++ b/unison-src/transcripts/delay-mismatch.output.md @@ -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? + +``` diff --git a/unison-src/transcripts/fix2354.output.md b/unison-src/transcripts/fix2354.output.md index 226d20bc54..b5121d5eee 100644 --- a/unison-src/transcripts/fix2354.output.md +++ b/unison-src/transcripts/fix2354.output.md @@ -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 diff --git a/unison-src/transcripts/fix614.output.md b/unison-src/transcripts/fix614.output.md index 97ec65e00a..d55783c428 100644 --- a/unison-src/transcripts/fix614.output.md +++ b/unison-src/transcripts/fix614.output.md @@ -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 diff --git a/unison-src/transcripts/hello.output.md b/unison-src/transcripts/hello.output.md index b486a40213..e052846300 100644 --- a/unison-src/transcripts/hello.output.md +++ b/unison-src/transcripts/hello.output.md @@ -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