cbd3c6a5

By: Tom Sydney Kerckhove <syd@cs-syd.eu>

#1637, address review on typeApplications

Only check positions that can carry a visible type application: the head of an
expression and a constructor in a pattern. A name in a type signature, a class
method signature, a record field declaration or a binder was flagged before,
where the advice cannot be followed. This replaces the narrower exclusion of
function-binding names.

A '@_' argument no longer counts towards 'required', since it leaves the type
just as inferred as writing no type argument at all, so 'fromIntegral @_ @_' is
now flagged under 'typeApplications: 2'. It still counts towards 'forbidden',
which asks that no visible type application is written at all.

When several rules restrict one name's type applications, the last-declared one
now wins. Merging them was arbitrary: a name cannot sensibly both require and
forbid a type application, and declaration order was previously lost entirely,
so neither the qualified/unqualified mix nor the order had any effect.
GitHub
configure