[Git][ghc/ghc][wip/expand-do] 33 commits: Move lib{numa,dw} defines to RTS configure

Apoorv Ingle (@ani) gitlab at gitlab.haskell.org
Mon Oct 2 01:32:39 UTC 2023



Apoorv Ingle pushed to branch wip/expand-do at Glasgow Haskell Compiler / GHC


Commits:
54b2016e by John Ericson at 2023-09-23T11:40:41-04:00
Move lib{numa,dw} defines to RTS configure

Clean up the m4 to handle the auto case always and be more consistent.
Also simplify the CPP --- we should always have both headers if we are
using libnuma.

"side effects" (AC_DEFINE, and AC_SUBST) are removed from the macros to
better separate searching from actions taken based on search results.
This might seem overkill now, but will make shuffling logic between
configure scripts easier later.

The macro comments are converted from `dnl` to `#` following the
recomendation in
https://www.gnu.org/software/autoconf/manual/autoconf-2.71/html_node/Macro-Definitions.html

- - - - -
d51b601b by John Ericson at 2023-09-23T11:40:50-04:00
Shuffle libzstd configuring between scripts

Like the prior commit for libdw and libnuma, `AC_DEFINE` to RTS
configure, `AC_SUBST` goes to the top-level configure script, and the
documentation of the m4 macro is improved.

- - - - -
d1425af0 by John Ericson at 2023-09-23T11:41:03-04:00
Move `FP_ARM_OUTLINE_ATOMICS` to RTS configure

It is just `AC_DEFINE` it belongs there instead.

- - - - -
18de37e4 by John Ericson at 2023-09-23T11:41:03-04:00
Move mmap in the runtime linker check to the RTS configure

`AC_DEFINE` should go there instead.

- - - - -
74132c2b by Andrew Lelechenko at 2023-09-25T21:56:54-04:00
Elaborate comment on GHC_NO_UNICODE

- - - - -
de142aa2 by Ben Gamari at 2023-09-26T15:25:03-04:00
gitlab-ci: Mark T22012 as broken on CentOS 7

Due to #23979.

- - - - -
6a896ce8 by Teo Camarasu at 2023-09-26T15:25:39-04:00
hadrian: better error for failing to find file's dependencies

Resolves #24004

- - - - -
d697a6c2 by Stefan Holdermans at 2023-09-26T20:58:37+00:00
Refactor uses of `partitionEithers . map`

This patch changes occurences of the idiom
`partitionEithers (map f xs)` by the simpler form
`partitionWith f xs` where `partitionWith` is the utility function
defined in `GHC.Utils.Misc`.

Resolves: #23953

- - - - -
8a2968b7 by Stefan Holdermans at 2023-09-26T20:58:37+00:00
Refactor uses of `partitionEithers <$> mapM f xs`

This patch changes occurences of the idiom
`partitionEithers <$> mapM f xs` by the simpler form
`partitionWithM f xs` where `partitionWithM` is a utility function
newly added to `GHC.Utils.Misc`.

- - - - -
6a27eb97 by Stefan Holdermans at 2023-09-26T20:58:37+00:00
Mark `GHC.Utils.Misc.partitionWithM` as inlineable

This patch adds an `INLINEABLE` pragma for `partitionWithM` to ensure
that the right-hand side of the definition of this function remains
available for specialisation at call sites.

- - - - -
f1e5245a by David Binder at 2023-09-27T01:19:00-04:00
Add RTS option to supress tix file

- - - - -
1f43124f by David Binder at 2023-09-27T01:19:00-04:00
Add expected output to testsuite in test interface-stability/base-exports

- - - - -
b9d2c354 by David Binder at 2023-09-27T01:19:00-04:00
Expose HpcFlags and getHpcFlags from GHC.RTS.Flags

- - - - -
345675c6 by David Binder at 2023-09-27T01:19:00-04:00
Fix expected output of interface-stability test

- - - - -
146e1c39 by David Binder at 2023-09-27T01:19:00-04:00
Implement getHpcFlags

- - - - -
61ba8e20 by David Binder at 2023-09-27T01:19:00-04:00
Add section in user guide

- - - - -
ea05f890 by David Binder at 2023-09-27T01:19:01-04:00
Rename --emit-tix-file to --write-tix-file

- - - - -
cabce2ce by David Binder at 2023-09-27T01:19:01-04:00
Update the golden files for interface stability

- - - - -
1dbdb9d0 by Krzysztof Gogolewski at 2023-09-27T01:19:37-04:00
Refactor: introduce stgArgRep

The function 'stgArgType' returns the type in STG. But this violates
the abstraction: in STG we're supposed to operate on PrimReps.

This introduces
stgArgRep ty = typePrimRep (stgArgType ty)
stgArgRep1 ty = typePrimRep1 (stgArgType ty)
stgArgRep_maybe ty = typePrimRep_maybe (stgArgType ty)

stgArgType is still directly used for unboxed tuples (should be fixable), FFI
and in ticky.

- - - - -
b02f8042 by Mario Blažević at 2023-09-27T17:33:28-04:00
Fix TH pretty-printer's parenthesization

This PR Fixes `Language.Haskell.TH.Ppr.pprint` so it correctly emits parentheses where needed.

Fixes #23962, #23968, #23971, and #23986

- - - - -
79104334 by Krzysztof Gogolewski at 2023-09-27T17:34:04-04:00
Add a testcase for #17564

The code in the ticket relied on the behaviour of Derived constraints.
Derived constraints were removed in GHC 9.4 and now the code works
as expected.

- - - - -
d7a80143 by sheaf at 2023-09-28T03:25:53-04:00
lint-codes: add new modes of operation

This commit adds two new modes of operation to the lint-codes
utility:

  list - list all statically used diagnostic codes
  outdated - list all outdated diagnostic codes

The previous behaviour is now:

  test - test consistency and coverage of diagnostic codes

- - - - -
477d223c by sheaf at 2023-09-28T03:25:53-04:00
lint codes: avoid using git-grep

We manually traverse through the filesystem to find the diagnostic codes
embedded in .stdout and .stderr files, to avoid any issues with old
versions of grep.

Fixes #23843

- - - - -
a38ae69a by sheaf at 2023-09-28T03:25:53-04:00
lint-codes: add Hadrian targets

This commit adds new Hadrian targets:

  codes, codes:used - list all used diagnostic codes
  codes:outdated - list outdated diagnostic codes

This allows users to easily query GHC for used and outdated
diagnostic codes, e.g.

  hadrian/build -j --flavour=<..> codes

will list all used diagnostic codes in the command line by running
the lint-codes utility in the "list codes" mode of operation.

The diagnostic code consistency and coverage test is still run as usual,
through the testsuite:

  hadrian/build test --only="codes"

- - - - -
9cdd629b by Ben Gamari at 2023-09-28T03:26:29-04:00
hadrian: Install LICENSE files in bindists

Fixes #23548.

- - - - -
b8ebf876 by Matthew Craven at 2023-09-28T03:27:05-04:00
Fix visibility when eta-reducing a type lambda

Fixes #24014.

- - - - -
a53f6318 by Apoorv Ingle at 2023-09-28T14:15:01-05:00
Fixes #18324 #23147 #20020
Expands do notation before typechecking using `HsExpansion`
- Adds testcases T18324, T18324b, DoubleMatch
Expands
- Do statements
- Monadic do statements
- monadic fix blocks
- make sure fail is used for pattern match failures in bind statments
- Makes sure unused binds generate warnings
- runs the pattern match check in generated lambda exprs to avoid getting suprious pattern match failures. c.f. pmcheck/should_compile/DoubleMatch.hs
- PopSrcSpan in HsExpr to pop error context
- Discards default monad fail alternatives that are spuriously generated
- Make sure we check for generated loc span for checking if the (>>) is user written or expanded for /do/ purposes

- Add PopSrcSpan (XXExprGhcRn) in appropriate places while expanding statements
- correct source spans displayed for warnDiscardedDoBindings
- use `mkExpandStmt` to store original stmts along with expanded expr for using the right context for error message printing
- improves error messages for applicative do
- remove special case from isMatchContextPmChecked (long distance info is now properly propogated)
- set correct src spans to statement expansions
- Match ctxt while type checking HsLam is different if the lambda match is due to an expression generated from a do block
- call tcExpr and not tcApp in PopSrcSpan so make sure impredicativity works fine
- look into XExprs in tcInferAppHead_maybe for infering the type to make T18324 typecheck and run

- make the ExpandedStmt generated expression location-less
- Introduce ExpansionStmt for proper `hsSplitApps`
- Introduce `VAExpansionStmt` that is just like `VAExpansion` but for statements
- Aligning expand stmt context pushing on error stack.
- Pop error context while checking do expansion generated GRHSs inside HsLam so that we do not print the previous statement error context
- makes template haskell happy
- some fix for let expansions
- refactor tcExpr into tcExpr and tcXExpr
- adding Note and references
- make monad fail errors normal again

- - - - -
0a4f83ed by Apoorv Ingle at 2023-09-28T14:15:05-05:00
cleanup

- - - - -
ffbb1090 by Apoorv Ingle at 2023-09-28T14:15:05-05:00
Generated Origin now carries HsStmtContext so that we don't have to recreate it

- - - - -
4f08bfb4 by Apoorv Ingle at 2023-09-28T14:15:05-05:00
trying to fix ghci-debugger issues

- - - - -
1962b801 by Apoorv Ingle at 2023-09-28T14:15:05-05:00
fixes for  Note [Expanding HsDo with HsExpansion]

- - - - -
e9c414b0 by Apoorv Ingle at 2023-09-28T14:15:05-05:00
some more trials for debugger

- - - - -
bfa57420 by Apoorv Ingle at 2023-10-01T20:32:20-05:00
do not duplicate ExpansionStmt argument applications

- - - - -


30 changed files:

- .gitlab/generate-ci/gen_ci.hs
- .gitlab/jobs.yaml
- compiler/GHC/Cmm/DebugBlock.hs
- compiler/GHC/Cmm/Pipeline.hs
- compiler/GHC/Core/Opt/Arity.hs
- compiler/GHC/CoreToStg.hs
- compiler/GHC/Driver/DynFlags.hs
- compiler/GHC/Driver/Make.hs
- compiler/GHC/Driver/Pipeline.hs
- compiler/GHC/Hs/Expr.hs
- compiler/GHC/Hs/Instances.hs
- compiler/GHC/Hs/Pat.hs
- compiler/GHC/Hs/Syn/Type.hs
- compiler/GHC/Hs/Utils.hs
- compiler/GHC/HsToCore/Arrows.hs
- compiler/GHC/HsToCore/Expr.hs
- compiler/GHC/HsToCore/Match.hs
- compiler/GHC/HsToCore/Pmc.hs
- compiler/GHC/HsToCore/Pmc/Solver.hs
- compiler/GHC/HsToCore/Quote.hs
- compiler/GHC/HsToCore/Ticks.hs
- compiler/GHC/Iface/Ext/Ast.hs
- compiler/GHC/Linker/Deps.hs
- compiler/GHC/Rename/Expr.hs
- compiler/GHC/Rename/Utils.hs
- compiler/GHC/Runtime/Eval.hs
- compiler/GHC/Stg/Lint.hs
- compiler/GHC/Stg/Syntax.hs
- compiler/GHC/Stg/Unarise.hs
- compiler/GHC/StgToByteCode.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/a529583a96ce9028b1a35710c1abb76efe1c3903...bfa57420cc168814481c90c801037bc1639b0b81

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/a529583a96ce9028b1a35710c1abb76efe1c3903...bfa57420cc168814481c90c801037bc1639b0b81
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/20231001/6b173fc7/attachment-0001.html>


More information about the ghc-commits mailing list