Skip to content
  • Simon Peyton Jones's avatar
    4d6394dd
    Fix missing escaping-kind check in tcPatSynSig · 4d6394dd
    Simon Peyton Jones authored and Marge Bot's avatar Marge Bot committed
    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.
    This MR fixes it; and a similar bug in tc_top_lhs_type. (The
    latter is tested by T24686a.)
    4d6394dd
    Fix missing escaping-kind check in tcPatSynSig
    Simon Peyton Jones authored and Marge Bot's avatar Marge Bot committed
    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.
    This MR fixes it; and a similar bug in tc_top_lhs_type. (The
    latter is tested by T24686a.)
Loading