unison/unison-src/transcripts/fix1696.output.md
2020-11-11 12:33:46 -05:00

1.1 KiB

ability Ask where ask : Nat

unique 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

  I found and typechecked these definitions in scratch.u. If you
  do an `add` or `update`, here's how your codebase would
  change:
  
    ⍟ These new definitions are ok to `add`:
    
      ability Ask
      unique ability Zoot
      Ask.provide : '{Zoot} Nat -> '{Ask} r -> r
      dialog      : Text
  
  Now evaluating any watch expressions (lines starting with
  `>`)... Ctrl+C cancels.

  💔💥
  
  I stopped evaluation after encountering an unhandled request:
  
    zoot
  
  This happens when using a handler that doesn't handle all
  possible requests.
  
  I'm sorry this message doesn't have more detail about the
  location of the failure. My makers plan to fix this in a
  future release. 😢