Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge precondition message: Stray constructor alias #4984

Closed
Tracked by #4928
aryairani opened this issue May 20, 2024 · 0 comments · Fixed by #5032
Closed
Tracked by #4928

merge precondition message: Stray constructor alias #4984

aryairani opened this issue May 20, 2024 · 0 comments · Fixed by #5032

Comments

@aryairani
Copy link
Contributor

aryairani commented May 20, 2024

Stray constructor alias

Constructors may only exist within the corresponding decl's namespace.

Alice's branch:

project/alice> add

  ⍟ I've added these definitions:
  
    type Foo

project/alice> alias.term Foo.Bar AliasOutsideFooNamespace

  Done.

Bob's branch:

project/bob> add

  ⍟ I've added these definitions:
  
    bob : Nat

project/alice> merge bob

  On project/alice, the constructor AliasOutsideFooNamespace is
  not in a subnamespace of a name of its type. Please either
  delete it or rename it before merging.


Assuming it's hard to know at this stage whether there is already another name for AliasOutsideFooNamespace under Foo:

Sorry, I wasn't able to perform the merge, because I need all constructor names to be nested somewhere beneath the corresponding type name.

On project/alice, the constructor AliasOutsideFooNamespace is not nested beneath the corresponding type name.
Please either use rename to move it; or if it's an extra copy, you can simply delete it. Then try the merge again.


or if the type name is also available:

Sorry, I wasn't able to perform the merge, because I need all constructor names to be nested somewhere beneath the corresponding type name.

On project/alice, the constructor AliasOutsideFooNamespace is not nested beneath Foo.
Please either use rename to move it; or if it's an extra copy, you can simply delete it. Then try the merge again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant