Skip to content
  • Ryan Scott's avatar
    Factor out HsPatSigType for pat sigs/RULE term sigs (#16762) · 102cfd67
    Ryan Scott authored and Marge Bot's avatar Marge Bot committed
    This implements chunks (2) and (3) of
    ghc/ghc#16762 (comment 270170). Namely,
    it introduces a dedicated `HsPatSigType` AST type, which represents
    the types that can appear in pattern signatures and term-level `RULE`
    binders. Previously, these were represented with `LHsSigWcType`.
    Although `LHsSigWcType` is isomorphic to `HsPatSigType`, the intended
    semantics of the two types are slightly different, as evidenced by
    the fact that they have different code paths in the renamer and
    typechecker.
    
    See also the new `Note [Pattern signature binders and scoping]` in
    `GHC.Hs.Types`.
    102cfd67