Skip to content
Snippets Groups Projects
Commit 28dd52ee authored by sheaf's avatar sheaf Committed by Marge Bot
Browse files

Unused tyvars in FamInst: only report user tyvars

This commit changes how we perform some validity checking for
coercion axioms to mirror how we handle default declarations for
associated type families. This allows us to keep track of whether
type variables in type and data family instances were user-written
or not, in order to only report the user-written ones in
"unused type variable" error messages.

Consider for example:

  {-# LANGUAGE PolyKinds #-}
  type family F
  type instance forall a. F = ()

In this case, we get two quantified type variables,
(k :: Type) and (a :: k); the second being user-written, but the first
is introduced by the typechecker. We should only report 'a' as being
unused, as the user has no idea what 'k' is.

Fixes #23734
parent a525a92a
No related branches found
No related tags found
1 merge request!1Add RTS option
Showing
with 261 additions and 144 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment