summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* hadrian: Don't include -fdiagnostics-color in argument hashwip/T18672GHC GitLab CI2020-09-092-1/+5
| | | | | | | Otherwise the input hash will vary with whether colors are requested, which changed with `isatty`. Fixes #18672.
* Remove GENERATED pragma, as it is not being usedAlan Zimmerman2020-09-0918-67/+2
| | | | | | | | | | | | | | | | | | | | | @alanz pointed out on ghc-devs that the payload of this pragma does not appear to be used anywhere. I (@bgamari) did some digging and traced the pragma's addition back to d386e0d2 (way back in 2006!). It appears that it was intended to be used by code generators for use in informing the code coveraging checker about generated code provenance. When it was added it used the pragma's "payload" fields as source location information to build an "ExternalBox". However, it looks like this was dropped a year later in 55a5d8d9. At this point it seems like the pragma serves no useful purpose. Given that it also is not documented, I think we should remove it. Updates haddock submodule Closes #18639
* Add comments about sm_dflags and simpleOptExprSylvain Henry2020-09-092-2/+19
|
* DynFlags: add sm_pre_inline field into SimplMode (#17957)Sylvain Henry2020-09-0916-59/+61
| | | | It avoids passing and querying DynFlags down in the simplifier.
* DynFlags: add UnfoldingOpts and SimpleOptsSylvain Henry2020-09-0943-491/+675
| | | | | Milestone: after this patch, we only use 'unsafeGlobalDynFlags' for the state hack and for debug in Outputable.
* DynFlags: add OptCoercionOptsSylvain Henry2020-09-094-21/+47
| | | | | Use OptCoercionOpts to avoid threading DynFlags all the way down to GHC.Core.Coercion.Opt
* Postpone associated tyfam default checks until after typecheckingRyan Scott2020-09-0917-108/+198
| | | | | | | | | | | | Previously, associated type family defaults were validity-checked during typechecking. Unfortunately, the error messages that these checks produce run the risk of printing knot-tied type constructors, which will cause GHC to diverge. In order to preserve the current error message's descriptiveness, this patch postpones these validity checks until after typechecking, which are now located in the new function `GHC.Tc.Validity.checkValidAssocTyFamDeflt`. Fixes #18648.
* Use "to" instead of "2" in internal names of conversion opsJohn Ericson2020-09-094-70/+70
| | | | | | | | | | | Change the constructors for the primop union, and also names of the literal conversion functions. "2" runs into trouble when we need to do conversions from fixed-width types, and end up with thing like "Int642Word". Only the names internal to GHC are changed, as I don't want to worry about breaking changes ATM.
* gitlab-ci: Accept Centos 7 C.utf8 localeBen Gamari2020-09-081-0/+3
| | | | | | Centos apparently has C.utf8 rather than C.UTF-8. (cherry picked from commit d9f85dd25a26a04d3485470afb3395ee2dec6464)
* gitlab-ci: Handle distributions without localesBen Gamari2020-09-081-0/+6
| | | | | | | | Previously we would assume that the `locale` utility exists. However, this is not so on Alpine as musl's locale support is essentially non-existent. (cherry picked from commit 17cdb7ac3b557a245fee1686e066f9f770ddc21e)
* Make the forall-or-nothing rule only apply to invisible foralls (#18660)Ryan Scott2020-09-085-28/+70
| | | | | | | | This fixes #18660 by changing `isLHsForAllTy` to `isLHsInvisForAllTy`, which is sufficient to make the `forall`-or-nothing rule only apply to invisible `forall`s. I also updated some related documentation and Notes while I was in the neighborhood.
* testsuite: Output performance test results in tabular formatDaishi Nakajima2020-09-083-35/+98
| | | | | | | | | | | | | | | | | this was suggested in #18417. Change the print format of the values. * Shorten commit hash * Reduce precision of the "Value" field * Shorten metrics name * e.g. runtime/bytes allocated -> run/alloc * Shorten "MetricsChange" * e.g. unchanged -> unch, increased -> incr And, print the baseline environment if there are baselines that were measured in a different environment than the current environment. If all "Baseline commit" are the same, print it once.
* rts: Add stg_copyArray_barrier to RtsSymbols listBen Gamari2020-09-081-0/+1
| | | | It's incredible that this wasn't noticed until now.
* Move DynFlags test into updateModDetailsIdInfos's caller (#17957)Sylvain Henry2020-09-072-10/+7
|
* [macOS] improved runpath handlingMoritz Angermann2020-09-0716-23/+245
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In b592bd98ff25730bbe3c13d6f62a427df8c78e28 we started using -dead_strip_dylib on macOS when lining dynamic libraries and binaries. The underlying reason being the Load Command Size Limit in macOS Sierra (10.14) and later. GHC will produce @rpath/libHS... dependency entries together with a corresponding RPATH entry pointing to the location of the libHS... library. Thus for every library we produce two Load Commands. One to specify the dependent library, and one with the path where to find it. This makes relocating libraries and binaries easier, as we just need to update the RPATH entry with the install_name_tool. The dynamic linker will then subsitute each @rpath with the RPATH entries it finds in the libraries load commands or the environement, when looking up @rpath relative libraries. -dead_strip_dylibs intructs the linker to drop unused libraries. This in turn help us reduce the number of referenced libraries, and subsequently the size of the load commands. This however does not remove the RPATH entries. Subsequently we can end up (in extreme cases) with only a single @rpath/libHS... entry, but 100s or more RPATH entries in the Load Commands. This patch rectifies this (slighly unorthodox) by passing *no* -rpath arguments to the linker at link time, but -headerpad 8000. The headerpad argument is in hexadecimal and the maxium 32k of the load command size. This tells the linker to pad the load command section enough for us to inject the RPATHs later. We then proceed to link the library or binary with -dead_strip_dylibs, and *after* the linking inspect the library to find the left over (non-dead-stripped) dependencies (using otool). We find the corresponding RPATHs for each @rpath relative dependency, and inject them into the library or binary using the install_name_tool. Thus achieving a deadstripped dylib (and rpaths) build product. We can not do this in GHC, without starting to reimplement a dynamic linker as we do not know which symbols and subsequently libraries are necessary. Commissioned-by: Mercury Technologies, Inc. (mercury.com)
* gitlab-ci: Use hadrian builds for Windows release artifactsBen Gamari2020-09-071-7/+11
|
* gitlab-ci: Configure bignum backend in Hadrian buildsBen Gamari2020-09-071-0/+2
|
* Add clarification regarding poll/kqueue flagsWander Hillen2020-09-071-2/+6
|
* gitlab-ci: Fix typoBen Gamari2020-09-051-1/+1
| | | | A small typo in a rule regular expression.
* testsuite: Mark T5975[ab] as broken on WindowsBen Gamari2020-09-051-2/+5
| | | | Due to #7305.
* testsuite: Drop Windows-specific output for parseTreeBen Gamari2020-09-051-160/+0
| | | | The normalise_slashes normaliser should handle this.
* gitlab-ci: Drop Windows make jobBen Gamari2020-09-051-6/+3
| | | | | | These are a significant burden on our CI resources and end up failing quite often due to #18274. Here I drop the make jobs during validaion; it is now run only during the nightly builds.
* gitlab-ci: Bump Windows toolchain versionBen Gamari2020-09-051-1/+1
| | | | | This should have been done when we bumped the bootstrap compiler to 8.8.4.
* gitlab-ci: Rename RELEASE variable to RELEASE_JOBBen Gamari2020-09-051-1/+1
| | | | | This interfered with the autoconf variable of the same name, breaking pre-release builds.
* gitlab-ci: More intelligent detection of locale availabilityBen Gamari2020-09-051-3/+26
| | | | | | | | Previously ci.sh would unconditionally use C.UTF-8. However, this fails on Centos 7, which appears not to provide this locale. Now we first try C.UTF-8, then try en_US.UTF-8, then fail. Works around #18607.
* configure: Fix whitespaceBen Gamari2020-09-051-68/+68
|
* rts: Consistently use stgMallocBytes instead of mallocGHC GitLab CI2020-09-055-37/+32
| | | | | This can help in debugging RTS memory leaks since all allocations go through the same interface.
* Move Hadrian's wiki pages in tree (fix #16165)Sylvain Henry2020-09-041-0/+104
| | | | | Only the debugging page contains interesting stuff. Some of this stuff looks old (e.g. recommending "cabal install")...
* Documented the as of yet undocumented '--print-*' GHC flags,Benjamin Maurer2020-09-044-21/+209
| | | | | | as well as `-split-objs`, since that is related to `--print-object-splitting-supported`. See #18641
* configure: Avoid hard-coded ld path on WindowsGHC GitLab CI2020-09-047-24/+45
| | | | | | | The fix to #17962 ended up regressing on Windows as it failed to replicate the logic responsible for overriding the toolchain paths on Windows. This resulted in a hard-coded path to a directory that likely doesn't exist on the user's system (#18550).
* Introduce isBoxedTupleDataCon and use it to fix #18644Ryan Scott2020-09-0418-28/+40
| | | | | | | | | | | | | | | | | | | | The code that converts promoted tuple data constructors to `IfaceType`s in `GHC.CoreToIface` was using `isTupleDataCon`, which conflates boxed and unboxed tuple data constructors. To avoid this, this patch introduces `isBoxedTupleDataCon`, which is like `isTupleDataCon` but only works for _boxed_ tuple data constructors. While I was in town, I was horribly confused by the fact that there were separate functions named `isUnboxedTupleCon` and `isUnboxedTupleTyCon` (similarly, `isUnboxedSumCon` and `isUnboxedSumTyCon`). It turns out that the former only works for data constructors, despite its very general name! I opted to rename `isUnboxedTupleCon` to `isUnboxedTupleDataCon` (similarly, I renamed `isUnboxedSumCon` to `isUnboxedSumDataCon`) to avoid this potential confusion, as well as to be more consistent with the naming convention I used for `isBoxedTupleDataCon`. Fixes #18644.
* DynFlags: don't pass DynFlags to cmmImplementSwitchPlansSylvain Henry2020-09-042-6/+6
|
* DynFlags: use Platform in foldRegs*Sylvain Henry2020-09-049-152/+138
|
* Don't rely on CLabel's Outputable instance in CmmToCSylvain Henry2020-09-042-20/+21
| | | | | This is in preparation of the removal of sdocWithDynFlags (#10143), hence of the refactoring of CLabel's Outputable instance.
* expected-undocumented-flags remove kill flagsKathryn Spiers2020-09-031-2/+0
| | | | It looks like the flags were removed in https://gitlab.haskell.org/ghc/ghc/-/commit/3e27205a66b06a4501d87eb31e285eadbc693eb7 and can safely be removed here
* configure: Work around Raspbian's silly packaging decisionsBen Gamari2020-09-031-19/+34
| | | | See #17856.
* Bignum: add missing compat import/export functionsSylvain Henry2020-09-021-3/+30
|
* Remove outdated noteSylvain Henry2020-09-021-29/+0
|
* Remove potential space leak from Data.List.transposeDavid Feuer2020-09-021-1/+7
| | | | | | | | | Previously, `transpose` produced a list of heads and a list of tails independently. This meant that a function using only some heads, and only some tails, could potentially leak space. Use `unzip` to work around the problem by producing pairs and selector thunks instead. Time and allocation behavior will be worse, but there should be no more leak potential.
* Turn on -XMonoLocalBinds by default (#18430)Sebastian Graf2020-09-027-11/+17
| | | | | | | | | And fix the resulting type errors. Co-authored-by: Krzysztof Gogolewski <krz.gogolewski@gmail.com> Metric Decrease: parsing001
* testsuite: Add broken test for #18302Ben Gamari2020-09-013-0/+13
|
* Remove "Ord FastString" instanceSylvain Henry2020-09-0132-113/+237
| | | | | | | | | | | | | | | | | | | FastStrings can be compared in 2 ways: by Unique or lexically. We don't want to bless one particular way with an "Ord" instance because it leads to bugs (#18562) or to suboptimal code (e.g. using lexical comparison while a Unique comparison would suffice). UTF-8 encoding has the advantage that sorting strings by their encoded bytes also sorts them by their Unicode code points, without having to decode the actual code points. BUT GHC uses Modified UTF-8 which diverges from UTF-8 by encoding \0 as 0xC080 instead of 0x00 (to avoid null bytes in the middle of a String so that the string can still be null-terminated). This patch adds a new `utf8CompareShortByteString` function that performs sorting by bytes but that also takes Modified UTF-8 into account. It is much more performant than decoding the strings into [Char] to perform comparisons (which we did in the previous patch). Bump haddock submodule
* Fix FastString lexicographic ordering (fix #18562)Sylvain Henry2020-09-014-1/+11
|
* Bignum: add BigNat compat functions (#18613)Sylvain Henry2020-08-311-0/+54
|
* Limit upper version of Happy for ghc-9.2 (#18620)Takenobu Tani2020-08-312-3/+3
| | | | | | | | This patch adds the upper bound of a happy version for ghc-9.2. Currently, We can use happy-1.19 or happy-1.20 for ghc-9.2. See #18620.
* Limit upper version of Happy for ghc-9.0 and earlier (#18620)Takenobu Tani2020-08-312-1/+3
| | | | | | | | | This patch adds the upper bound of a happy version for ghc-9.0 and earlier. Currently, we can't use happy-1.20.0 for ghc-9.0. See #18620.
* Ignore more filesSven Tennie2020-08-311-2/+9
| | | | | Ignore files from "new style" cabal builds (dist-newstyle folders) and from clangd (C language server).
* Set the dynamic-system-linker flag to ManualMoritz Angermann2020-08-311-1/+1
| | | | This flag should be user controllable, hence Manual: True.
* Fix documentation and fix "check" bignum backend (#18604)Sylvain Henry2020-08-315-19/+19
|
* Don't store HomeUnit in UnitConfigSylvain Henry2020-08-311-17/+22
| | | | | Allow the creation of a UnitConfig (hence of a UnitState) without having a HomeUnit. It's required for #14335.