[Git][ghc/ghc][wip/24107] 13 commits: Only exit ghci in -e mode when :add command fails

Zubin (@wz1000) gitlab at gitlab.haskell.org
Fri Dec 8 06:38:56 UTC 2023



Zubin pushed to branch wip/24107 at Glasgow Haskell Compiler / GHC


Commits:
d5610737 by Claudio Bley at 2023-12-06T16:13:33-05:00
Only exit ghci in -e mode when :add command fails

Previously, when running `ghci -e ':add Sample.hs'` the process would
exit with exit code 1 if the file exists and could be loaded.

Fixes #24115

- - - - -
0f0c53a5 by Vladislav Zavialov at 2023-12-06T16:14:09-05:00
T2T in Patterns (#23739)

This patch implements the T2T (term-to-type) transformation in patterns.
Patterns that are checked against a visible forall can now be written
without the `type` keyword:

	  \(type t) (x :: t) -> ...   -- old
	  \t (x :: t) -> ...          -- new

The `t` binder is parsed and renamed as a term pattern (Pat), but
then undergoes a conversion to a type pattern (HsTyPat).
See the new function pat_to_type_pat in compiler/GHC/Tc/Gen/Pat.hs

- - - - -
10a1a6c6 by Sebastian Graf at 2023-12-06T16:14:45-05:00
Pmc: Fix SrcLoc and warning for incomplete irrefutable pats (#24234)

Before, the source location would point at the surrounding function definition,
causing the confusion in #24234.
I also took the opportunity to introduce a new `LazyPatCtx :: HsMatchContext _`
to make the warning message say "irrefutable pattern" instead of "pattern
binding".

- - - - -
36b9a38c by Matthew Pickering at 2023-12-06T16:15:21-05:00
libraries: Bump filepath to 1.4.200.1 and unix to 2.8.4.0

Updates filepath submodule
Updates unix submodule

Fixes #24240

- - - - -
91ff0971 by Matthew Pickering at 2023-12-06T16:15:21-05:00
Submodule linter: Allow references to tags

We modify the submodule linter so that if the bumped commit is a
specific tag then the commit is accepted.

Fixes #24241

- - - - -
86f652dc by Zubin Duggal at 2023-12-06T16:15:21-05:00
hadrian: set -Wno-deprecations for directory and Win32

The filepath bump to 1.4.200.1 introduces a deprecation warning.

See https://gitlab.haskell.org/ghc/ghc/-/issues/24240
    https://github.com/haskell/filepath/pull/206

- - - - -
7ac6006e by Sylvain Henry at 2023-12-06T16:16:02-05:00
Zap OccInfo on case binders during StgCse #14895 #24233

StgCse can revive dead binders:

  case foo of dead { Foo x y -> Foo x y; ... }
  ===>
  case foo of dead { Foo x y -> dead; ... } -- dead is no longer dead

So we must zap occurrence information on case binders.

Fix #14895 and #24233

- - - - -
57c391c4 by Sebastian Graf at 2023-12-06T16:16:37-05:00
Cpr: Turn an assertion into a check to deal with some dead code (#23862)

See the new `Note [Dead code may contain type confusions]`.

Fixes #23862.

- - - - -
fa148f6e by Zubin Duggal at 2023-12-08T06:38:53+00:00
driver: Ensure we actually clear the interactive context before reloading

Previously we called discardIC, but immediately after set the session
back to an old HscEnv that still contained the IC

Partially addresses #24107
Fixes #23405

- - - - -
a62d4cb2 by Zubin Duggal at 2023-12-08T06:38:53+00:00
driver: Ensure we force the lookup of old build artifacts before returning the build plan

This prevents us from retaining all previous build artifacts in memory until a
recompile finishes, instead only retaining the exact artifacts we need.

Fixes #24118

- - - - -
244d3315 by Zubin Duggal at 2023-12-08T06:38:53+00:00
testsuite: add test for #24118 and #24107

MultiLayerModulesDefsGhci was not able to catch the leak because it uses
:l which discards the previous environment.

Using :r catches both of these leaks

- - - - -
306cb4e3 by Zubin Duggal at 2023-12-08T06:38:53+00:00
compiler: Add some strictness annotations to ImportSpec and related constructors
This prevents us from retaining entire HscEnvs.

Force these ImportSpecs when forcing the GlobalRdrEltX

Adds an NFData instance for Bag

Fixes #24107

- - - - -
77a3b580 by Zubin Duggal at 2023-12-08T06:38:53+00:00
compiler: Force IfGlobalRdrEnv in NFData instance.

- - - - -


30 changed files:

- compiler/GHC/Core/Opt/CprAnal.hs
- compiler/GHC/Data/Bag.hs
- compiler/GHC/Driver/Make.hs
- compiler/GHC/Hs/Expr.hs
- compiler/GHC/HsToCore/Binds.hs
- compiler/GHC/HsToCore/Match.hs
- compiler/GHC/HsToCore/Pmc.hs
- compiler/GHC/HsToCore/Pmc/Utils.hs
- compiler/GHC/HsToCore/Quote.hs
- compiler/GHC/HsToCore/Utils.hs
- compiler/GHC/Stg/CSE.hs
- compiler/GHC/StgToCmm/Expr.hs
- compiler/GHC/Tc/Errors/Ppr.hs
- compiler/GHC/Tc/Errors/Types.hs
- compiler/GHC/Tc/Errors/Types/PromotionErr.hs
- compiler/GHC/Tc/Gen/App.hs
- compiler/GHC/Tc/Gen/Head.hs
- compiler/GHC/Tc/Gen/Pat.hs
- compiler/GHC/Types/Error/Codes.hs
- compiler/GHC/Types/Name/Reader.hs
- compiler/GHC/Unit/Module/ModIface.hs
- compiler/Language/Haskell/Syntax/Expr.hs
- ghc/GHCi/UI.hs
- hadrian/src/Settings/Warnings.hs
- libraries/filepath
- libraries/unix
- linters/lint-submodule-refs/Main.hs
- linters/linters-common/Linters/Common.hs
- testsuite/tests/ado/T22483.stderr
- + testsuite/tests/core-to-stg/T14895.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/fd0db14c439d7dbacc39e0ec9e932eaea1993228...77a3b580f561e62f5ac7ebf6588199575aafd3b4

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/fd0db14c439d7dbacc39e0ec9e932eaea1993228...77a3b580f561e62f5ac7ebf6588199575aafd3b4
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/20231208/df6eeca2/attachment.html>


More information about the ghc-commits mailing list