unison/unison-src/transcripts/fix987.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.4 KiB

First we'll add a definition:

structural ability DeathStar where
  attack : Text -> ()

spaceAttack1 x =
  y = attack "saturn"
  z = attack "neptune"
  "All done"

  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`:
    
      structural ability DeathStar
      spaceAttack1 : x ->{DeathStar} Text

Add it to the codebase:

scratch/main> add

  ⍟ I've added these definitions:
  
    structural ability DeathStar
    spaceAttack1 : x ->{DeathStar} Text

Now we'll try to add a different definition that runs the actions in a different order. This should work fine:

spaceAttack2 x =
  z = attack "neptune"
  y = attack "saturn"
  "All done"

  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`:
    
      spaceAttack2 : x ->{DeathStar} Text

scratch/main> add

  ⍟ I've added these definitions:
  
    spaceAttack2 : x ->{DeathStar} Text

Previously, this would fail because the hashing algorithm was being given one big let rec block whose binding order was normalized.