mirror of
https://github.com/unisonweb/unison.git
synced 2024-09-17 13:27:30 +03:00
5.7 KiB
5.7 KiB
Nothing to do
When there's nothing to do, todo
says this:
scratch/main> todo
You have no pending todo items. Good work! ✅
Dependents of todo
The todo
command shows local (outside lib
) terms that directly call todo
.
foo : Nat
foo = todo "implement foo"
bar : Nat
bar = foo + foo
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`:
bar : Nat
foo : Nat
scratch/main> add
⍟ I've added these definitions:
bar : Nat
foo : Nat
scratch/main> todo
These terms call `todo`.
1. foo
Direct dependencies without names
The todo
command shows hashes of direct dependencies of local (outside lib
) definitions that don't have names in
the current namespace.
foo.bar = 15
baz = foo.bar + foo.bar
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`:
baz : Nat
foo.bar : Nat
scratch/main> add
⍟ I've added these definitions:
baz : Nat
foo.bar : Nat
scratch/main> delete.namespace.force foo
Done.
⚠️
Of the things I deleted, the following are still used in the
following definitions. They now contain un-named references.
Dependency Referenced In
bar 1. baz
scratch/main> todo
These terms do not have any names in the current namespace.
1. #1jujb8oelv
Conflicted names
The todo
command shows conflicted names.
foo = 16
bar = 17
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`:
bar : Nat
foo : Nat
scratch/main> add
⍟ I've added these definitions:
bar : Nat
foo : Nat
scratch/main> debug.alias.term.force foo bar
Done.
scratch/main> todo
❓
The term bar has conflicting definitions: 1. foo 2.
bar#cq22mm4sca
Tip: Use `move.term` or `delete.term` to resolve the
conflicts.
Definitions in lib
The todo
command complains about terms and types directly in lib
.
lib.foo = 16
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`:
lib.foo : Nat
scratch/main> add
⍟ I've added these definitions:
lib.foo : Nat
scratch/main> todo
There's a type or term at the top level of the `lib`
namespace, where I only expect to find subnamespaces
representing library dependencies. Please move or remove it.
Constructor aliases
The todo
command complains about constructor aliases.
type Foo = One
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
scratch/main> add
⍟ I've added these definitions:
type Foo
scratch/main> alias.term Foo.One Foo.Two
Done.
scratch/main> todo
The type Foo has a constructor with multiple names. Please
delete all but one name for each constructor.
1. Foo.One
2. Foo.Two
Missing constructor names
The todo
command complains about missing constructor names.
type Foo = Bar
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
scratch/main> add
⍟ I've added these definitions:
type Foo
scratch/main> delete.term Foo.Bar
Done.
scratch/main> todo
These types have some constructors with missing names.
1. Foo
Nested decl aliases
The todo
command complains about nested decl aliases.
structural type Foo a = One a | Two a a
structural type Foo.inner.Bar a = Uno a | Dos a 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`:
structural type Foo a
structural type Foo.inner.Bar a
scratch/main> add
⍟ I've added these definitions:
structural type Foo a
structural type Foo.inner.Bar a
scratch/main> todo
These types are aliases, but one is nested under the other.
Please separate them or delete one copy.
1. Foo
2. Foo.inner.Bar
Stray constructors
The todo
command complains about stray constructors.
type Foo = Bar
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
scratch/main> add
⍟ I've added these definitions:
type Foo
scratch/main> alias.term Foo.Bar Baz
Done.
scratch/main> todo
These constructors are not nested beneath their corresponding
type names. Please either move or delete them.
1. Baz