This enhances typechecking in the case where the left hand side is a single identifier and the right hand side is a partial application of a higher rank function up to, but excluding, the polymorphic function argument or just that function. This used to give type errors, but now infers the higher rank type.

Hence if we have

  bar :: Bool -> (forall.[a]->[a]) -> [b] -> [b]

the following is ok:

  foo = bar       -- foo :: Bool -> (forall.[a]->[a]) -> [b] -> [b]
  baz = bar true  -- baz :: (forall.[a]->[a]) -> [b] -> [b]

while this is wrong:

  wrong f = bar true f

This is just like it works in GHC, according to my tests.

In addition, a lambda argument containing a forall type will cause the lambda to have higher rank type.
This fixes in part issue #47, however, the problem remains as higher rank types from
somewhere else (like a case) are still not passed upwards.