unison/unison-src/transcripts/ability-order-doesnt-affect-hash.output.md
2024-07-31 16:41:00 -07:00

808 B

The order of a set of abilities is normalized before hashing.

unique ability Foo where
  foo : ()

unique ability Bar where
  bar : ()

term1 : () ->{Foo, Bar} ()
term1 _ = ()

term2 : () ->{Bar, Foo} ()
term2 _ = ()

  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 Bar
      ability Foo
      term1 : '{Bar, Foo} ()
      term2 : '{Bar, Foo} ()

scratch/main> add

  ⍟ I've added these definitions:
  
    ability Bar
    ability Foo
    term1 : '{Bar, Foo} ()
    term2 : '{Bar, Foo} ()

scratch/main> names term1

  Term
  Hash:   #8hum58rlih
  Names:  term1 term2