mirror of
https://github.com/unisonweb/unison.git
synced 2024-09-11 02:25:39 +03:00
fix suffix.md transcript
This commit is contained in:
parent
468d6251bf
commit
96e008f153
@ -39,10 +39,9 @@ Type-based search also benefits from this, we can just say `Nat` rather than `.b
|
||||
.> find : Nat -> [a] -> [a]
|
||||
```
|
||||
|
||||
## Preferring names not in `lib`
|
||||
## Preferring names not in `lib.*.lib.*`
|
||||
|
||||
Suffix-based resolution prefers names with fewer name segments that are equal to "lib". This
|
||||
has the effect of preferring names defined in your project to names from dependencies of your project, and names from indirect dependencies have even lower weight.
|
||||
Suffix-based resolution prefers names that are not in an indirect dependency.
|
||||
|
||||
```unison
|
||||
cool.abra.cadabra = "my project"
|
||||
@ -55,8 +54,11 @@ lib.distributed.lib.baz.qux = "indirect dependency"
|
||||
.> add
|
||||
```
|
||||
|
||||
```unison
|
||||
```unison:error
|
||||
> abra.cadabra
|
||||
```
|
||||
|
||||
```unison
|
||||
> baz.qux
|
||||
```
|
||||
|
||||
|
@ -57,10 +57,9 @@ Type-based search also benefits from this, we can just say `Nat` rather than `.b
|
||||
|
||||
|
||||
```
|
||||
## Preferring names not in `lib`
|
||||
## Preferring names not in `lib.*.lib.*`
|
||||
|
||||
Suffix-based resolution prefers names with fewer name segments that are equal to "lib". This
|
||||
has the effect of preferring names defined in your project to names from dependencies of your project, and names from indirect dependencies have even lower weight.
|
||||
Suffix-based resolution prefers names that are not in an indirect dependency.
|
||||
|
||||
```unison
|
||||
cool.abra.cadabra = "my project"
|
||||
@ -97,7 +96,6 @@ lib.distributed.lib.baz.qux = "indirect dependency"
|
||||
|
||||
```
|
||||
```unison
|
||||
> abra.cadabra
|
||||
> baz.qux
|
||||
```
|
||||
|
||||
@ -112,20 +110,41 @@ lib.distributed.lib.baz.qux = "indirect dependency"
|
||||
Now evaluating any watch expressions (lines starting with
|
||||
`>`)... Ctrl+C cancels.
|
||||
|
||||
1 | > abra.cadabra
|
||||
⧩
|
||||
"my project"
|
||||
|
||||
2 | > baz.qux
|
||||
1 | > baz.qux
|
||||
⧩
|
||||
"direct dependency 2"
|
||||
|
||||
```
|
||||
```unison
|
||||
> abra.cadabra
|
||||
```
|
||||
|
||||
```ucm
|
||||
|
||||
Loading changes detected in scratch.u.
|
||||
|
||||
I couldn't figure out what abra.cadabra refers to here:
|
||||
|
||||
1 | > abra.cadabra
|
||||
|
||||
The name abra.cadabra is ambiguous. I couldn't narrow it down
|
||||
by type, as any type would work here.
|
||||
|
||||
I found some terms in scope that have matching names and
|
||||
types. Maybe you meant one of these:
|
||||
|
||||
cool.abra.cadabra : Text
|
||||
distributed.abra.cadabra : Text
|
||||
|
||||
```
|
||||
```ucm
|
||||
.> view abra.cadabra
|
||||
|
||||
cool.abra.cadabra : Text
|
||||
cool.abra.cadabra = "my project"
|
||||
|
||||
lib.distributed.abra.cadabra : Text
|
||||
lib.distributed.abra.cadabra = "direct dependency 1"
|
||||
|
||||
.> view baz.qux
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user