unison/unison-src/transcripts/type-modifier-are-optional.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

797 B

Type modifiers are optional, unique is the default.

Types and abilities may be prefixed with either unique or structural. When left unspecified, unique is assumed.

type Abc = Abc
unique type Def = Def
structural type Ghi = Ghi

ability MyAbility where const : a
unique ability MyAbilityU where const : a
structural ability MyAbilityS where const : a

  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`:
    
      type Abc
      type Def
      structural type Ghi
        (also named builtin.Unit)
      ability MyAbility
      structural ability MyAbilityS
      ability MyAbilityU