[Git][ghc/ghc][wip/warn-badly-staged-types] 44 commits: Remove Ptr example from roles docs

Oleg Grenrus (@phadej) gitlab at gitlab.haskell.org
Sat Aug 26 13:47:20 UTC 2023



Oleg Grenrus pushed to branch wip/warn-badly-staged-types at Glasgow Haskell Compiler / GHC


Commits:
76a4d11b by Jaro Reinders at 2023-08-22T08:08:13-04:00
Remove Ptr example from roles docs

- - - - -
069729d3 by Bryan Richter at 2023-08-22T08:08:49-04:00
Guard against duplicate pipelines in forks

- - - - -
f861423b by Rune K. Svendsen at 2023-08-22T08:09:35-04:00
dump-decls: fix "Ambiguous module name"-error

Fixes errors of the following kind, which happen when dump-decls is run on a package that contains a module name that clashes with that of another package.

```
dump-decls: <no location info>: error:
    Ambiguous module name `System.Console.ANSI.Types':
      it was found in multiple packages:
      ansi-terminal-0.11.4 ansi-terminal-types-0.11.5
```

- - - - -
edd8bc43 by Krzysztof Gogolewski at 2023-08-22T12:31:20-04:00
Fix MultiWayIf linearity checking (#23814)

Co-authored-by: Thomas BAGREL <thomas.bagrel at tweag.io>

- - - - -
4ba088d1 by konsumlamm at 2023-08-22T12:32:02-04:00
Update `Control.Concurrent.*` documentation

- - - - -
015886ec by ARATA Mizuki at 2023-08-22T15:13:13-04:00
Support 128-bit SIMD on AArch64 via LLVM backend

- - - - -
52a6d868 by Krzysztof Gogolewski at 2023-08-22T15:13:51-04:00
Testsuite cleanup

- Remove misleading help text in perf_notes, ways are not metrics
- Remove no_print_summary - this was used for Phabricator
- In linters tests, run 'git ls-files' just once.
  Previously, it was called on each has_ls_files()
- Add ghc-prim.cabal to gitignore, noticed in #23726
- Remove ghc-prim.cabal, it was accidentally committed in 524c60c8cd

- - - - -
ab40aa52 by Alan Zimmerman at 2023-08-22T15:14:28-04:00
EPA: Use Introduce [DeclTag] in AnnSortKey

The AnnSortKey is used to keep track of the order of declarations for
printing when the container has split them apart.

This applies to HsValBinds and ClassDecl, ClsInstDecl.

When making modifications to the list of declarations, the new order
must be captured for when it must be printed. For each list of
declarations (binds and sigs for a HsValBind) we can just store the
list in order.

To recreate the list when printing, we must merge them, and this is
what the AnnSortKey records. It used to be indexed by SrcSpan, we now
simply index by a marker as to which list to take the next item from.

- - - - -
e7db36c1 by sheaf at 2023-08-23T08:41:28-04:00
Don't attempt pattern synonym error recovery

This commit gets rid of the pattern synonym error recovery mechanism
(recoverPSB). The rationale is that the fake pattern synonym binding
that the recovery mechanism introduced could lead to undesirable
knock-on errors, and it isn't really feasible to conjure up a
satisfactory binding as pattern synonyms can be used both in expressions
and patterns.
See Note [Pattern synonym error recovery] in GHC.Tc.TyCl.PatSyn.

It isn't such a big deal to eagerly fail compilation on a pattern synonym
that doesn't typecheck anyway.

Fixes #23467

- - - - -
6ccd9d65 by Ben Gamari at 2023-08-23T08:42:05-04:00
base: Don't use Data.ByteString.Internals.memcpy

This function is now deprecated from `bytestring`. Use
`Foreign.Marshal.Utils.copyBytes` instead.

Fixes #23880.

- - - - -
0bfa0031 by Matthew Pickering at 2023-08-23T13:43:48-04:00
hadrian: Uniformly pass buildOptions to all builders in runBuilder

In Builder.hs, runBuilderWith mostly ignores the buildOptions in BuildInfo.

This leads to hard to diagnose bugs as any build options you pass with
runBuilderWithCmdOptions are ignored for many builders.

Solution: Uniformly pass buildOptions to the invocation of cmd.

Fixes #23845

- - - - -
9cac8f11 by Matthew Pickering at 2023-08-23T13:43:48-04:00
Abstract windows toolchain setup

This commit splits up the windows toolchain setup logic into two
functions.

* FP_INSTALL_WINDOWS_TOOLCHAIN - deals with downloading the toolchain if
  it isn't already downloaded
* FP_SETUP_WINDOWS_TOOLCHAIN - sets the environment variables to point
  to the correct place

FP_SETUP_WINDOWS_TOOLCHAIN is abstracted from the location of the mingw
toolchain and also the eventual location where we will install the
toolchain in the installed bindist.

This is the first step towards #23608

- - - - -
6c043187 by Matthew Pickering at 2023-08-23T13:43:48-04:00
Generate build.mk for bindists

The config.mk.in script was relying on some variables which were
supposed to be set by build.mk but therefore never were when used to
install a bindist.

Specifically

* BUILD_PROF_LIBS to determine whether we had profiled libraries or not
* DYNAMIC_GHC_PROGRAMS to determine whether we had shared libraries or
  not

Not only were these never set but also not really accurate because you
could have shared libaries but still statically linked ghc executable.

In addition variables like GhcLibWays were just never used, so those
have been deleted from the script.

Now instead we generate a build.mk file which just directly specifies
which RtsWays we have supplied in the bindist and whether we have
DYNAMIC_GHC_PROGRAMS.

- - - - -
fe23629b by Matthew Pickering at 2023-08-23T13:43:48-04:00
hadrian: Add reloc-binary-dist-* targets

This adds a command line option to build a "relocatable" bindist.

The bindist is created by first creating a normal bindist and then
installing it using the `RelocatableBuild=YES` option. This creates a
bindist without any wrapper scripts pointing to the libdir.

The motivation for this feature is that we want to ship relocatable
bindists on windows and this method is more uniform than the ad-hoc
method which lead to bugs such as #23608 and #23476

The relocatable bindist can be built with the "reloc-binary-dist" target
and supports the same suffixes as the normal "binary-dist" command to
specify the compression style.

- - - - -
41cbaf44 by Matthew Pickering at 2023-08-23T13:43:48-04:00
packaging: Fix installation scripts on windows/RelocatableBuild case

This includes quite a lot of small fixes which fix the installation
makefile to work on windows properly. This also required fixing the
RelocatableBuild variable which seemed to have been broken for a long
while.

Sam helped me a lot writing this patch by providing a windows machine to
test the changes. Without him it would have taken ages to tweak
everything.

Co-authored-by: sheaf <sam.derbyshire at gmail.com>

- - - - -
03474456 by Matthew Pickering at 2023-08-23T13:43:48-04:00
ci: Build relocatable bindist on windows

We now build the relocatable bindist target on windows, which means we
test and distribute the new method of creating a relocatable bindist.

- - - - -
d0b48113 by Matthew Pickering at 2023-08-23T13:43:48-04:00
hadrian: Add error when trying to build binary-dist target on windows

The binary dist produced by `binary-dist` target doesn't work on windows
because of the wrapper script the makefile installs. In order to not
surprise any packagers we just give an error if someone tries to build
the old binary-dist target rather than the reloc-binary-dist target.

- - - - -
7cbf9361 by Matthew Pickering at 2023-08-23T13:43:48-04:00
hadrian: Remove query' logic to use tooldir

- - - - -
03fad42e by Matthew Pickering at 2023-08-23T13:43:48-04:00
configure: Set WindresCmd directly and removed unused variables

For some reason there was an indirection via the Windres variable before
setting WindresCmd. That indirection led to #23855.

I then also noticed that these other variables were just not used
anywhere when trying to work out what the correct condition was for this
bit of the configure script.

- - - - -
c82770f5 by sheaf at 2023-08-23T13:43:48-04:00
Apply shellcheck suggestion to SUBST_TOOLDIR
- - - - -
896e35e5 by sheaf at 2023-08-23T13:44:34-04:00
Compute hints from TcSolverReportMsg

This commit changes how hints are handled in conjunction with
constraint solver report messages.

Instead of storing `[GhcHint]` in the TcRnSolverReport error constructor,
we compute the hints depending on the underlying TcSolverReportMsg.
This disentangles the logic and makes it easier to add new hints for
certain errors.

- - - - -
a05cdaf0 by Alexander Esgen at 2023-08-23T13:45:16-04:00
users-guide: remove note about fatal Haddock parse failures

- - - - -
4908d798 by Ben Gamari at 2023-08-23T17:36:41-04:00
base: Introduce Data.Enum

- - - - -
f59707c7 by Ben Gamari at 2023-08-23T17:36:41-04:00
base: Add export list to GHC.Num.Integer

- - - - -
b1054053 by Ben Gamari at 2023-08-23T17:36:41-04:00
base: Add export list to GHC.Num

- - - - -
6baa481d by Ben Gamari at 2023-08-23T17:36:41-04:00
base: Add export list to GHC.Num.Natural

- - - - -
2ac15233 by Ben Gamari at 2023-08-23T17:36:41-04:00
base: Add export list to GHC.Float

- - - - -
f3c489de by Ben Gamari at 2023-08-23T17:36:41-04:00
base: Add export list to GHC.Real

- - - - -
94f59eaa by Ben Gamari at 2023-08-23T17:36:41-04:00
base: Eliminate module reexport in GHC.Exception

The metric increase here isn't strictly due to this commit but it's a
rather small, incidental change.

Metric Increase:
    T8095
    T13386

Metric Decrease:
    T8095
    T13386
    T18304

- - - - -
be1fc7df by Ben Gamari at 2023-08-23T17:36:41-04:00
base: Add disclaimers in internal modules

To warn users that these modules are internal and their interfaces may
change with little warning.

As proposed in Core Libraries Committee #146 [CLC146].

[CLC146]: https://github.com/haskell/core-libraries-committee/issues/146

- - - - -
0326f3f4 by sheaf at 2023-08-23T17:37:29-04:00
Bump Cabal submodule

We need to bump the Cabal submodule to include commit ec75950
which fixes an issue with a dodgy import Rep(..) which relied
on GHC bug #23570

- - - - -
0504cd08 by Facundo Domínguez at 2023-08-23T17:38:11-04:00
Fix typos in the documentation of Data.OldList.permutations
- - - - -
1420b8cb by Antoine Leblanc at 2023-08-24T16:18:17-04:00
Be more eager in TyCon boot validity checking

This commit performs boot-file consistency checking for TyCons into
checkValidTyCl. This ensures that we eagerly catch any mismatches,
which prevents the compiler from seeing these inconsistencies and
panicking as a result.

See Note [TyCon boot consistency checking] in GHC.Tc.TyCl.

Fixes #16127

- - - - -
d99c816f by Finley McIlwaine at 2023-08-24T16:18:55-04:00
Refactor estimation of stack info table provenance

This commit greatly refactors the way we compute estimated provenance for stack
info tables. Previously, this process was done using an entirely separate traversal
of the whole Cmm code stream to build the map from info tables to source locations.
The separate traversal is now fused with the Cmm code generation pipeline in
GHC.Driver.Main.

This results in very significant code generation speed ups when -finfo-table-map is
enabled. In testing, this patch reduces code generation times by almost 30% with
-finfo-table-map and -O0, and 60% with -finfo-table-map and -O1 or -O2 .

Fixes #23103

- - - - -
d3e0124c by Finley McIlwaine at 2023-08-24T16:18:55-04:00
Add a test checking overhead of -finfo-table-map

We want to make sure we don't end up with poor codegen performance resulting from
-finfo-table-map again as in #23103. This test adds a performance test tracking
total allocations while compiling ExactPrint with -finfo-table-map.

- - - - -
fcfc1777 by Ben Gamari at 2023-08-25T10:58:16-04:00
llvmGen: Add export list to GHC.Llvm.MetaData

- - - - -
5880fff6 by Ben Gamari at 2023-08-25T10:58:16-04:00
llvmGen: Allow LlvmLits in MetaExprs

This omission appears to be an oversight.

- - - - -
86ce92a2 by Ben Gamari at 2023-08-25T10:58:16-04:00
compiler: Move platform feature predicates to GHC.Driver.DynFlags

These are useful in `GHC.Driver.Config.*`.

- - - - -
a6a38742 by Ben Gamari at 2023-08-25T10:58:16-04:00
llvmGen: Introduce infrastructure for module flag metadata

- - - - -
e9af2cf3 by Ben Gamari at 2023-08-25T10:58:16-04:00
llvmGen: Don't pass stack alignment via command line

As of https://reviews.llvm.org/D103048 LLVM no longer supports the
`-stack-alignment=...` flag. Instead this information is passed via a
module flag metadata node.

This requires dropping support for LLVM 11 and 12.

Fixes #23870

- - - - -
a936f244 by Alan Zimmerman at 2023-08-25T10:58:56-04:00
EPA: Keep track of "in" token for WarningTxt category

A warning can now be written with a category, e.g.

    {-# WARNInG in "x-c" e "d" #-}

Keep track of the location of the 'in' keyword and string, as well as
the original SourceText of the label, in case it uses character escapes.

- - - - -
3df8a653 by Matthew Pickering at 2023-08-25T17:42:18-04:00
Remove redundant import in InfoTableProv

The copyBytes function is provided by the import of Foreign.

Fixes #23889

- - - - -
d6f807ec by Ben Gamari at 2023-08-25T17:42:54-04:00
gitlab/issue-template: Mention report-a-bug
- - - - -
5611e799 by Oleg Grenrus at 2023-08-26T16:25:11+03:00
Add warning for badly staged types.

Resolves #23829.

The stage violation results in out-of-bound names in splices.
Technically this is an error, but someone might rely on this!?

Internal changes:
- we now track stages for TyVars.
- thLevel (RunSplice _) = 0, instead of panic, as reifyInstances does
  in fact rename its argument type, and it can contain variables.

- - - - -


30 changed files:

- .gitignore
- .gitlab-ci.yml
- .gitlab/ci.sh
- .gitlab/issue_templates/bug.md
- compiler/CodeGen.Platform.h
- compiler/GHC/Cmm/CallConv.hs
- compiler/GHC/CmmToLlvm.hs
- compiler/GHC/CmmToLlvm/Config.hs
- compiler/GHC/Driver/Config/CmmToLlvm.hs
- compiler/GHC/Driver/DynFlags.hs
- compiler/GHC/Driver/Flags.hs
- compiler/GHC/Driver/GenerateCgIPEStub.hs
- compiler/GHC/Driver/Main.hs
- compiler/GHC/Driver/Pipeline/Execute.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/Hs/Binds.hs
- compiler/GHC/Hs/Decls.hs
- compiler/GHC/Iface/Make.hs
- compiler/GHC/Iface/Syntax.hs
- compiler/GHC/Llvm.hs
- compiler/GHC/Llvm/MetaData.hs
- compiler/GHC/Llvm/Ppr.hs
- compiler/GHC/Parser.y
- compiler/GHC/Parser/Annotation.hs
- compiler/GHC/Rename/HsType.hs
- compiler/GHC/Rename/Module.hs
- compiler/GHC/Rename/Splice.hs
- compiler/GHC/Rename/Splice.hs-boot
- compiler/GHC/StgToCmm/InfoTableProv.hs
- compiler/GHC/StgToCmm/Prim.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/1b78388c94f55df426a8a668a87c8916d89e8ed6...5611e799b4abf27fc8b80547742d4f88be399910

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/1b78388c94f55df426a8a668a87c8916d89e8ed6...5611e799b4abf27fc8b80547742d4f88be399910
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/20230826/f58ccef2/attachment-0001.html>


More information about the ghc-commits mailing list