WIP: Factor out HsPatSigType for pat sigs/RULE term sigs (#16762)
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 my additions to `Note [HsType binders]`.
Showing
- compiler/GHC/Hs/Decls.hs 2 additions, 2 deletionscompiler/GHC/Hs/Decls.hs
- compiler/GHC/Hs/Extension.hs 5 additions, 0 deletionscompiler/GHC/Hs/Extension.hs
- compiler/GHC/Hs/Instances.hs 5 additions, 0 deletionscompiler/GHC/Hs/Instances.hs
- compiler/GHC/Hs/Pat.hs 1 addition, 1 deletioncompiler/GHC/Hs/Pat.hs
- compiler/GHC/Hs/Types.hs 59 additions, 9 deletionscompiler/GHC/Hs/Types.hs
- compiler/GHC/HsToCore/Quote.hs 3 additions, 3 deletionscompiler/GHC/HsToCore/Quote.hs
- compiler/GHC/Iface/Ext/Ast.hs 2 additions, 2 deletionscompiler/GHC/Iface/Ext/Ast.hs
- compiler/GHC/Parser/PostProcess.hs 2 additions, 2 deletionscompiler/GHC/Parser/PostProcess.hs
- compiler/GHC/Rename/Bind.hs 1 addition, 1 deletioncompiler/GHC/Rename/Bind.hs
- compiler/GHC/Rename/Expr.hs 1 addition, 1 deletioncompiler/GHC/Rename/Expr.hs
- compiler/GHC/Rename/HsType.hs 71 additions, 47 deletionscompiler/GHC/Rename/HsType.hs
- compiler/GHC/Rename/Module.hs 2 additions, 2 deletionscompiler/GHC/Rename/Module.hs
- compiler/GHC/Rename/Pat.hs 4 additions, 4 deletionscompiler/GHC/Rename/Pat.hs
- compiler/GHC/Tc/Gen/HsType.hs 4 additions, 5 deletionscompiler/GHC/Tc/Gen/HsType.hs
- compiler/GHC/Tc/Gen/Pat.hs 1 addition, 1 deletioncompiler/GHC/Tc/Gen/Pat.hs
- compiler/GHC/ThToHs.hs 2 additions, 2 deletionscompiler/GHC/ThToHs.hs
- testsuite/tests/hiefile/should_compile/hie007.hs 3 additions, 0 deletionstestsuite/tests/hiefile/should_compile/hie007.hs
Loading
Please register or sign in to comment