Skip to content

Fix missing escaping-kind check in tcPatSynSig

Simon Peyton Jones requested to merge wip/T24686 into master

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.

Merge request reports