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

alias.type creates broken type #5467

Open
ChrisPenner opened this issue Nov 26, 2024 · 1 comment
Open

alias.type creates broken type #5467

ChrisPenner opened this issue Nov 26, 2024 · 1 comment
Labels

Comments

@ChrisPenner
Copy link
Contributor

alias.type copies the type, but no constructors, so if you try to do anything after aliasing your type UCM will fail :'(

Here's a transcript to demonstrate:

```unison
type AliasMe = AliasMe
```

```ucm
scratch/main> update
scratch/main> alias.type AliasMe MyAlias
```

```unison
x = 1
```

```ucm
scratch/main> update
```


  Sorry, I wasn't able to perform the update:

  The type MyAlias has some constructors with missing names, and
  I can't perform an update in this situation.

  You can use `view MyAlias` and
  `alias.term <hash> MyAlias.<ConstructorName>` to give names to
  each unnamed constructor, and then try the update again.
@aryairani
Copy link
Contributor

Good catch

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

No branches or pull requests

2 participants