mirror of
https://github.com/unisonweb/unison.git
synced 2024-09-19 14:29:27 +03:00
1.2 KiB
1.2 KiB
unique type Foo
= Bar Nat
| Baz Nat Nat
foo : Foo -> Nat
foo = cases
Bar n -> n
Baz n m -> n + m
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 Foo
foo : Foo -> Nat
.> add
⍟ I've added these definitions:
type Foo
foo : Foo -> Nat
unique type Foo
= Bar Nat
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 names already exist. You can `update` them to your
new definition:
type Foo
.> update
Okay, I'm searching the branch for code that needs to be
updated...
That's done. Now I'm making sure everything typechecks...
Typechecking failed. I've updated your scratch file with the
definitions that need fixing. Once the file is compiling, try
`update` again.
foo : Foo -> Nat
foo = cases
Bar n -> n
Baz n m -> n Nat.+ m
type Foo = Bar Nat