summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* testsuite: Add tests for #21336wip/T21336Ben Gamari2022-05-177-0/+47
|
* base: Throw exceptions raised while closing finalized HandlesBen Gamari2022-05-174-15/+70
| | | | Fixes #21336.
* base: Introduce [sg]etFinalizerExceptionHandlerBen Gamari2022-05-1711-31/+104
| | | | | This introduces a global hook which is called when an exception is thrown during finalization.
* Add test for #21558Matthew Pickering2022-05-172-0/+17
| | | | | | This is now fixed on master and 9.2 branch. Closes #21558
* codeGen: Ensure that static datacon apps are included in SRTsBen Gamari2022-05-172-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.
* CafAnal: Improve code clarityBen Gamari2022-05-172-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
* Remove unused test files (#21582)Vladislav Zavialov2022-05-174-751/+0
| | | | | Those files were moved to the perf/ subtree in 11c9a469, and then accidentally reintroduced in 680ef2c8.
* Bump time submodule to 1.12.2Matthew Pickering2022-05-171-0/+0
| | | | | | This bumps the time submodule to the 1.12.2 release. Fixes #21571
* Fix bad interaction between withDict and the SpecialiserSimon Peyton Jones2022-05-177-51/+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.
* Adjust flags for pprTraceSimon Peyton Jones2022-05-172-4/+18
| | | | | | | | | | | | | | | | We were using defaultSDocContext for pprTrace, which suppresses lots of useful infomation. This small MR adds GHC.Utils.Outputable.traceSDocContext and uses it for pprTrace and pprTraceUserWarning. traceSDocContext is a global, and hence not influenced by flags, but that seems unavoidable. But I made the sdocPprDebug bit controlled by unsafeHasPprDebug, since we have the latter for exactly this purpose. Fixes #21569
* OverloadedRecordFields: mention parent name in 'ambiguous occurrence' error ↵nineonine2022-05-1720-76/+120
| | | | for better disambiguation (#17420)
* testsuite: Add tests for system-cxx-std-lib packageBen Gamari2022-05-177-0/+43
| | | | | | | Test that we can successfully link against C++ code both in GHCi and batch compilation. See #20010
* Introduce package to capture dependency on C++ stdlibBen Gamari2022-05-1710-8/+118
| | | | | | | | Here we introduce a new "virtual" package into the initial package database, `system-cxx-std-lib`. This gives users a convenient, platform agnostic way to link against C++ libraries, addressing #20010. Fixes #20010.
* testsuite: Build T20918 with HC, not CXXBen Gamari2022-05-171-2/+2
|
* driver: Introduce pgmcxxBen Gamari2022-05-1717-15/+55
| | | | | | | | | | Here we introduce proper support for compilation of C++ objects. This includes: * logic in `configure` to detect the C++ toolchain and propagating this information into the `settings` file * logic in the driver to use the C++ toolchain when compiling C++ sources
* TcPlugin: access to irreducible givens + fix passed ev_binds_varPavol Vargovcik2022-05-1611-16/+144
|
* Misc cleanupKrzysztof Gogolewski2022-05-1618-66/+50
| | | | | | | | - Remove groupWithName (unused) - Use the RuntimeRepType synonym where possible - Replace getUniqueM + mkSysLocalOrCoVar with mkSysLocalOrCoVarM No functional changes.
* Add arity to the INLINE pragmas for pattern synonymsSimon Peyton Jones2022-05-165-34/+214
| | | | | The lack of INLNE arity was exposed by #21531. The fix is simple enough, if a bit clumsy.
* packaging: Introduce CI job for generating hackage documentationMatthew Pickering2022-05-163-7/+270
| | | | | | | | | | | | | | | | | | | | This adds a CI job (hackage-doc-tarball) which generates the necessary tarballs for uploading libraries and documentation to hackage. The release script knows to download this folder and the upload script will also upload the release to hackage as part of the release. The `ghc_upload_libs` script is moved from ghc-utils into .gitlab/ghc_upload_libs There are two modes, preparation and upload. * The `prepare` mode takes a link to a bindist and creates a folder containing the source and doc tarballs ready to upload to hackage. * The `upload` mode takes the folder created by prepare and performs the upload to hackage. Fixes #21493 Related to #21512
* Make closure macros EXTERN_INLINE to make debugging easierAndreas Klebinger2022-05-161-34/+34
| | | | | | | | | | | | | | Implements #21424. The RTS macros get_itbl and friends are extremely helpful during debugging. However only a select few of those were available in the compiled RTS as actual symbols as the rest were INLINE macros. This commit marks all of them as EXTERN_INLINE. This will still inline them at use sites but allow us to use their compiled counterparts during debugging. This allows us to use things like `p get_fun_itbl(ptr)` in the gdb shell since `get_fun_itbl` will now be available as symbol!
* hadrian: Uniformly enable -dlint with enableLinting transformerMatthew Pickering2022-05-162-3/+5
| | | | | | | | | | This fixes some bugs where * -dcore-lint was being passed when building stage1 libraries with the boot compiler * -dcore-lint was not being passed when building executables. Fixes #20135
* hadrian: Introduce linting flavour transformer (+lint)Ben Gamari2022-05-162-0/+19
| | | | | | | The linting flavour enables -dlint uniformly across anything build by the stage1 compiler. -dcmm-lint is not currently enabled because it fails on i386 (see #21563)
* Comments only around HsWrapperSimon Peyton Jones2022-05-132-7/+27
|
* Re-export augment and build from GHC.ListBen Gamari2022-05-132-0/+5
| | | | Resolves https://gitlab.haskell.org/ghc/ghc/-/issues/19127
* testsuite: Add tests for #21556Ben Gamari2022-05-137-0/+33
|
* rts/PEi386: Fix handling of weak symbolsBen Gamari2022-05-133-2/+13
| | | | | | | | Previously we would flag the symbol as weak but failed to set its address, which must be computed from an "auxiliary" symbol entry the follows the weak symbol. Fixes #21556.
* rts: Add debug output on ocResolve failureBen Gamari2022-05-131-1/+4
| | | | This makes it easier to see how resolution failures nest.
* Fix printing of brackets in multiplicities (#20315)jackohughes2022-05-138-10/+27
| | | | | | | | | Change mulArrow to allow for printing of correct application precedence where necessary and update callers of mulArrow to reflect this. As part of this, move mulArrow from GHC/Utils/Outputtable to GHC/Iface/Type. Fixes #20315
* Update extending_ghc for TcPlugin changessheaf2022-05-121-6/+6
| | | | | The documentation still mentioned Derived constraints and an outdated datatype TcPluginResult.
* Decouple dynflags in GHC.Core.Opt.Arity (related to #17957)Andre Marianiello2022-05-122-24/+31
| | | | | Metric Decrease: T16875
* Move CmmParserConfig and PDConfig into GHC.Cmm.Parser.ConfigAndre Marianiello2022-05-125-13/+29
|
* Remove Module argument from initCmmParserConfigAndre Marianiello2022-05-123-9/+6
|
* Decouple dynflags in Cmm parser (related to #17957)Andre Marianiello2022-05-126-26/+67
|
* Add mention of -hi to RTS --helpMatthew Pickering2022-05-111-0/+2
| | | | Fixes #21546
* Add a missing guard in GHC.HsToCore.Utils.is_flat_prod_patSimon Peyton Jones2022-05-115-1/+48
| | | | This missing guard gave rise to #21519.
* rts: Drop setExecutableBen Gamari2022-05-113-29/+0
| | | | | Since f6e366c058b136f0789a42222b8189510a3693d1 setExecutable has been dead code. Drop it.
* Add back Debian9 CI jobsMatthew Pickering2022-05-112-0/+180
| | | | | | | We still build Deb9 bindists for now due to Ubuntu 18 and Linux Mint 19 not being at EOL until April 2023 and they still need tinfo5. Fixes #21469
* gitlab-ci: Check for dynamic msys2 dependenciesBen Gamari2022-05-111-0/+13
| | | | | | Both #20878 and #21196 were caused by unwanted dynamic dependencies being introduced by boot libraries. Ensure that we catch this in CI by attempting to run GHC in an environment with a minimal PATH.
* Specialiser: saturate DFuns correctlySimon Peyton Jones2022-05-111-4/+7
| | | | | | | | | | | Ticket #21489 showed that the saturation mechanism for DFuns (see Note Specialising DFuns) should use both UnspecType and UnspecArg. We weren't doing that; but this MR fixes that problem. No test case because it's hard to tickle, but it showed up in Gergo's work with GHC-as-a-library.
* EPA: do statement with leading semicolon has wrong anchorAlan Zimmerman2022-05-116-6/+31
| | | | | | | | | | | | | The code do; a <- doAsync; b Generated an incorrect Anchor for the statement list that starts after the first semicolon. This commit fixes it. Closes #20256
* Make floating-point abs IEEE 754 compliantARATA Mizuki2022-05-114-45/+3
| | | | | | The old code used by via-C backend didn't handle the sign bit of NaN. See #21043.
* FIND_LLVM_PROG: Recognize llvm suffix used by FreeBSD, ie llc10.mikael2022-05-111-2/+2
|
* hadrian: Only copy and install libffi headers when using in-tree libffiMatthew Pickering2022-05-103-5/+7
| | | | | | | | When passed `--use-system-libffi` then we shouldn't copy and install the headers from the system package. Instead the headers are expected to be available as a runtime dependency on the users system. Fixes #21485 #21487
* hadrian: Don't pass -j to haddockMatthew Pickering2022-05-101-3/+1
| | | | | | | | | | | This has high potential for oversubcribing as many haddock jobs can be spawned in parralel which will each request the given number of capabilities. Once -jsem is implemented (#19416, !5176) we can expose that haddock via haddock and use that to pass a semaphore. Ticket #21136
* docs: Fix path to GHC API docs in index.htmlMatthew Pickering2022-05-103-3/+1
| | | | | | | | | | | | In the make bindists we generate documentation in docs/ghc-<VER> but the hadrian bindists generate docs/ghc/ so the path to the GHC API docs was wrong in the index.html file. Rather than make the hadrian and make bindists the same it was easier to assume that if you're using the mkDocs script that you're using hadrian bindists. Fixes #21509
* Use the wrapper for an unlifted bindingSimon Peyton Jones2022-05-103-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.
* packaging: Build perf builds with -split-sectionsMatthew Pickering2022-05-102-1/+14
| | | | | | | | | In 8f71d958 the make build system was made to use split-sections on linux systems but it appears this logic never made it to hadrian. There is the split_sections flavour transformer but this doesn't appear to be used for perf builds on linux. Closes #21135
* hadrian: Fix split-sections transformerMatthew Pickering2022-05-101-4/+7
| | | | | | | | | | | | The splitSections transformer has been broken since -dynamic-too support was implemented in hadrian. This is because we actually build the dynamic way when building the dynamic way, so the predicate would always fail. The fix is to just always pass `split-sections` even if it doesn't do anything for a particular way. Fixes #21138
* Check for uninferrable variables in tcInferPatSynDeclSimon Peyton Jones2022-05-1012-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.
* configure: Check for ffi.hBen Gamari2022-05-101-3/+10
| | | | | | | As noted in #21485, we checked for ffi.h yet then failed to throw an error if it is missing. Fixes #21485.