unison/unison-src/transcripts/edit-namespace.md

39 lines
613 B
Markdown
Raw Permalink Normal View History

```ucm:hide
2024-06-10 22:49:02 +03:00
project/main> builtins.mergeio lib.builtin
```
2024-06-10 22:49:02 +03:00
```unison
{{ ping doc }}
nested.cycle.ping n = n Nat.+ pong n
{{ pong doc }}
nested.cycle.pong n = n Nat.+ ping n
toplevel = "hi"
simple.x = 10
simple.y = 20
-- Shouldn't edit things in lib
lib.project.ignoreMe = 30
2024-06-10 22:49:02 +03:00
-- Shouldn't render record accessors
unique type Foo = { bar : Nat, baz : Nat }
```
```ucm
2024-06-10 22:49:02 +03:00
project/main> add
```
2024-06-10 22:49:02 +03:00
`edit.namespace` edits the whole namespace (minus the top-level `lib`).
```ucm
2024-06-10 22:49:02 +03:00
project/main> edit.namespace
```
2024-06-10 22:49:02 +03:00
`edit.namespace` can also accept explicit paths
```ucm
2024-06-10 22:49:02 +03:00
project/main> edit.namespace nested simple
```