Refactor ConDecl: Trac #14529
This patch refactors HsDecls.ConDecl. Specifically * ConDeclGADT was horrible, with all the information hidden inside con_res_ty. Now it's kept separate, as it should be. * ConDeclH98: use [LHsTyVarBndr] instead of LHsQTyVars for the existentials. There is no implicit binding here. * Add a field con_forall to both ConDeclGADT and ConDeclH98 which says if there is an explicit user-written forall. * Field renamings in ConDecl con_cxt to con_mb_cxt con_details to con_args There is an accompanying submodule update to Haddock. Also the following change turned out to remove a lot of clutter: * add a smart constructor for HsAppsTy, namely mkHsAppsTy, and use it consistently. This avoids a lot of painful pattern matching for the common singleton case. Two api-annotation tests (T10278, and T10399) are broken, hence marking them as expect_broken(14529). Alan is going to fix them, probably by changing the con_forall field to con_forall :: Maybe SrcSpan instead of Bool
Showing
- compiler/deSugar/DsMeta.hs 55 additions, 64 deletionscompiler/deSugar/DsMeta.hs
- compiler/hsSyn/Convert.hs 27 additions, 29 deletionscompiler/hsSyn/Convert.hs
- compiler/hsSyn/HsDecls.hs 87 additions, 53 deletionscompiler/hsSyn/HsDecls.hs
- compiler/hsSyn/HsTypes.hs 14 additions, 31 deletionscompiler/hsSyn/HsTypes.hs
- compiler/hsSyn/HsUtils.hs 41 additions, 49 deletionscompiler/hsSyn/HsUtils.hs
- compiler/parser/Parser.y 8 additions, 4 deletionscompiler/parser/Parser.y
- compiler/parser/RdrHsSyn.hs 35 additions, 35 deletionscompiler/parser/RdrHsSyn.hs
- compiler/rename/RnNames.hs 9 additions, 16 deletionscompiler/rename/RnNames.hs
- compiler/rename/RnSource.hs 77 additions, 39 deletionscompiler/rename/RnSource.hs
- compiler/rename/RnTypes.hs 52 additions, 43 deletionscompiler/rename/RnTypes.hs
- compiler/typecheck/TcHsType.hs 5 additions, 1 deletioncompiler/typecheck/TcHsType.hs
- compiler/typecheck/TcTyClsDecls.hs 62 additions, 75 deletionscompiler/typecheck/TcTyClsDecls.hs
- compiler/utils/ListSetOps.hs 6 additions, 1 deletioncompiler/utils/ListSetOps.hs
- testsuite/tests/ghc-api/annotations/all.T 4 additions, 2 deletionstestsuite/tests/ghc-api/annotations/all.T
- testsuite/tests/parser/should_compile/DumpParsedAst.stderr 21 additions, 39 deletionstestsuite/tests/parser/should_compile/DumpParsedAst.stderr
- testsuite/tests/parser/should_compile/DumpRenamedAst.stderr 64 additions, 63 deletionstestsuite/tests/parser/should_compile/DumpRenamedAst.stderr
- testsuite/tests/parser/should_compile/T14189.stderr 6 additions, 9 deletionstestsuite/tests/parser/should_compile/T14189.stderr
- testsuite/tests/patsyn/should_fail/T11039.stderr 2 additions, 1 deletiontestsuite/tests/patsyn/should_fail/T11039.stderr
- testsuite/tests/patsyn/should_fail/T11667.stderr 2 additions, 1 deletiontestsuite/tests/patsyn/should_fail/T11667.stderr
- testsuite/tests/rename/should_compile/T5331.stderr 1 addition, 1 deletiontestsuite/tests/rename/should_compile/T5331.stderr
Loading
Please register or sign in to comment