You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The pretty-printer takes into account two names being aliases when picking the shortest non-ambiguous suffix for a name, but the parser/type-checker does not. This leads to aliases not round-tripping.
``` unison
util.ignore : a -> ()
util.ignore _ = ()
foo : ()
foo = ignore 3
```
``` 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`:
foo : ()
util.ignore : a -> ()
```
``` ucm
scratch/main> add
⍟ I've added these definitions:
foo : ()
util.ignore : a -> ()
```
``` unison
lib.base.ignore : a -> ()
lib.base.ignore _ = ()
```
``` 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`:
lib.base.ignore : a -> ()
(also named util.ignore)
```
``` ucm
scratch/main> add
⍟ I've added these definitions:
lib.base.ignore : a -> ()
(also named util.ignore)
scratch/main> edit.namespace
☝️
I added 2 definitions to the top of scratch.u
You can edit them there, then run `update` to replace the
definitions currently in this namespace.
scratch/main> load
Loading changes detected in scratch.u.
I couldn't figure out what ignore refers to here:
2 | foo = ignore 3
The name ignore is ambiguous. Its type should be: ##Nat ->
#00nv2kob8f
I found some terms in scope that have matching names and
types. Maybe you meant one of these:
util.ignore : a -> #00nv2kob8f
util.ignore : a -> #00nv2kob8f
```
🛑
The transcript failed due to an error in the stanza above. The error is:
I couldn't figure out what ignore refers to here:
2 | foo = ignore 3
The name ignore is ambiguous. Its type should be: ##Nat ->
#00nv2kob8f
I found some terms in scope that have matching names and
types. Maybe you meant one of these:
util.ignore : a -> #00nv2kob8f
util.ignore : a -> #00nv2kob8f
Environment (please complete the following information):
Describe and demonstrate the bug
The pretty-printer takes into account two names being aliases when picking the shortest non-ambiguous suffix for a name, but the parser/type-checker does not. This leads to aliases not round-tripping.
Input:
Output:
Environment (please complete the following information):
ucm --version
2241036The text was updated successfully, but these errors were encountered: