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

new update doesn't really do the right thing when updating a term to a constructor #4912

Open
mitchellwrosen opened this issue May 1, 2024 · 0 comments

Comments

@mitchellwrosen
Copy link
Member

mitchellwrosen commented May 1, 2024

If you add

foo.bar : Nat
foo.bar = 17

and then put

unique type foo = bar

into scratch.u, you'll see a scary message that says update will fail:

  Loading changes detected in ~/unison/trunk/scratch.u.


  I found and typechecked these definitions in ~/unison/trunk/scratch.u. If you do an `add` or
  `update`, here's how your codebase would change:

    x These definitions would fail on `add` or `update`:

      Reason
      blocked type foo
      ctor/term collision   foo.bar

      Tip: Use `help filestatus` to learn more.

... but update doesn't fail.

> update

  Okay, I'm searching the branch for code that needs to be updated...


  Done.

Now we have one name foo.bar that refers to two things.

> view foo.bar

  type foo = bar#hj9bfbk48b#0

  foo.bar#cq22mm4sca : Nat
  foo.bar#cq22mm4sca = 17
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

No branches or pull requests

1 participant