[Git][ghc/ghc][wip/ghc-9.8] 3 commits: Add support for deprecating exported items (proposal #134)
Ben Gamari (@bgamari)
gitlab at gitlab.haskell.org
Mon Jun 26 21:18:34 UTC 2023
Ben Gamari pushed to branch wip/ghc-9.8 at Glasgow Haskell Compiler / GHC
Commits:
95152283 by Ben Gamari at 2023-06-21T12:04:59-04:00
Add support for deprecating exported items (proposal #134)
This is an implementation of the deprecated exports proposal #134.
The proposal introduces an ability to introduce warnings to exports.
This allows for deprecating a name only when it is exported from a specific
module, rather than always depreacting its usage. In this example:
module A ({-# DEPRECATED "do not use" #-} x) where
x = undefined
---
module B where
import A(x)
`x` will emit a warning when it is explicitly imported.
Like the declaration warnings, export warnings are first accumulated within
the `Warnings` struct, then passed into the ModIface, from which they are
then looked up and warned about in the importing module in the `lookup_ie`
helpers of the `filterImports` function (for the explicitly imported names)
and in the `addUsedGRE(s)` functions where they warn about regular usages
of the imported name.
In terms of the AST information, the custom warning is stored in the
extension field of the variants of the `IE` type (see Trees that Grow for
more information).
The commit includes a bump to the haddock submodule added in MR #28
Signed-off-by: Bartłomiej Cieślar <bcieslar2001 at gmail.com>
- - - - -
cc2f3ecf by Ben Gamari at 2023-06-21T12:04:59-04:00
configure: Bump version to 9.8
Bumps Haddock submodule
- - - - -
1b541c1f by Ben Gamari at 2023-06-26T17:18:25-04:00
base: Bump version to 4.19
Updates all boot library submodules.
- - - - -
30 changed files:
- compiler/GHC.hs
- compiler/GHC/Driver/Flags.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/Hs/ImpExp.hs
- compiler/GHC/Iface/Make.hs
- compiler/GHC/Iface/Recomp.hs
- compiler/GHC/Iface/Syntax.hs
- compiler/GHC/Parser.y
- compiler/GHC/Parser/PostProcess.hs
- compiler/GHC/Rename/Env.hs
- compiler/GHC/Rename/Module.hs
- compiler/GHC/Rename/Names.hs
- compiler/GHC/Rename/Pat.hs
- compiler/GHC/Runtime/Loader.hs
- compiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Errors/Types.hs
- compiler/GHC/Tc/Gen/Export.hs
- compiler/GHC/Tc/Gen/Expr.hs
- compiler/GHC/Tc/Instance/Class.hs
- compiler/GHC/Tc/Module.hs
- compiler/GHC/Tc/Solver/Monad.hs
- compiler/GHC/Tc/Utils/Backpack.hs
- compiler/GHC/Tc/Utils/Monad.hs
- compiler/GHC/Types/Error/Codes.hs
- compiler/GHC/Types/Hint/Ppr.hs
- compiler/GHC/Types/Name/Env.hs
- compiler/GHC/Types/Name/Reader.hs
- compiler/GHC/Unit/Module/ModIface.hs
- compiler/GHC/Unit/Module/Warnings.hs
- compiler/ghc.cabal.in
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/c18658545ce45254a4679c13de5dcc56a4c8373f...1b541c1f4f270347cc8843558515e6fe9cb631a9
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/c18658545ce45254a4679c13de5dcc56a4c8373f...1b541c1f4f270347cc8843558515e6fe9cb631a9
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230626/cc1020f9/attachment-0001.html>
More information about the ghc-commits
mailing list