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

Wrongful "update" prompt / EffectConstructorHadMultipleEffects #5428

Open
Baccata opened this issue Oct 25, 2024 · 0 comments
Open

Wrongful "update" prompt / EffectConstructorHadMultipleEffects #5428

Baccata opened this issue Oct 25, 2024 · 0 comments
Labels

Comments

@Baccata
Copy link

Baccata commented Oct 25, 2024

Describe and demonstrate the bug

On a codebase that compiled correctly, pulling some functions in the scratch file leads UCM to prompt me to update, without having made any modifications to the function in question. Additionally, once I do attempt to update, the compiler fails to typecheck, with some cryptic error about ability constructors having multiple effects (when in fact it's just a polymorphic ability that has a higher-kinded type parameter)

.> clone @baccata/schemas/@baccata/multiple-effects-repro
.> edit Schematic

Then save the file without touching it : UCM prompts me to update the terms, despite them having received no changes :

  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 names already exist. You can `update` them to your new definition:
    
      type schemas.Alts u a
      type schemas.Fields s a
      type schemas.Schema a
      ability schemas.abilities.AltSchematic f r u
      ability schemas.abilities.FieldSchematic f s
      ability schemas.abilities.Schematic f

After that, run the update command.

.> update 

UCM then fails typechecking :

  Loading changes detected in ~/scratch.u.

  EffectConstructorHadMultipleEffects:
    {CompileTime f1569, CompileTime f1569} (Eval (f1569 a1568))
Screenshot 2024-10-25 at 10 21 50

I can then fix the typechecking error by removing the ability ascription on the RHS of handling functions :

Screenshot 2024-10-25 at 10 22 02

Doing this everywhere until I don't get typechecking errors reverts to the original state of the codebase.

Environment (please complete the following information):

  • release/0.5.27
  • macOS 14.5, ARM 64
  • vscode Unison extension v1.2.0
@Baccata Baccata added the bug label Oct 25, 2024
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

1 participant