6acab78c

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

#1637, add a typeApplications option for restricted functions

Reviving #1667 (closed stale). A function restriction may now set
'typeApplications' to require or forbid visible type applications at use
sites, so a silent change to an inferred type cannot change behaviour
unnoticed.

  - functions:
    - {name: show, typeApplications: required}     # >= 1 type argument
    - {name: fromIntegral, typeApplications: 2}    # >= N type arguments
    - {name: id, typeApplications: forbidden}      # none

'required' demands at least one type argument, an integer N demands at
least N (so fromIntegral, which needs both type variables fixed, can
require two), and 'forbidden' demands none. It also applies to data
constructors in patterns; defining occurrences (e.g. a Show instance's
'show') are never flagged.