Make NoExtCon fields strict
This changes every unused TTG extension constructor to be strict in its field so that the pattern-match coverage checker is smart enough any such constructors are unreachable in pattern matches. This lets us remove nearly every use of `noExtCon` in the GHC API. The only ones we cannot remove are ones underneath uses of `ghcPass`, but that is only because GHC 8.8's and 8.10's coverage checkers weren't smart enough to perform this kind of reasoning. GHC HEAD's coverage checker, on the other hand, _is_ smart enough, so we guard these uses of `noExtCon` with CPP for now. Bumps the `haddock` submodule. Fixes #17992.
Showing
- compiler/GHC/Driver/Main.hs 0 additions, 1 deletioncompiler/GHC/Driver/Main.hs
- compiler/GHC/Hs/Binds.hs 9 additions, 19 deletionscompiler/GHC/Hs/Binds.hs
- compiler/GHC/Hs/Decls.hs 25 additions, 86 deletionscompiler/GHC/Hs/Decls.hs
- compiler/GHC/Hs/Expr.hs 20 additions, 32 deletionscompiler/GHC/Hs/Expr.hs
- compiler/GHC/Hs/Extension.hs 14 additions, 19 deletionscompiler/GHC/Hs/Extension.hs
- compiler/GHC/Hs/ImpExp.hs 2 additions, 5 deletionscompiler/GHC/Hs/ImpExp.hs
- compiler/GHC/Hs/Lit.hs 2 additions, 7 deletionscompiler/GHC/Hs/Lit.hs
- compiler/GHC/Hs/Pat.hs 1 addition, 4 deletionscompiler/GHC/Hs/Pat.hs
- compiler/GHC/Hs/Types.hs 9 additions, 29 deletionscompiler/GHC/Hs/Types.hs
- compiler/GHC/Hs/Utils.hs 0 additions, 22 deletionscompiler/GHC/Hs/Utils.hs
- compiler/GHC/HsToCore.hs 0 additions, 1 deletioncompiler/GHC/HsToCore.hs
- compiler/GHC/HsToCore/Arrows.hs 0 additions, 6 deletionscompiler/GHC/HsToCore/Arrows.hs
- compiler/GHC/HsToCore/Binds.hs 0 additions, 3 deletionscompiler/GHC/HsToCore/Binds.hs
- compiler/GHC/HsToCore/Coverage.hs 1 addition, 27 deletionscompiler/GHC/HsToCore/Coverage.hs
- compiler/GHC/HsToCore/Docs.hs 2 additions, 6 deletionscompiler/GHC/HsToCore/Docs.hs
- compiler/GHC/HsToCore/Expr.hs 0 additions, 7 deletionscompiler/GHC/HsToCore/Expr.hs
- compiler/GHC/HsToCore/Foreign/Decl.hs 1 addition, 1 deletioncompiler/GHC/HsToCore/Foreign/Decl.hs
- compiler/GHC/HsToCore/GuardedRHSs.hs 0 additions, 4 deletionscompiler/GHC/HsToCore/GuardedRHSs.hs
- compiler/GHC/HsToCore/ListComp.hs 1 addition, 7 deletionscompiler/GHC/HsToCore/ListComp.hs
- compiler/GHC/HsToCore/Match.hs 0 additions, 3 deletionscompiler/GHC/HsToCore/Match.hs
Loading
Please register or sign in to comment