unison/unison-src/transcripts/update-type-with-dependent-term.output.md

73 lines
1.4 KiB
Markdown
Raw Permalink Normal View History

``` unison
2024-01-10 01:38:04 +03:00
unique type Foo = Bar Nat
incrFoo : Foo -> Foo
incrFoo = cases Bar n -> Bar (n+1)
```
``` ucm
2024-01-10 01:38:04 +03:00
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
incrFoo : Foo -> Foo
```
``` ucm
scratch/main> add
2024-01-10 01:38:04 +03:00
⍟ I've added these definitions:
type Foo
incrFoo : Foo -> Foo
```
``` unison
2024-01-10 01:38:04 +03:00
unique type Foo = Bar Nat Nat
```
``` ucm
2024-01-10 01:38:04 +03:00
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
```
``` ucm
scratch/main> update
2024-01-10 01:38:04 +03:00
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.
```
``` unison:added-by-ucm scratch.u
2024-07-23 20:45:16 +03:00
type Foo = Bar Nat Nat
2024-08-02 00:49:45 +03:00
-- The definitions below no longer typecheck with the changes above.
-- Please fix the errors and try `update` again.
2024-07-23 20:45:16 +03:00
2024-01-10 01:38:04 +03:00
incrFoo : Foo -> Foo
incrFoo = cases Bar n -> Bar (n Nat.+ 1)
```