unison/unison-src/transcripts/todo.md
2024-07-03 11:59:17 -04:00

2.7 KiB

Nothing to do

When there's nothing to do, todo says this:

scratch/main> todo

Dependents of todo

The todo command shows local (outside lib) terms that directly call todo.

scratch/main> builtins.mergeio lib.builtins
foo : Nat
foo = todo "implement foo"

bar : Nat
bar = foo + foo
scratch/main> add
scratch/main> todo
scratch/main> delete.project scratch

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.

scratch/main> builtins.mergeio lib.builtins
foo.bar = 15
baz = foo.bar + foo.bar
scratch/main> add
scratch/main> delete.namespace.force foo
scratch/main> todo
scratch/main> delete.project scratch

Conflicted names

The todo command shows conflicted names.

scratch/main> builtins.mergeio lib.builtins
foo = 16
bar = 17
scratch/main> add
scratch/main> debug.alias.term.force foo bar
scratch/main> todo
scratch/main> delete.project scratch

Definitions in lib

The todo command complains about terms and types directly in lib.

scratch/main> builtins.mergeio lib.builtins
lib.foo = 16
scratch/main> add
scratch/main> todo
scratch/main> delete.project scratch

Constructor aliases

The todo command complains about constructor aliases.

scratch/main> builtins.mergeio lib.builtins
type Foo = One
scratch/main> add
scratch/main> alias.term Foo.One Foo.Two
scratch/main> todo
scratch/main> delete.project scratch

Missing constructor names

The todo command complains about missing constructor names.

scratch/main> builtins.mergeio lib.builtins
type Foo = Bar
scratch/main> add
scratch/main> delete.term Foo.Bar
scratch/main> todo
scratch/main> delete.project scratch

Nested decl aliases

The todo command complains about nested decl aliases.

scratch/main> builtins.mergeio lib.builtins
structural type Foo a = One a | Two a a
structural type Foo.inner.Bar a = Uno a | Dos a a
scratch/main> add
scratch/main> todo
scratch/main> delete.project scratch

Stray constructors

The todo command complains about stray constructors.

scratch/main> builtins.mergeio lib.builtins
type Foo = Bar
scratch/main> add
scratch/main> alias.term Foo.Bar Baz
scratch/main> todo
scratch/main> delete.project scratch