summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* ci: Fix definition of slow-validate flavour (so that -dlint) is passedMatthew Pickering2022-07-011-2/+1
| | | | | In this embarassing sequence of events we were running slow-validate without -dlint.
* desugar: Look through ticks when warning about possible literal overflowMatthew Pickering2022-07-014-3/+46
| | | | | | | | | | Enabling `-fhpc` or `-finfo-table-map` would case a tick to end up between the appliation of `neg` to its argument. This defeated the special logic which looks for `NegApp ... (HsOverLit` to warn about possible overflow if a user writes a negative literal (without out NegativeLiterals) in their code. Fixes #21701
* rts: gc stats: account properly for copied bytes in sequential collectionsDouglas Wilson2022-07-012-0/+13
| | | | | | | | | | | We were not updating the [copied,any_work,scav_find_work, max_n_todo_overflow] counters during sequential collections. As well, we were double counting for parallel collections. To fix this we add an `else` clause to the `if (is_par_gc())`. The par_* counters do not need to be updated in the sequential case because they must be 0.
* Fix panic with UnliftedFFITypes+CApiFFI (#14624)nineonine2022-07-017-12/+191
| | | | | | | | | | When declaring foreign import using CAPI calling convention, using unlifted unboxed types would result in compiler panic. There was an attempt to fix the situation in #9274, however it only addressed some of the ByteArray cases. This patch fixes other missed cases for all prims that may be used as basic foreign types.
* Remove `CoreOccurAnal` constructor of the `CoreToDo` typeDominik Peteler2022-06-293-4/+0
| | | | | It was dead code since the last occurence in an expression context got removed in 71916e1c018dded2e68d6769a2dbb8777da12664.
* Tiny tweak to `IOPort#` documentation Emily Bourke2022-06-291-1/+1
| | | | | The exclamation mark and bracket don’t seem to make sense here. I’ve looked through the history, and I don’t think they’re deliberate – possibly a copy-and-paste error.
* template-haskell: Bump version to 2.19.0.0Ben Gamari2022-06-286-4/+4
| | | | Bumps text and exceptions submodules due to bounds.
* Cleanup BuiltInSyntax vs UserSyntaxMatthew Pickering2022-06-2817-48/+45
| | | | | | | | | | | | There was some confusion about whether FUN/TYPE/One/Many should be BuiltInSyntax or UserSyntax. The answer is certainly UserSyntax as BuiltInSyntax is for things which are directly constructed by the parser rather than going through normal renaming channels. I fixed all the obviously wrong places I could find and added a test for the original bug which was caused by this (#21752) Fixes #21752 #20695 #18302
* Comments only, about join pointsSimon Peyton Jones2022-06-282-3/+38
| | | | | This MR just adds some documentation about why casts destroy join points, following #21716.
* ghc.mk: fix 'make install' (`mk/system-cxx-std-lib-1.0.conf.install` does ↵Sergei Trofimovich2022-06-281-1/+1
| | | | | | | | | | | | | | | | | | not exist) before the change `make install` was failing as: ``` "mv" "/<<NIX>>/ghc-9.3.20220406/lib/ghc-9.5.20220625/bin/ghc-stage2" "/<<NIX>>/ghc-9.3.20220406/lib/ghc-9.5.20220625/bin/ghc" make[1]: *** No rule to make target 'mk/system-cxx-std-lib-1.0.conf.install', needed by 'install_packages'. Stop. ``` I think it's a recent regression caused by 0ef249aa where `system-cxx-std-lib-1.0.conf` is created (somewhat manually), but not the .install varianlt of it. The fix is to consistently use `mk/system-cxx-std-lib-1.0.conf` everywhere. Closes: https://gitlab.haskell.org/ghc/ghc/-/issues/21784
* integer-gmp: Fix cabal fileBen Gamari2022-06-281-4/+5
| | | | Evidently fields may not come after sections in a cabal file.
* testsuite: Add test for #20735Ben Gamari2022-06-284-0/+64
|
* CmmToAsm/AArch64: Sign-extend narrow C argumentsBen Gamari2022-06-281-2/+14
| | | | | | | | The AArch64/Darwin ABI requires that function arguments narrower than 32-bits must be sign-extended by the caller. We neglected to do this, resulting in #20735. Fixes #20735.
* CmmToAsm/AArch64: Re-format argument handling logicBen Gamari2022-06-281-5/+19
| | | | Previously there were very long, hard to parse lines. Fix this.
* -ddump-llvm shouldn't imply -fllvmBen Gamari2022-06-282-2/+3
| | | | | | | | Previously -ddump-llvm would change the backend used, which contrasts with all other dump flags. This is quite surprising and cost me quite a bit of time. Dump flags should not change compiler behavior. Fixes #21776.
* Mark AArch64/Darwin as requiring sign-extensionBen Gamari2022-06-281-0/+5
| | | | | | | Apple's AArch64 ABI requires that the caller sign-extend small integer arguments. Set platformCConvNeedsExtension to reflect this fact. Fixes #21773.
* `.hs-boot` make rules: add missing order-only dependency on target directorySergei Trofimovich2022-06-271-2/+2
| | | | | | | | | | | | | | | | | | | | Noticed missing target directory dependency as a build failure in `make --shuffle` mode (added in https://savannah.gnu.org/bugs/index.php?62100): "cp" libraries/base/./GHC/Stack/CCS.hs-boot libraries/base/dist-install/build/GHC/Stack/CCS.hs-boot cp: cannot create regular file 'libraries/base/dist-install/build/GHC/Stack/CCS.hs-boot': No such file or directory libraries/haskeline/ghc.mk:4: libraries/haskeline/dist-install/build/.depend-v-p-dyn.haskell: No such file or directory make[1]: *** [libraries/base/ghc.mk:4: libraries/base/dist-install/build/GHC/Stack/CCS.hs-boot] Error 1 shuffle=1656129254 make: *** [Makefile:128: all] Error 2 shuffle=1656129254 Note that `cp` complains about inability to create target file. The change adds order-only dependency on a target directory (similar to the rest of rules in that file). The bug is lurking there since 2009 commit 34cc75e1a (`GHC new build system megapatch`.) where upfront directory creation was never added to `.hs-boot` files.
* configure: Only probe for LD in FIND_LDBen Gamari2022-06-271-1/+2
| | | | | | | | | Since 6be2c5a7e9187fc14d51e1ec32ca235143bb0d8b we would probe for LD rather early in `configure`. However, it turns out that this breaks `configure`'s `ld`-override logic, which assumes that `LD` was set by the user and aborts. Fixes #21778.
* testsuite: Hide output from test compilations with verbosity==2Ben Gamari2022-06-271-1/+1
| | | | | | | | | Previously the output from test compilations used to determine whether, e.g., profiling libraries are available was shown with verbosity levels >= 2. However, the default level is 2, meaning that most users were often spammed with confusing errors. Fix this by bumping the verbosity threshold for this output to >=3. Fixes #21760.
* hadrian: Update main README pageMatthew Pickering2022-06-271-43/+39
| | | | | | This README had some quite out-of-date content about the build system so I did a complete pass deleting old material. I also made the section about flavours more prominent and mentioned flavour transformers.
* add tests for addrToAny# levityNaomi Liu2022-06-272-0/+45
|
* add levity polymorphism to addrToAny#Naomi Liu2022-06-271-1/+1
|
* Add Foldable1 and Bifoldable1 type classesBodigrim2022-06-274-1/+566
| | | | | | | | | | | | Approved by CLC in https://github.com/haskell/core-libraries-committee/issues/9 Instances roughly follow https://hackage.haskell.org/package/semigroupoids-5.3.7/docs/Data-Semigroup-Foldable-Class.html#t:Foldable1 but the API of `Foldable1` was expanded in comparison to `semigroupoids`. Compatibility shim is available from https://github.com/phadej/foldable1 (to be released). Closes #13573.
* Remove the traces of i386-*-openbsd, long live amd64Greg Steuck2022-06-273-4/+2
| | | | | | | | | | | OpenBSD will not ship any ghc packages on i386 starting with 7.2 release. This means there will not be a bootstrap compiler easily available. The last available binaries are ghc-8.10.6 which is already not supported as bootstrap for HEAD. See here for more information: https://marc.info/?l=openbsd-ports&m=165060700222580&w=2
* Add suggestions for unrecognised pragmas (#21589)Tony Zorman2022-06-2712-13/+71
| | | | | | | In case of a misspelled pragma, offer possible corrections as to what the user could have meant. Fixes: https://gitlab.haskell.org/ghc/ghc/-/issues/21589
* Don't mark lambda binders as OtherConAndreas Klebinger2022-06-2733-405/+717
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We used to put OtherCon unfoldings on lambda binders of workers and sometimes also join points/specializations with with the assumption that since the wrapper would force these arguments once we execute the RHS they would indeed be in WHNF. This was wrong for reasons detailed in #21472. So now we purge evaluated unfoldings from *all* lambda binders. This fixes #21472, but at the cost of sometimes not using as efficient a calling convention. It can also change inlining behaviour as some occurances will no longer look like value arguments when they did before. As consequence we also change how we compute CBV information for arguments slightly. We now *always* determine the CBV convention for arguments during tidy. Earlier in the pipeline we merely mark functions as candidates for having their arguments treated as CBV. As before the process is described in the relevant notes: Note [CBV Function Ids] Note [Attaching CBV Marks to ids] Note [Never put `OtherCon` unfoldigns on lambda binders] ------------------------- Metric Decrease: T12425 T13035 T18223 T18223 T18923 MultiLayerModulesTH_OneShot Metric Increase: WWRec -------------------------
* hadrian: Improve haddocks for ghcDebugAssertionsAndreas Klebinger2022-06-271-1/+1
|
* linters: Fix lint-submodule-refs when crashing trying to find plausible branchesMatthew Pickering2022-06-271-1/+1
|
* testsuite: Use normalise_version more consistentlyBen Gamari2022-06-278-16/+16
| | | | | Previously several tests' output were unnecessarily dependent on version numbers, particularly of `base`. Fix this.
* Bump ghc-prim and base versionsBen Gamari2022-06-2743-56/+57
| | | | | | | | | To 0.9.0 and 4.17.0 respectively. Bumps array, deepseq, directory, filepath, haskeline, hpc, parsec, stm, terminfo, text, unix, haddock, and hsc2hs submodules. (cherry picked from commit ba47b95122b7b336ce1cc00896a47b584ad24095)
* Bump nofib submodule.Andreas Klebinger2022-06-221-0/+0
| | | | | | Allows the shake runner to build with 9.2.3 among other things. Fixes #21772
* Use correct arch for the FreeBSD triple in gen-data-layout.shGleb Popov2022-06-221-1/+1
| | | | | Downstream bug for reference: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=261798 Relevant upstream issue: #15718
* TagCheck.hs: Properly check if arguments are boxed types.Andreas Klebinger2022-06-222-7/+6
| | | | | | | | | | | For one by mistake I had been checking against the kind of runtime rep instead of the boxity. This uncovered another bug, namely that we tried to generate the checking code before we had associated the function arguments with a register, so this could never have worked to begin with. This fixes #21729 and both of the above issues.
* When specialising, look through floatable ticks.Gergo ERDI2022-06-221-5/+22
| | | | Fixes #21697.
* re-export GHC.Natural.minusNaturalMaybe from Numeric.NaturalArtem Pelenitsyn2022-06-222-0/+3
| | | | CLC proposal: https://github.com/haskell/core-libraries-committee/issues/45
* runhaskellEric Lindblad2022-06-221-1/+1
|
* eventlog: Don't leave dangling pointers hanging aroundBen Gamari2022-06-221-0/+2
| | | | | | | Previously we failed to reset pointers to various eventlog buffers to NULL after freeing them. In principle we shouldn't look at them after they are freed but nevertheless it is good practice to set them to a well-defined value.
* Transcribe discussion from #21483 into a NoteMatthew Pickering2022-06-221-0/+78
| | | | | | | | | In #21483 I had a discussion with Simon Marlow about the memory retention behaviour of -Fd. I have just transcribed that conversation here as it elucidates the potentially subtle assumptions which led to the design of the memory retention behaviours of -Fd. Fixes #21483
* Correct documentation of defaults of the `-V` RTS optionAlexander Esgen2022-06-221-6/+7
|
* Add laws for 'toInteger' and 'toRational'Michael Peyton Jones2022-06-223-0/+21
| | | | | CLC discussion here: https://github.com/haskell/core-libraries-committee/issues/58
* Break out thNameToGhcNameIO (ref. #21730)Brandon Chinn2022-06-222-3/+28
|
* Use lookupNameCache instead of lookupOrigIOBrandon Chinn2022-06-224-9/+7
|
* testsuite: Add test for #21719Ben Gamari2022-06-223-0/+67
| | | | Happily, this has been fixed since 9.2.
* Rename `copyByteArray` to `unsafeCopyByteArray`Matthew Craven2022-06-221-12/+12
|
* Add a basic test for ByteArray's Monoid instanceMatthew Craven2022-06-222-0/+84
|
* Check for Int overflows in Data.Array.ByteMatthew Craven2022-06-221-27/+91
|
* Flags to disable local let-floating; -flocal-float-out, ↵Vanessa McHale2022-06-2211-8/+226
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -flocal-float-out-top-level CLI flags These flags affect the behaviour of local let floating. If `-flocal-float-out` is disabled (the default) then we disable all local floating. ``` …(let x = let y = e in (a,b) in body)... ===> …(let y = e; x = (a,b) in body)... ``` Further to this, top-level local floating can be disabled on it's own by passing -fno-local-float-out-top-level. ``` x = let y = e in (a,b) ===> y = e; x = (a,b) ``` Note that this is only about local floating, ie, floating two adjacent lets past each other and doesn't say anything about the global floating pass which is controlled by `-fno-float`. Fixes #13663
* Revert "Ticky:Make json info a separate field."Matthew Pickering2022-06-223-38/+35
| | | | | | This reverts commit da5ff10503e683e2148c62e36f8fe2f819328862. This was pushed directly without review.
* Ticky:Make json info a separate field.Andreas Klebinger2022-06-213-35/+38
|
* linker: only keep rtl exception tables if they have been relocatedTamar Christina2022-06-201-5/+6
|