unisonweb / unison

A friendly programming language from the future
https://unison-lang.org
Other
5.81k stars 271 forks source link

Kind inference exception #5453

Open etorreborre opened 1 week ago

etorreborre commented 1 week ago

This declaration raises an exception during typecheck:

ability MyAbility g where
  get : '{MyAbility {g}} ()
Encountered exception:
[unifyVars] unknown type in decl result: {[Var User "g"]}
CallStack (from HasCallStack):
  error, called at src/Unison/KindInference/Generate.hs:322:22 in unison-parser-typechecker-0.0.0-KNkVGbTXlis2lnVjsRIJUx:Unison.KindInference.Generate

The proper declaration is:

ability MyAbility g where
  get : '{MyAbility g} ()

Environment (please complete the following information):