unison/unison-src/transcripts/cycle-update-4.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

1.3 KiB

update properly discovers and establishes new cycles.

ping : 'Nat
ping _ = 1

pong : 'Nat
pong _ = !ping + 2

  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`:
    
      ping : 'Nat
      pong : 'Nat

scratch/main> add

  ⍟ I've added these definitions:
  
    ping : 'Nat
    pong : 'Nat

ping : 'Nat
ping _ = !clang + 1

clang : 'Nat
clang _ = !pong + 3

  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`:
    
      clang : 'Nat
    
    ⍟ These names already exist. You can `update` them to your
      new definition:
    
      ping : 'Nat

scratch/main> update.old ping

  ⍟ I've added these definitions:
  
    clang : 'Nat
  
  ⍟ I've updated these names to your new definition:
  
    ping : 'Nat
    pong : 'Nat

scratch/main> view ping pong clang

  clang : 'Nat
  clang _ =
    use Nat +
    pong() + 3
  
  ping : 'Nat
  ping _ =
    use Nat +
    clang() + 1
  
  pong : 'Nat
  pong _ =
    use Nat +
    ping() + 2