Warn only if Data.List.NonEmpty.unzip is applied to a type different from NonEmpty
Recently CLC has approved monomorphisation of Data.List.NonEmpty.unzip
from Functor f => f (a, b) -> (f a, f b)
to NonEmpty (a, b) -> (NonEmpty a, NonEmpty b)
. Mindful that this is a breaking change, CLC decided to add a pragma to Data.List.NonEmpty.unzip
first, warning about the future breaking change and suggesting to use Data.Functor.unzip
for polymorphic unzip
.
However, in practice most of the time Data.List.NonEmpty.unzip
is used precisely on NonEmpty
, thus we are pushing pedantic users, who want to keep their builds -Wall -Werror
tidy, into kinda wrong direction: to squash the warning they'd have to replace Data.List.NonEmpty.unzip
with a polymorphic Data.Functor.unzip
and make a note to migrate back once Data.List.NonEmpty.unzip
is made monomorphic (and warning removed).
Is it feasible to add an ad-hoc warning for Data.List.NonEmpty.unzip
which pops only if it is used either in polymorphic by f
contents or applied to a Functor
which is not NonEmpty
? Is it reasonably easy to check after type checking / renaming?