unison/unison-src/transcripts/cycle-update-2.output.md
2022-09-22 12:57:22 -04:00

999 B

Update a member of a cycle with a type-preserving update, but sever the cycle.

ping : 'Nat
ping _ = !pong + 1

pong : 'Nat
pong _ = !ping + 2

  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

.> add

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

ping : 'Nat
ping _ = 3

  I found and typechecked these definitions in scratch.u. If you
  do an `add` or `update`, here's how your codebase would
  change:
  
    ⍟ These names already exist. You can `update` them to your
      new definition:
    
      ping : 'Nat

.> update

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

.> view ping pong

  ping : 'Nat
  ping _ = 3
  
  pong : 'Nat
  pong _ =
    use Nat +
    !ping + 2