Skip to content

alias.type creates broken type #5467

@ChrisPenner

Description

@ChrisPenner

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions