Fix missing escaping-kind check in tcPatSynSig
Note [Escaping kind in type signatures]
explains how we deal
with escaping kinds in type signatures, e.g.
f :: forall r (a :: TYPE r). a
where the kind of the body is (TYPE r)
, but r
is not in scope outside the forall-type.
I had missed this subtlety in tcPatSynSig
, leading to #24686 (closed). This MR fixes it; and a similar bug in tc_top_lhs_type.