unison/unison-src/transcripts/abilities.output.md
Greg Pfeil 0031542faf
Add a space before code block info strings
This is for consistency with the `cmark` style. Now the blocks we still
pretty-print ourselves will match the bulk of them that `cmark`
produces.
2024-07-10 13:56:07 -06:00

872 B

Some random ability stuff to ensure things work.

unique ability A where
  one : Nat ->{A} Nat
  two : Nat -> Nat ->{A} Nat
  three : Nat -> Nat -> Nat ->{A} Nat
  four : Nat ->{A} (Nat -> Nat -> Nat -> Nat)

ha : Request {A} r -> r
ha = cases
  { x } -> x
  { one i -> c } -> handle c (i+1) with ha
  { two i j -> c } -> handle c (i+j) with ha
  { three i j k -> c } -> handle c (i+j+k) with ha
  { four i -> c } -> handle c (j k l -> i+j+k+l) with ha

  Loading changes detected in scratch.u.

  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 A
      ha : Request {A} r -> r

scratch/main> add

  ⍟ I've added these definitions:
  
    ability A
    ha : Request {A} r -> r