summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Readd required pragmas that a recent patch removed by accident.wip/andreask/base_pragmasAndreas Klebinger2020-10-151-0/+2
|
* Remove the dependency on the ghc-linters stageHécate2020-10-111-2/+2
|
* Bignum: fix bigNatCompareWord# bug (#18813)Sylvain Henry2020-10-104-1/+28
|
* Linear types: fix quantification in GADTs (#18790)Krzysztof Gogolewski2020-10-103-9/+30
|
* Lint the compiler for extraneous LANGUAGE pragmasHécate2020-10-10145-782/+781
|
* Move File Target parser to library #18596Fendor2020-10-092-72/+88
|
* Cache HomeUnit in HscEnv (#17957)Sylvain Henry2020-10-0929-186/+191
| | | | | Instead of recreating the HomeUnit from the DynFlags every time we need it, we store it in the HscEnv.
* Testsuite: increase timeout for T18223 (#18795)Sylvain Henry2020-10-091-0/+2
|
* Add -pgmlm and -optlm flagsKrzysztof Gogolewski2020-10-091-0/+4
| | | | | !3798 added documentation and semantics for the flags, but not parsing.
* Add TyCon Set/Env and use them in a few places.Andreas Klebinger2020-10-0917-109/+357
| | | | | | | | | | | Firstly this improves code clarity. But it also has performance benefits as we no longer go through the name of the TyCon to get at it's unique. In order to make this work the recursion check for TyCon has been moved into it's own module in order to avoid import cycles.
* Bump win32-tarballs version to 0.3Ben Gamari2020-10-092-2/+2
| | | | This should fix #18774.
* Fix desugaring of record updates on data familiesSimon Peyton Jones2020-10-098-36/+156
| | | | | | | | | | | | This fixes a long-standing bug in the desugaring of record updates for data families, when the latter involves a GADT. It's all explained in Note [Update for GADTs] in GHC.HsToCore.Expr. Building the correct cast is surprisingly tricky, as that Note explains. Fixes #18809. The test case (in indexed-types/should_compile/T18809) contains several examples that exercise the dark corners.
* winio: fixed more data error.Tamar Christina2020-10-091-1/+1
|
* winio: fixed bytestring reading interface.Tamar Christina2020-10-094-3/+43
|
* winio: fix array splatTamar Christina2020-10-091-3/+7
|
* winio: fixed timeouts non-threaded.Tamar Christina2020-10-091-13/+9
|
* sdist: Include hadrian sources in source distributionBen Gamari2020-10-091-1/+3
| | | | | | | Previously the make build system's source distribution rules neglected to include Hadrian's sources. Fixes #18794.
* Linear types: fix roles in GADTs (#18799)Krzysztof Gogolewski2020-10-094-2/+21
|
* ApiAnnotations : preserve parens in GADTsAlan Zimmerman2020-10-095-53/+65
| | | | | | | | | A cleanup in 7f418acf61e accidentally discarded some parens in ConDeclGADT. Make sure these stay in the AST in a usable format. Also ensure the AnnLolly does not get lost in a GADT.
* Bignum: match on small Integer/NaturalSylvain Henry2020-10-094-3/+26
| | | | | | | | | Previously we only matched on *variables* whose unfoldings were a ConApp of the form `IS lit#` or `NS lit##`. But we forgot to match on the ConApp directly... As a consequence, constant folding only worked after the FloatOut pass which creates bindings for most sub-expressions. With this patch, matching on bignums works even with -O0 (see bignumMatch test).
* Hadrian: add quick-debug flavourSylvain Henry2020-10-093-4/+34
|
* testsuite/timeout: Fix windows specific errors.Andreas Klebinger2020-10-092-25/+28
| | | | | | | | We now seem to use -Werror there. Which caused some long standing warnings to become errors. I applied changes to remove the warnings allowing the testsuite to run on windows as well.
* Use proper RTS flags when collecting residency in perf tests.Andreas Klebinger2020-10-092-15/+12
| | | | | | | | | | | | | | | | | | | | Replace options like collect_stats(['peak_megabytes_allocated'],4) with collect_runtime_residency(4) and so forth. Reason being that the later also supplies some default RTS arguments which make sure residency does not fluctuate too much. The new flags mean we get new (hopefully more accurate) baselines so accept the stat changes. ------------------------- Metric Decrease: T4029 T4334 T7850 Metric Increase: T13218 T7436 -------------------------
* Add linting of `base` to the CIHécate2020-10-0910-44/+84
|
* Add a flag to indicate that gcc supports -no-pieKrzysztof Gogolewski2020-10-092-0/+16
| | | | Fixes #17919.
* Document -Wderiving-typeableMaxGabriel2020-10-092-1/+14
| | | | Tracking: #18641
* Expose RTS-only ways (#18651)Sylvain Henry2020-10-098-27/+134
| | | | | Some RTS ways are exposed via settings (ghcThreaded, ghcDebugged) but not all. It's simpler if the RTS exposes them all itself.
* rts: fix race condition in StgCRunTamar Christina2020-10-096-45/+34
| | | | | | | | | | | | | | | | On windows the stack has to be allocated 4k at a time, otherwise we get a segfault. This is done by using a helper ___chkstk_ms that is provided by libgcc. The Haskell side already knows how to handle this but we need to do the same from STG. Previously we would drop the stack in StgRun but would only make it valid whenever the scheduler loop ran. This approach was fundamentally broken in that it falls apart when you take a signal from the OS. We see it less often because you initially get allocated a 1MB stack block which you have to blow past first. Concretely this means we must always keep the stack valid. Fixes #18601.
* Update containers to v0.6.4.1Simon Jakobi2020-10-092-1/+1
| | | | Updates containers submodule.
* Use UnitId in the backend instead of UnitSylvain Henry2020-10-092-7/+8
| | | | | | In Cmm we can only have real units identified with an UnitId. Other units (on-the-fly instantiated units and holes) are only used in type-checking backpack sessions that don't produce Cmm.
* Misc cleanupKrzysztof Gogolewski2020-10-0715-30/+24
| | | | | | | | | | | * Include funTyCon in exposedPrimTyCons. Every single place using exposedPrimTyCons was adding funTyCon manually. * Remove unused synTyConResKind and ieLWrappedName * Add recordSelectorTyCon_maybe * In exprType, panic instead of giving a trace message and dummy output. This prevents #18767 reoccurring. * Fix compilation error in fragile concprog001 test (part of #18732)
* testsuite: Allow whitespace before "Metric (in|de)crease"Ben Gamari2020-10-071-1/+1
| | | | | | | Several people have struggled with metric change annotations in their commit messages not being recognized due to the fact that GitLab's job log inserts a space at the beginning of each line. Teach the regular expression to accept this whitespace.
* hadrian: use stage0 linker to merge objects when done during the stage0Karel Gardas2020-10-072-0/+10
| | | | Fixes #18800.
* Preserve as-parsed arrow type for HsUnrestrictedArrowAlan Zimmerman2020-10-077-13/+90
| | | | | | | | | | When linear types are disabled, HsUnrestrictedArrow is treated as HslinearArrow. Move this adjustment into the type checking phase, so that the parsed source accurately represents the source as parsed. Closes #18791
* Apply suggestion to compiler/GHC/SysTools.hsSylvain Henry2020-10-071-1/+1
|
* Fix -flink-rts (#18651)Sylvain Henry2020-10-071-21/+29
| | | | | Before this patch -flink-rts could link with GHC's rts instead of the selected one.
* gitlab-ci: Fix name of Ubuntu 20.04 imageBen Gamari2020-10-071-1/+1
|
* WinIO: Small changes related to atomic request swaps.Andreas Klebinger2020-10-0712-26/+117
| | | | | | | | | | | | Move the atomix exchange over the Ptr type to an internal module. Fix a bug caused by us passing ptr-to-ptr instead of ptr to atomic exchange. Renamed interlockedExchange to exchangePtr. I've also added an cas primitive. It turned out we don't need it for WinIO but I'm leaving it in as it's useful for other things.
* Document profiling flags, warning flags, and no-pieRachel2020-10-074-46/+133
|
* rts: Fix integer width in TICK_BUMP_BYBen Gamari2020-10-051-1/+1
| | | | | | | | | | | | | | Previously `TICK_BUMP_BY` was defined as ```c #define TICK_BUMP_BY(ctr,n) CLong[ctr] = CLong[ctr] + n ``` Yet the tickers themselves were defined as `StgInt`s. This happened to work out correctly on Linux, where `CLong` is 64-bits. However, it failed on Windows, where `CLong` is 32-bits, resulting in #18782. Fixes #18783.
* Fix linear types in TH splices (#18465)Krzysztof Gogolewski2020-10-054-1/+29
|
* Inline `integerDecodeDouble#` and constant-fold `decodeDouble_Int64#` insteadSebastian Graf2020-10-053-56/+52
| | | | | | | | | | | | | | | | | | | | | | | | Currently, `integerDecodeDouble#` is known-key so that it can be recognised in constant folding. But that is very brittle and doesn't survive worker/wrapper, which we even do for `NOINLINE` things since #13143. Also it is a trade-off: The implementation of `integerDecodeDouble#` allocates an `Integer` box that never cancels aways if we don't inline it. Hence we recognise the `decodeDouble_Int64#` primop instead in constant folding, so that we can inline `integerDecodeDouble#`. As a result, `integerDecodeDouble#` no longer needs to be known-key. While doing so, I realised that we don't constant-fold `decodeFloat_Int#` either, so I also added a RULE for it. `integerDecodeDouble` is dead, so I deleted it. Part of #18092. This improves the 32-bit `realToFrac`/`toRational`: Metric Decrease: T10359
* fix rts.cabal to use real arch names and not aliasses (fixes #18654)Karel Gardas2020-10-031-2/+2
|
* Small documentation fixesKrzysztof Gogolewski2020-10-037-14/+25
| | | | | | | | | - Fix formatting of code blocks and a few sphinx warnings - Move the Void# change to 9.2, it was done right after the branch was cut - Fix typo in linear types documentation - Note that -Wincomplete-uni-patterns affects lazy patterns [skip ci]
* Reject linearity in kinds in checkValidType (#18780)Krzysztof Gogolewski2020-10-028-16/+58
| | | | Patch taken from https://gitlab.haskell.org/ghc/ghc/-/issues/18624#note_300673
* Bignum: implement integerPowMod (#18427)Sylvain Henry2020-10-0213-60/+190
| | | | | | | Incidentally fix powModInteger which was crashing in integer-gmp for negative exponents when the modular multiplicative inverse for the base didn't exist. Now we compute it explicitly with integerRecipMod so that every backend returns the same result without crashing.
* Bignum: implement integerRecipMod (#18427)Sylvain Henry2020-10-0214-13/+160
|
* Minor TTG clean-up: comments, unused families, bottomVladislav Zavialov2020-10-022-52/+54
| | | | | | 1. Fix and update section headers in GHC/Hs/Extension.hs 2. Delete the unused 'XCoreAnn' and 'XTickPragma' families 3. Avoid calls to 'panic' in 'pprStmt'
* Replaced MkT1 with T1 in type signatures.Icelandjack2020-10-021-2/+2
|
* Fix typos in commentsKrzysztof Gogolewski2020-10-0229-31/+31
| | | | [skip ci]