-
Notifications
You must be signed in to change notification settings - Fork 272
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5343 from unisonweb/fix-5340
- Loading branch information
Showing
5 changed files
with
186 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
```ucm:hide | ||
scratch/main> builtins.merge lib.builtin | ||
``` | ||
|
||
```unison | ||
type my.Foo = MkFoo | ||
type lib.dep.lib.dep.Foo = MkFoo | ||
my.foo = 17 | ||
lib.dep.lib.dep.foo = 18 | ||
``` | ||
|
||
```ucm | ||
scratch/main> add | ||
``` | ||
|
||
These references to type `Foo` and term `foo` are unambiguous (resolving to the `my.Foo` and `my.foo` in the | ||
file), even though indirect dependencies `lib.dep.lib.dep.Foo` and `lib.dep.lib.dep.foo` match by suffix. | ||
|
||
```unison | ||
type my.Foo = MkFoo | ||
type Bar = MkBar Foo | ||
``` | ||
|
||
```unison | ||
my.foo = 17 | ||
bar = foo Nat.+ foo | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
``` unison | ||
type my.Foo = MkFoo | ||
type lib.dep.lib.dep.Foo = MkFoo | ||
my.foo = 17 | ||
lib.dep.lib.dep.foo = 18 | ||
``` | ||
|
||
``` ucm | ||
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 lib.dep.lib.dep.Foo | ||
type my.Foo | ||
lib.dep.lib.dep.foo : Nat | ||
my.foo : Nat | ||
``` | ||
``` ucm | ||
scratch/main> add | ||
⍟ I've added these definitions: | ||
type lib.dep.lib.dep.Foo | ||
type my.Foo | ||
lib.dep.lib.dep.foo : Nat | ||
my.foo : Nat | ||
``` | ||
These references to type `Foo` and term `foo` are unambiguous (resolving to the `my.Foo` and `my.foo` in the | ||
file), even though indirect dependencies `lib.dep.lib.dep.Foo` and `lib.dep.lib.dep.foo` match by suffix. | ||
|
||
``` unison | ||
type my.Foo = MkFoo | ||
type Bar = MkBar Foo | ||
``` | ||
|
||
``` ucm | ||
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: | ||
⊡ Previously added definitions will be ignored: my.Foo | ||
⍟ These new definitions are ok to `add`: | ||
type Bar | ||
``` | ||
``` unison | ||
my.foo = 17 | ||
bar = foo Nat.+ foo | ||
``` | ||
|
||
``` ucm | ||
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: | ||
⊡ Previously added definitions will be ignored: my.foo | ||
⍟ These new definitions are ok to `add`: | ||
bar : Nat | ||
``` |