error-message-index icon indicating copy to clipboard operation
error-message-index copied to clipboard

Add documentation for GHC-45510

Open Kleidukos opened this issue 1 year ago • 3 comments

@s-and-witch would you mind checking that the explanation is correct?

Kleidukos avatar Jun 06 '24 15:06 Kleidukos

This discussion prompted me to submit https://github.com/ghc-proposals/ghc-proposals/pull/656. Check out the updated proposal text and examples, I think it explains quite clearly what's actually happening.

int-index avatar Jun 07 '24 21:06 int-index

Whatever explanation we end up with for GHC-45510, the main ideas that need to be communicated are

  • only out-of-scope type variables are implicitly quantified
  • with RequiredTypeArguments, all variables are in scope in type/kind signatures, regardless of their namespace
  • but the namespace of a variable is decoupled from whether it's actually a type or term variable, so sometimes we end up with term variables accidentally used in type/kind-level contexts, which triggers GHC-45510

int-index avatar Jun 07 '24 21:06 int-index

Thanks a lot @s-and-witch and @int-index

Kleidukos avatar Jul 20 '24 10:07 Kleidukos