unison/unison-src/transcripts/update-type-turn-constructor-into-smart-constructor.md
2024-06-25 11:11:07 -07:00

355 B

scratch/main> builtins.merge lib.builtin
unique type Foo = Bar Nat

makeFoo : Nat -> Foo
makeFoo n = Bar (n+10)
scratch/main> add
unique type Foo = internal.Bar Nat

Foo.Bar : Nat -> Foo
Foo.Bar n = internal.Bar n
scratch/main> update
scratch/main> view Foo
scratch/main> find.verbose