[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 3 commits: Don't store a GlobalRdrEnv in `mi_globals` for GHCi.
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Mon May 13 18:39:49 UTC 2024
Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC
Commits:
bcbca176 by Zubin Duggal at 2024-05-13T14:38:56-04:00
Don't store a GlobalRdrEnv in `mi_globals` for GHCi.
GHCi only needs the `mi_globals` field for modules imported with
:module +*SomeModule.
It uses this field to make the top level environment in `SomeModule` available
to the repl.
By default, only the first target in the command line parameters is
"star" loaded into GHCi. Other modules have to be manually "star" loaded
into the repl.
Storing the top level GlobalRdrEnv for each module is very wasteful, especially
given that we will most likely never need most of these environments.
Instead we store only the information needed to reconstruct the top level environment
in a module, which is the `IfaceTopEnv` data structure, consisting of all import statements
as well as all top level symbols defined in the module (not taking export lists into account)
When a particular module is "star-loaded" into GHCi (as the first commandline target, or via
an explicit `:module +*SomeModule`, we reconstruct the top level environment on demand using
the `IfaceTopEnv`.
- - - - -
e6b058e5 by Fendor at 2024-05-13T14:38:58-04:00
Add perf regression test for `-fwrite-if-simplified-core`
- - - - -
cac68837 by Andrei Borzenkov at 2024-05-13T14:38:59-04:00
Improve pattern to type pattern transformation (23739)
`pat_to_type_pat` function now can handle more patterns:
- TuplePat
- ListPat
- LitPat
- NPat
- ConPat
Allowing these new constructors in type patterns significantly
increases possible shapes of type patterns without `type` keyword.
This patch also changes how lookups in `lookupOccRnConstr` are
performed, because we need to fall back into
types when we didn't find a constructor on data level to perform
`ConPat` to type transformation properly.
- - - - -
30 changed files:
- compiler/GHC.hs
- compiler/GHC/Driver/Backend.hs
- compiler/GHC/Driver/Main.hs
- compiler/GHC/Hs/Type.hs
- compiler/GHC/Iface/Make.hs
- compiler/GHC/Iface/Syntax.hs
- compiler/GHC/IfaceToCore.hs
- compiler/GHC/Rename/Env.hs
- compiler/GHC/Rename/Names.hs
- compiler/GHC/Rename/Pat.hs
- compiler/GHC/Runtime/Eval.hs
- compiler/GHC/Runtime/Loader.hs
- compiler/GHC/Tc/Gen/App.hs
- compiler/GHC/Tc/Gen/Head.hs
- compiler/GHC/Tc/Gen/HsType.hs
- compiler/GHC/Tc/Gen/Pat.hs
- compiler/GHC/Tc/Module.hs
- compiler/GHC/Tc/Types.hs
- compiler/GHC/Tc/Utils/Backpack.hs
- compiler/GHC/Tc/Utils/Env.hs
- compiler/GHC/Tc/Utils/Monad.hs
- compiler/GHC/Types/Name/Reader.hs
- compiler/GHC/Types/PkgQual.hs
- compiler/GHC/Types/Unique/Set.hs
- compiler/GHC/Unit/Module/ModIface.hs
- compiler/Language/Haskell/Syntax/ImpExp.hs
- ghc/GHCi/UI.hs
- ghc/GHCi/UI/Info.hs
- ghc/GHCi/UI/Monad.hs
- testsuite/tests/perf/compiler/Makefile
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/2e0c7613fabd7521f13222b9a8ef942b530f16c5...cac68837809c86bdeb7c1257a6463163c2a4510e
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/2e0c7613fabd7521f13222b9a8ef942b530f16c5...cac68837809c86bdeb7c1257a6463163c2a4510e
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/20240513/5e2b4498/attachment.html>
More information about the ghc-commits
mailing list