summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Account for RULES that destroy ok-for-speculationwip/T18677Simon Peyton Jones2020-09-169-48/+81
| | | | | | This patch addresses #18677. I'll write a proper commit message in due course.
* Also cache other hadrian buildsWander Hillen2020-09-141-0/+1
|
* Do the hadrian rebuild multicoreWander Hillen2020-09-141-1/+1
|
* Move ahead cabal cache restoration to before use of cabalWander Hillen2020-09-141-2/+1
|
* Populate gitlab cache after buildingWander Hillen2020-09-141-0/+2
|
* docs: -B rts option sounds the bell on every GC (#18351)Adam Sandberg Eriksson2020-09-141-1/+1
|
* Hackily decouple the parser from the desugarerSebastian Graf2020-09-122-6/+37
| | | | | | | | | | | In a hopefully temporary hack, I re-used the idea from !1957 of using a nullary type family to break the dependency from GHC.Driver.Hooks on the definition of DsM ("Abstract Data"). This in turn broke the last dependency from the parser to the desugarer. More details in `Note [The Decoupling Abstract Data Hack]`. In the future, we hope to undo this hack again in favour of breaking the dependency from the parser to DynFlags altogether.
* Extract definition of DsM into GHC.HsToCore.TypesSebastian Graf2020-09-128-76/+96
| | | | | | | | | | | | | | | | | | `DsM` was previously defined in `GHC.Tc.Types`, along with `TcM`. But `GHC.Tc.Types` is in the set of transitive dependencies of `GHC.Parser`, a set which we aim to minimise. Test case `CountParserDeps` checks for that. Having `DsM` in that set means the parser also depends on the innards of the pattern-match checker in `GHC.HsToCore.PmCheck.Types`, which is the reason we have that module in the first place. In the previous commit, we represented the `TyState` by an `InertSet`, but that pulls the constraint solver as well as 250 more modules into the set of dependencies, triggering failure of `CountParserDeps`. Clearly, we want to evolve the pattern-match checker (and the desugarer) without being concerned by this test, so this patch includes a small refactor that puts `DsM` into its own module.
* Make `tcCheckSatisfiability` incremental (#18645)Sebastian Graf2020-09-128-50/+178
| | | | | | | | | | | | | | | | | By taking and returning an `InertSet`. Every new `TcS` session can then pick up where a prior session left with `setTcSInerts`. Since we don't want to unflatten the Givens (and because it leads to infinite loops, see !3971), we introduced a new variant of `runTcS`, `runTcSInerts`, that takes and returns the `InertSet` and makes sure not to unflatten the Givens after running the `TcS` action. Fixes #18645 and #17836. Metric Decrease: T17977 T18478
* Avoid iterating twice in `zipTyEnv` (#18535)theobat2020-09-122-2/+20
| | | | | | | | | | | | | | | | | | | | | | zipToUFM is a new function to replace `listToUFM (zipEqual ks vs)`. An explicit recursion is preferred due to the sensible nature of fusion. T12227 -6.0% T12545 -12.3% T5030 -9.0% T9872a -1.6% T9872b -1.6% T9872c -2.0% ------------------------- Metric Decrease: T12227 T12545 T5030 T9872a T9872b T9872c -------------------------
* Make sure we can read past perf notesKrzysztof Gogolewski2020-09-121-1/+9
| | | | See #18656.
* Don't quote argument to Hadrian's test-env flag (#18656)Ryan Scott2020-09-121-1/+1
| | | | | | | Doing so causes the name of the test environment to gain an extra set of double quotes, which changes the name entirely. Fixes #18656.
* hadrian: Pass input file to makeindexBen Gamari2020-09-121-1/+1
| | | | | | Strangely I find that on Alpine (and apparently only on Alpine) the latex makeindex command expects to be given a filename, lest it reads from stdin.
* PmCheck: Disattach COMPLETE pragma lookup from TyConsSebastian Graf2020-09-1222-467/+367
| | | | | | | | | | | | | | | | | | | By not attaching COMPLETE pragmas with a particular TyCon and instead assume that every COMPLETE pragma is applicable everywhere, we can drastically simplify the logic that tries to initialise available COMPLETE sets of a variable during the pattern-match checking process, as well as fixing a few bugs. Of course, we have to make sure not to report any of the ill-typed/unrelated COMPLETE sets, which came up in a few regression tests. In doing so, we fix #17207, #18277 and #14422. There was a metric decrease in #18478 by ~20%. Metric Decrease: T18478
* Add testsSandy Maguire2020-09-124-0/+45
|
* Add clamp function to Data.OrdSandy Maguire2020-09-121-0/+16
|
* Enable TICKY_TICKY for debug builds when building with makefiles.David Himmelstrup2020-09-111-2/+2
|
* Fix typos in TICKY_TICKY symbol names.David Himmelstrup2020-09-111-3/+3
|
* Define TICKY_TICKY when compiling cmm RTS files.David Himmelstrup2020-09-113-12/+22
|
* PmCheck: Handle ⊥ and strict fields correctly (#18341)wip/T18341Sebastian Graf2020-09-1027-498/+807
| | | | | | | | | | | | | | | | | | | | | In #18341, we discovered an incorrect digression from Lower Your Guards. This MR changes what's necessary to support properly fixing #18341. In particular, bottomness constraints are now properly tracked in the oracle/inhabitation testing, as an additional field `vi_bot :: Maybe Bool` in `VarInfo`. That in turn allows us to model newtypes as advertised in the Appendix of LYG and fix #17725. Proper handling of ⊥ also fixes #17977 (once again) and fixes #18670. For some reason I couldn't follow, this also fixes #18273. I also added a couple of regression tests that were missing. Most of them were already fixed before. In summary, this patch fixes #18341, #17725, #18273, #17977 and #18670. Metric Decrease: T12227
* .gitignore *.hiedb filesSebastian Graf2020-09-101-0/+3
|
* hadrian: Don't include -fdiagnostics-color in argument hashGHC GitLab CI2020-09-102-1/+5
| | | | | | | Otherwise the input hash will vary with whether colors are requested, which changed with `isatty`. Fixes #18672.
* PmCheck: Big refactor using guard tree variants more closely following ↵Sebastian Graf2020-09-1014-875/+951
| | | | | | | | | | | | | | | | | | | | | | | | source syntax (#18565) Previously, we desugared and coverage checked plain guard trees as described in Lower Your Guards. That caused (in !3849) quite a bit of pain when we need to partially recover tree structure of the input syntax to return covered sets for long-distance information, for example. In this refactor, I introduced a guard tree variant for each relevant source syntax component of a pattern-match (mainly match groups, match, GRHS, empty case, pattern binding). I made sure to share as much coverage checking code as possible, so that the syntax-specific checking functions are just wrappers around the more substantial checking functions for the LYG primitives (`checkSequence`, `checkGrds`). The refactoring payed off in clearer code and elimination of all panics related to assumed guard tree structure and thus fixes #18565. I also took the liberty to rename and re-arrange the order of functions and comments in the module, deleted some dead and irrelevant Notes, wrote some new ones and gave an overview module haddock.
* Add long-distance info for pattern bindings (#18572)Sebastian Graf2020-09-1011-72/+109
| | | | | | | | We didn't consider the RHS of a pattern-binding before, which led to surprising warnings listed in #18572. As can be seen from the regression test T18572, we get the expected output now.
* rts comment: RTS_TICKY_SYMBOLS moved from rts/Linker.c to rts/RtsSymbols.cDavid Himmelstrup2020-09-091-1/+1
|
* utils: Bump cabal-version of hp2ps and unlitBen Gamari2020-09-092-2/+2
|
* hadrian: Fix leakage of GHC in PATH into buildBen Gamari2020-09-091-1/+7
| | | | | | Previously hadrian would use GHC on PATH when configuring packages (or fail if there is no such GHC). Fix this. Unfortunately this runs into another bug in Cabal which we workaround.
* gitlab-ci: Bump Docker imagesBen Gamari2020-09-095-47/+61
| | | | | | | We now generate our Docker images via Dhall definitions, as described in ghc/ci-images!52. Additionally, we are far more careful about where tools come from, using the ALEX, HAPPY, HSCOLOR, and GHC environment variables (set in the Dockerfiles) to find bootstrapping tools.
* 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.