summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* 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.
* [fixup 3433] move debugBelch into IF_DEBUG(linker)Moritz Angermann2020-08-311-2/+3
| | | | | | | | The commit in dff1cb3d9c111808fec60190747272b973547c52 incorrectly left the `debugBelch` function without a comment or IF_DEBUG(linker,) decoration. This rectifies it. Needs at least a 8.10 backport, as it was backported in 6471cc6aff80d5deebbdb1bf7b677b31ed2af3d5
* Dominators.hs: Use unix line endingsAndreas Klebinger2020-08-311-563/+563
|
* Update dominator code with fixes from the dom-lt package.Andreas Klebinger2020-08-311-83/+49
| | | | | Two bugs turned out in the package that have been fixed since. This MR includes this fixes in the GHC port of the code.
* Hadrian: fix slow-validate flavour (#18586)Sylvain Henry2020-08-311-1/+6
|
* Bump Win32 and process submodulesBen Gamari2020-08-312-0/+0
|
* Add additional tests for #18172 (Followup MR 3543)Roland Senn2020-08-313-0/+22
| | | | | | | There was still one active discussion [thread](https://gitlab.haskell.org/ghc/ghc/-/merge_requests/3543#note_284325) when MR !3543 got merged. This MR adds the requested tests exercising the changes in `compiler/GHC/HsToCore/Match/Literal.hs:warnAboutEmptyEnumerations` and its sub-functions.
* Add tests for #15617.Roland Senn2020-08-313-0/+9
| | | | Avoid a similar regression in the future.
* base: Better error message on invalid getSystemTimerManager callBen Gamari2020-08-311-2/+4
| | | | | | | | | Previously we would produce a rather unhelpful pattern match failure error in the case where the user called `getSystemTimerManager` in a program which isn't built with `-threaded`. This understandably confused the user in #15616. Fixes #15616.
* document how build system find toolchains on WindowsTamar Christina2020-08-288-12/+83
|
* Fix use distro toolchianTamar Christina2020-08-288-4/+19
|
* Add missing primop documentation (#18454)Krzysztof Gogolewski2020-08-288-56/+137
| | | | | | | | | | | | | | | - Add three pseudoops to primops.txt.pp, so that Haddock renders the documentation - Update comments - Remove special case for "->" - it's no longer exported from GHC.Prim - Remove reference to Note [Compiling GHC.Prim] - the ad-hoc fix is no longer there after updates to levity polymorphism. - Document GHC.Prim - Remove the comment that lazy is levity-polymorphic. As far as I can tell, it never was: in 80e399639, only the unfolding was given an open type variable. - Remove haddock hack in GHC.Magic - no longer neccessary after adding realWorld# to primops.txt.pp.
* Make {hsExpr,hsType,pat}NeedsParens aware of boxed 1-tuplesRyan Scott2020-08-276-1/+53
| | | | | | | | | | | | `hsExprNeedsParens`, `hsTypeNeedsParens`, and `patNeedsParens` previously assumed that all uses of explicit tuples in the source syntax never need to be parenthesized. This is true save for one exception: boxed one-tuples, which use the `Solo` data type from `GHC.Tuple` instead of special tuple syntax. This patch adds the necessary logic to the three `*NeedsParens` functions to handle `Solo` correctly. Fixes #18612.
* Consolidate imports in getMinimalImports (#18264)Aditya Gupta2020-08-275-3/+54
|
* primops: Remove Monadic and Dyadic categoriesKrzysztof Gogolewski2020-08-268-207/+152
| | | | | | | | | There were four categories of primops: Monadic, Dyadic, Compare, GenPrimOp. The compiler does not treat Monadic and Dyadic in any special way, we can just replace them with GenPrimOp. Compare is still used in isComparisonPrimOp.
* PPC and X86: Portable printing of IEEE floatsPeter Trommler2020-08-264-43/+34
| | | | | | | | | | | | GNU as and the AIX assembler support floating point literals. SPARC seems to have support too but I cannot test on SPARC. Curiously, `doubleToBytes` is also used in the LLVM backend. To avoid endianness issues when cross-compiling float and double literals are printed as C-style floating point values. The assembler then takes care of memory layout and endianness. This was brought up in #18431 by @hsyl20.
* Bignum: fix BigNat subtraction (#18604)Sylvain Henry2020-08-267-19/+31
| | | | | | There was a confusion between the boolean expected by withNewWordArrayTrimedMaybe and the boolean returned by subtracting functions.
* Refactor UnitId pretty-printingSylvain Henry2020-08-2624-185/+202
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we pretty-print a UnitId for the user, we try to map it back to its origin package name, version and component to print "package-version:component" instead of some hash. The UnitId type doesn't carry these information, so we have to look into a UnitState to find them. This is why the Outputable instance of UnitId used `sdocWithDynFlags` in order to access the `unitState` field of DynFlags. This is wrong for several reasons: 1. The DynFlags are accessed when the message is printed, not when it is generated. So we could imagine that the unitState may have changed in-between. Especially if we want to allow unit unloading. 2. We want GHC to support several independent sessions at once, hence several UnitState. The current approach supposes there is a unique UnitState as a UnitId doesn't indicate which UnitState to use. See the Note [Pretty-printing UnitId] in GHC.Unit for the new approach implemented by this patch. One step closer to remove `sdocDynFlags` field from `SDocContext` (#10143). Fix #18124. Also fix some Backpack code to use SDoc instead of String.
* users-guide: Color the logo on the front page of the PDFTakenobu Tani2020-08-261-0/+0
| | | | | | | | | This patch updates the logo with a recent color scheme. This affects only the PDF version of the user's guide. See also: * https://mail.haskell.org/pipermail/ghc-devs/2020-August/019139.html * https://gitlab.haskell.org/ghc/ghc/-/wikis/logo
* linters: Make CPP linter skip image filesTakenobu Tani2020-08-261-0/+3
| | | | | This patch adds an exclusion rule for `docs/users_guide/images`, to avoid lint errors of PDF files.
* Add a test for #18585Krzysztof Gogolewski2020-08-252-0/+49
|
* Use LIdP rather than (XRec p (IdP p))Simon Peyton Jones2020-08-2513-83/+71
| | | | | | | | | | | | | | | This patch mainly just replaces use of XRec p (IdP p) with LIdP p One slightly more significant change is to parameterise HsPatSynDetails over the pass rather than the argument type, so that it's uniform with HsConDeclDetails and HsConPatDetails. I also got rid of the dead code GHC.Hs.type.conDetailsArgs But this is all just minor refactoring. No change in functionality.
* Use tcView, not coreView, in the pure unifier.Richard Eisenberg2020-08-252-3/+24
| | | | Addresses a lingering point within #11715.
* SysTools.Process: Handle exceptions in readCreateProcessWithExitCode'Ben Gamari2020-08-251-3/+18
| | | | | | In #18069 we are observing MVar deadlocks from somewhere in ghc.exe. This use of MVar stood out as being one of the more likely culprits. Here we make sure that it is exception-safe.
* Avoid roundtrip through SDocSylvain Henry2020-08-241-3/+1
| | | | As found by @monoidal on https://gitlab.haskell.org/ghc/ghc/-/merge_requests/3885#note_295126
* Add a test for #18397Krzysztof Gogolewski2020-08-242-0/+24
| | | | The bug was fixed by !3421.
* Perf: make SDoc monad one-shot (#18202)Sylvain Henry2020-08-241-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | With validate-x86_64-linux-deb9-hadrian: T1969 -3.4% (threshold: +/-1%) T3294 -3.3% (threshold: +/-1%) T12707 -1.4% (threshold: +/-1%) Additionally with validate-x86_64-linux-deb9-unreg-hadrian: T4801 -2.4% (threshold: +/-2%) T13035 -1.4% (threshold: +/-1%) T13379 -2.4% (threshold: +/-2%) ManyAlternatives -2.5% (threshold: +/-2%) ManyConstructors -3.0% (threshold: +/-2%) Metric Decrease: T12707 T1969 T3294 ManyAlternatives ManyConstructors T13035 T13379 T4801
* Fix types in silly shifts (#18589)Krzysztof Gogolewski2020-08-243-9/+26
| | | | Patch written by Simon. I have only added a testcase.
* Move pprTyTcApp' inside pprTyTcAppKrzysztof Gogolewski2020-08-231-44/+39
| | | | No semantic change