mirror of
https://github.com/unisonweb/unison.git
synced 2024-09-17 13:27:30 +03:00
40ec9404b5
these had broken in the past when we made the modifier mandatory and nobody noticed until now
624 B
624 B
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
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 ++ "!")