[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 5 commits: Don't store a GlobalRdrEnv in `mi_globals` for GHCi.

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Mon May 13 22:49:59 UTC 2024



Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC


Commits:
b6d7a108 by Zubin Duggal at 2024-05-13T18:49:44-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`.

- - - - -
1f923880 by Fendor at 2024-05-13T18:49:46-04:00
Add perf regression test for `-fwrite-if-simplified-core`

- - - - -
e70b5dca by Andrei Borzenkov at 2024-05-13T18:49:46-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.

- - - - -
eb7e0cf9 by Cheng Shao at 2024-05-13T18:49:47-04:00
hadrian: fix hadrian building with ghc-9.10.1

- - - - -
2bff819f by Cheng Shao at 2024-05-13T18:49:47-04:00
linters: fix lint-whitespace compilation with ghc-9.10.1

- - - - -


30 changed files:

- .gitlab/ci.sh
- 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


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/cac68837809c86bdeb7c1257a6463163c2a4510e...2bff819f5bb50728107ca665b25d27a85b432c5a

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/cac68837809c86bdeb7c1257a6463163c2a4510e...2bff819f5bb50728107ca665b25d27a85b432c5a
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/47b2f244/attachment.html>


More information about the ghc-commits mailing list