unison/unison-src/transcripts/fix1696.output.md

29 lines
625 B
Markdown
Raw Permalink Normal View History

``` unison
structural ability Ask where ask : Nat
ability Zoot where
zoot : Nat
Ask.provide : '{Zoot} Nat -> '{Ask} r -> r
Ask.provide answer asker =
h = cases
{r} -> r
{Ask.ask -> resume} -> handle resume !answer with h
handle !asker with h
dialog = Ask.provide 'zoot '("Awesome number: " ++ Nat.toText Ask.ask ++ "!")
> dialog
```
``` ucm
Loading changes detected in scratch.u.
The expression in red needs the {Zoot} ability, but this location does not have access to any abilities.
13 | dialog = Ask.provide 'zoot '("Awesome number: " ++ Nat.toText Ask.ask ++ "!")
```