summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Add a missing guard in GHC.HsToCore.Utils.is_flat_prod_patSimon Peyton Jones2022-06-155-1/+48
| | | | | | This missing guard gave rise to #21519. (cherry picked from commit 32cdf62dc1537f572f2d044851e316ca37d8e012)
* Document behaviour of RULES with KnownNatBodigrim2022-06-151-0/+9
| | | | (cherry picked from commit f2c08124b30eb87482dc0ed1d7199aa58950e309)
* Documentation for setLocaleEncodingBodigrim2022-06-151-2/+27
| | | | (cherry picked from commit c3105be4bbfeb5005d8c585b5a3f91a4c3ee5b4b)
* Update test baselines to match new error messages from GHC.IO.Encoding.FailureBodigrim2022-06-154-34/+34
| | | | (cherry picked from commit 250f57c17f72ba11eda3655f553957f6f04c0399)
* Improve error messages from GHC.IO.Encoding.FailureBodigrim2022-06-151-8/+12
| | | | (cherry picked from commit 252394cefa746cb9eaf4fed4ea23d716eab20d1b)
* Fix FreeVars computation for mdosheaf2022-06-153-17/+42
| | | | | | | | | | | | | | Commit acb188e0 introduced a regression in the computation of free variables in mdo statements, as the logic in GHC.Rename.Expr.segmentRecStmts was slightly different depending on whether the recursive do block corresponded to an mdo statement or a rec statment. This patch restores the previous computation for mdo blocks. Fixes #21654 (cherry picked from commit b54f6c4fefaca8ca043cccbf474fb0da3d1c66b5)
* Use a class to check validity of withDictKrzysztof Gogolewski2022-06-1525-256/+300
| | | | | | | | | | | | | | This moves handling of the magic 'withDict' function from the desugarer to the typechecker. Details in Note [withDict]. I've extracted a part of T16646Fail to a separate file T16646Fail2, because the new error in 'reify' hides the errors from 'f' and 'g'. WithDict now works with casts, this fixes #21328. Part of #19915 (cherry picked from commit 3bd7d5d668b316f517a66c72fcf9bc7a36cc6ba4)
* Fix bad interaction between withDict and the SpecialiserSimon Peyton Jones2022-06-157-52/+201
| | | | | | | | | | | | | | This MR fixes a bad bug, where the withDict was inlined too vigorously, which in turn made the type-class Specialiser generate a bogus specialisation, because it saw the same overloaded function applied to two /different/ dictionaries. Solution: inline `withDict` later. See (WD8) of Note [withDict] in GHC.HsToCore.Expr See #21575, which is fixed by this change. (cherry picked from commit d2284c4c9dd484a4b459366956c4aedc72336b04)
* codeGen: Ensure that static datacon apps are included in SRTsBen Gamari2022-06-142-43/+92
| | | | | | | | | | | | | | | | | | When generating an SRT for a recursive group, GHC.Cmm.Info.Build.oneSRT filters out recursive references, as described in Note [recursive SRTs]. However, doing so for static functions would be unsound, for the reason described in Note [Invalid optimisation: shortcutting]. However, the same argument applies to static data constructor applications, as we discovered in #20959. Fix this by ensuring that static data constructor applications are included in recursive SRTs. The approach here is not entirely satisfactory, but it is a starting point. Fixes #20959. (cherry picked from commit b048a9f4e28186d2245427d2d83f08418573fae5)
* CafAnal: Improve code clarityBen Gamari2022-06-142-100/+131
| | | | | | | | | | | | Here we implement a few measures to improve the clarity of the CAF analysis implementation. Specifically: * Use CafInfo instead of Bool since the former is more descriptive * Rename CAFLabel to CAFfyLabel, since not all CAFfyLabels are in fact CAFs * Add numerous comments (cherry picked from commit cb52b4ae1508639e2686717d220b977e201394d3)
* Add documentation to the ByteArray# primetype.Hécate Moonlight2022-06-141-5/+44
| | | | | | close #21417 (cherry picked from commit 60071076d880c9ee189c93e0105a9b3d1ff87a3f)
* Remove pprTrace from pushCoercionIntoLambda (#21555)Matthew Pickering2022-06-143-1/+101
| | | | | | | | | | | | | | | This firstly caused spurious output to be emitted (as evidenced by #21555) but even worse caused a massive coercion to be attempted to be printed (> 200k terms) which would invariably eats up all the memory of your computer. The good news is that removing this trace allows the program to compile to completion, the bad news is that the program exhibits a core lint error (on 9.0.2) but not any other releases it seems. Fixes #21577 and #21555 (cherry picked from commit c1e24e610ae572b77bc1507674431a84563af759)
* docs: Fix LlvmVersion in manpage (#21280)Zubin Duggal2022-06-143-5/+7
| | | | (cherry picked from commit a36d12ee19afa949da27ab73f082428830f3dba3)
* Consider the stage of typeable evidence when checking stage restrictionMatthew Pickering2022-06-147-21/+130
| | | | | | | | | | | | | | | | We were considering all Typeable evidence to be "BuiltinInstance"s which meant the stage restriction was going unchecked. In-fact, typeable has evidence and so we need to apply the stage restriction. This is complicated by the fact we don't generate typeable evidence and the corresponding DFunIds until after typechecking is concluded so we introcue a new `InstanceWhat` constructor, BuiltinTypeableInstance which records whether the evidence is going to be local or not. Fixes #21547 (cherry picked from commit ea895b94afeecb111f8001fbd60f5d4c8828213c)
* ci: Allow testing bootstrapping on MRs using the "test-bootstrap" labelMatthew Pickering2022-06-141-0/+2
| | | | (cherry picked from commit d8901469223bac82ed29cb9f5e5e42bf5e927f68)
* ci: Test bootstrapping in release jobsMatthew Pickering2022-06-141-0/+1
| | | | (cherry picked from commit 0e5bb3a883cfc2faf8e36ff83d3d985e6f4ed93f)
* ci: Test the bootstrap without ALEX/HAPPY on pathMatthew Pickering2022-06-141-0/+3
| | | | (cherry picked from commit a96dccfe8201542086a65d168ce6d6b9d302e2c2)
* hadrian: Fix building from source-dist without alex/happyMatthew Pickering2022-06-145-3/+33
| | | | | | | | | | | | | | | | This fixes two bugs which were adding dependencies on alex/happy when building from a source dist. * When we try to pass `--with-alex` and `--with-happy` to cabal when configuring but the builders are not set. This is fixed by making them optional. * When we configure, cabal requires alex/happy because of the build-tool-depends fields. These are now made optional with a cabal flag (build-tool-depends) for compiler/hpc-bin/genprimopcode. Fixes #21627 (cherry picked from commit cac8c7bb098002ddce0ef7c1e4429940d22d8cc2)
* Use the wrapper for an unlifted bindingSimon Peyton Jones2022-06-143-3/+12
| | | | | | | | | We assumed the wrapper for an unlifted binding is the identity, but as #21516 showed, that is no always true. Solution is simple: use it. (cherry picked from commit 322537e3c3469090de16aeffe3fdf6fb98b68c34)
* Check for uninferrable variables in tcInferPatSynDeclSimon Peyton Jones2022-06-1412-43/+88
| | | | | | | | | | | | This fixes #21479 See Note [Unquantified tyvars in a pattern synonym] While doing this, I found that some error messages pointed at the pattern synonym /name/, rather than the /declaration/ so I widened the SrcSpan to encompass the declaration. (cherry picked from commit bdc99cc22c903d15eb7f4cd8da4b37d307179808)
* gitlab-ci: Rip out make jobBen Gamari2022-06-141-58/+0
| | | | | | Currently the make job can only pass when bootstrapping with GHC 8.10, as noted in #21188. However, bootstrapping with 8.10 is not supported by GHC 9.4 and consequently we have no choice but to drop the job.
* ci: Don't try to run ./boot when testing bootstrap of source distMatthew Pickering2022-06-142-3/+7
| | | | (cherry picked from commit a12a3cab7a58549cb1965872da8d9c10402b962d)
* source-dist: Copy in files created by ./bootMatthew Pickering2022-06-141-0/+28
| | | | | | | | | | | Since we started producing source dists with hadrian we stopped copying in the files created by ./boot which adds a dependency on python3 and autoreconf. This adds back in the files which were created by running configure. Fixes #21673 #21672 and #21626 (cherry picked from commit 9004be3cb19d914fa723082d35689afabede796b)
* ci: Add matrix for bootstrap sourcesZubin Duggal2022-06-141-5/+46
| | | | (cherry picked from commit 9fa790b4b33fe75c86ed7a3032eecd35774eb21e)
* hadrian bootstrap: add plans for 9.0.2 and 9.2.3Zubin Duggal2022-06-144-0/+4
| | | | (cherry picked from commit 819fdc615503ea1c7caec5057b174aee49566ecf)
* upload-ghc-libs: Allow candidate-only uploadBen Gamari2022-06-141-19/+18
| | | | (cherry picked from commit 0544f114a6aafa868d7a75f3fd77a9c5239be8d9)
* Revert "Use fix-sized equality primops for fixed size boxed types"Ben Gamari2022-06-142-12/+12
| | | | This reverts commit 024020c38126f3ce326ff56906d53525bc71690c.
* configure: Bump minimum bootstrap GHC versionBen Gamari2022-06-091-2/+3
|
* hadrian: Introduce new package database for executables needed to build stage0Matthew Pickering2022-06-0932-148/+234
| | | | | | | | | | | | | | | | | These executables (such as hsc2hs) are built using the boot compiler and crucially, most libraries from the global package database. We also move other build-time executables to be built in this stage such as linters which also cleans up which libraries end up in the global package database. This allows us to remove hacks where linters-common is removed from the package database when a bindist is created. This fixes issues caused by infinite recursion due to bytestring adding a dependency on template-haskell. Fixes #21634 (cherry picked from commit 5c4421b1a2d45edfc31f2d37c8b4a47c619a424b)
* export IsList from GHC.IsListwip/T21517Teo Camarasu2022-05-3010-86/+108
| | | | | | it is still re-exported from GHC.Exts (cherry picked from commit 0092c67cffb707611b2684df24a1a77e40c01cb7)
* EPA: Comment Order ReversedAlan Zimmerman2022-05-308-21/+270
| | | | | | | | | Make sure comments captured in the exact print annotations are in order of increasing location Closes #20718 (cherry picked from commit e2520df3fffa0cf22fb19c5fb872832d11c07d35)
* Add -dkeep-comments flag to keep comments in the parserAlan Zimmerman2022-05-305-0/+306
| | | | | | | | | | | This provides a way to set the Opt_KeepRawTokenStream from the command line, allowing exact print annotation users to see exactly what is produced for a given parsed file, when used in conjunction with -ddump-parsed-ast Discussed in #19706, but this commit does not close the issue. (cherry picked from commit 83c67f766be615d4db6f71f8af0cbb9b4c4917bb)
* EPA : Remove duplicate comments in DataFamInstDAlan Zimmerman2022-05-3010-27/+366
| | | | | | | | | | | | | | | | | | The code data instance Method PGMigration = MigrationQuery Query -- ^ Run a query against the database | MigrationCode (Connection -> IO (Either String ())) -- ^ Run any arbitrary IO code Resulted in two instances of the "-- ^ Run a query against the database" comment appearing in the Exact Print Annotations when it was parsed. Ensure only one is kept. Closes #20239 (cherry picked from commit e9fff12b34bb9770491d24eff5c280f44dc8cfc1)
* template-haskell: Fix representation of OPAQUE pragmasMatthew Pickering2022-05-304-8/+33
| | | | | | | | | | There is a mis-match between the TH representation of OPAQUE pragmas and GHC's internal representation due to how OPAQUE pragmas disallow phase annotations. It seemed most in keeping to just fix the wired in name issue by adding a special case to the desugaring of INLINE pragmas rather than making TH/GHC agree with how the representation should look. Fixes #21463
* testsuite: Add test for #21465Ben Gamari2022-05-304-0/+64
| | | | (cherry picked from commit 73b22ff196160036ac10b762bf3a363fa8a451ad)
* rts: Ensure that XMM registers are preserved on Win64Ben Gamari2022-05-303-30/+41
| | | | | | | | | | Previously we only preserved the bottom 64-bits of the callee-saved 128-bit XMM registers, in violation of the Win64 calling convention. Fix this. Fixes #21465. (cherry picked from commit be7102e5a75a652b7c073360cc1c3766e8f984bf)
* Test DESTDIR in test_hadrian()Julian Ospald2022-05-301-2/+23
| | | | (cherry picked from commit 7edd991e5d00a1ba19f3607fe8a66bbdc3ab3181)
* Respect DESTDIR in hadrian bindist Makefile, fixes #19646Ben Gamari2022-05-301-23/+23
| | | | (cherry picked from commit ecf5f3634c9971de4ae21870f0d6f3d5a35634a1)
* hadrian: Don't rely on xxx not being present in installation pathBen Gamari2022-05-301-2/+2
| | | | | | | | | | Previously Hadrian's installation makefile would assume that the string `xxx` did not appear in the installation path. This would of course break for some users. Fixes #21402. (cherry picked from commit dd5fecb0e2990b192d92f4dfd7519ecb33164fad)
* avoid hadrian/bindist/Makefile install_docs error when --docs=noneJens Petersen2022-05-301-3/+4
| | | | | | | | | | | When docs are disabled the bindist does not have docs/ and hence docs-utils/ is not generated. Here we just test that docs-utils exists before attempting to install prologue.txt and gen_contents_index to avoid the error: /usr/bin/install: cannot stat 'docs-utils/prologue.txt': No such file or directory make: *** [Makefile:195: install_docs] Error 1 (cherry picked from commit c7902078617f711a2313e3c04ef4e52fdb0f2f09)
* Enable eventlog support in all ways by defaultBen Gamari2022-05-3033-195/+92
| | | | | | | | | | | | | | | | | | | Here we deprecate the eventlogging RTS ways and instead enable eventlog support in the remaining ways. This simplifies packaging and reduces GHC compilation times (as we can eliminate two whole compilations of the RTS) while simplifying the end-user story. The trade-off is a small increase in binary sizes in the case that the user does not want eventlogging support, but we think that this is a fine trade-off. This also revealed a latent RTS bug: some files which included `Cmm.h` also assumed that it defined various macros which were in fact defined by `Config.h`, which `Cmm.h` did not include. Fixing this in turn revealed that `StgMiscClosures.cmm` failed to import various spinlock statistics counters, as evidenced by the failed unregisterised build. Closes #18948. (cherry picked from commit ee11d04363ed8aa1d73a0cda16076a39e668d163)
* rts/eventlog: Don't attempt to flush if there is no writerBen Gamari2022-05-301-0/+8
| | | | | | If the user has not configured a writer then there is nothing to flush. (cherry picked from commit 318e0005b5a3a522854ced7162f3eee95f964bd9)
* Basic response file supportBen Gamari2022-05-306-45/+111
| | | | | | | | | | Here we introduce support into our command-line parsing infrastructure and driver for handling gnu-style response file arguments, typically used to work around platform command-line length limitations. Fixes #16476. (cherry picked from commit ba3d4e1c43e6772f11f9a7105ef4bf3be8efb2df)
* Bump deepseq submodule to masterBen Gamari2022-05-302-1/+1
| | | | | Since the previous commit bumping `base` isn't in `master` due to a rebase-merge.
* Allow passing -po outside profiling wayTeo Camarasu2022-05-271-0/+17
| | | | | | Resolves #21455 (cherry picked from commit 3e1e5ee3307fe7ea47e70a07a385b56536413f64)
* Add test for T21455Teo Camarasu2022-05-272-0/+6
| | | | (cherry picked from commit 26e16e611ccfdbe8450f4b3ffac3182e698e1351)
* add test case for #21446Teo Camarasu2022-05-273-0/+12
| | | | (cherry picked from commit 376088dd91123b64947eb376f9c3db23117f293d)
* Respect -po when heap profiling (#21446)Teo Camarasu2022-05-271-15/+21
| | | | (cherry picked from commit 89a413182c9709b239106b40b1d6c8b20a214a21)
* ci: Use correct syntax when args list is emptyghc-9.4.1-alpha2Matthew Pickering2022-05-231-1/+1
| | | | | | This seems to fail on the ancient version of bash present on CentOS (cherry picked from commit 209d7c699225f5e9b8acbf9e50711165a37a91ed)
* ci: Don't build sphinx documentation on centosMatthew Pickering2022-05-232-0/+6
| | | | | | | | | The centos docker image lacks the sphinx builder so we disable building sphinx docs for these jobs. Fixes #21580 (cherry picked from commit a05b62936a7101e265b7b7776d8119754738ca70)