By convention some of us already use _1, etc. for type variables that are unused aside from in constraint computations, but perhaps we could support that explicitly and further allow _ to be used in types where the naming of that variable would be "meaningless", even at the top level.
An example: someone on Twitter objecting to a Halogen type signature again, I pointed out that there's only one type variable that is actually relevant:
raise :: forall s f g p o m. o -> HalogenM s f g p o m Unit
Could be:
raise :: forall o. o -> HalogenM _ _ _ _ o _ Unit
In this scheme.
Similar thing with _ in constraints:
expandError ∷ forall e1 e2 _1. Row.Union e1 _1 e2 ⇒ Error e1 → Error e2
expandError ∷ forall e1 e2. Row.Union e1 _ e2 ⇒ Error e1 → Error e2
How about "if the resulting type is inferred to be an unconstrained unknown, don't warn"?
I think @paf31 rule is simple enough and would be straightforward to implement. Do we want to move this to "Approved"?
Sure, moved.
Most helpful comment
How about "if the resulting type is inferred to be an unconstrained unknown, don't warn"?