summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* testsuite/timeout: Fix windows specific errors.wip/andreask/fix_timeout_warningsAndreas Klebinger2020-10-062-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.
* 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]
* Refactor: remove rnHsDocVladislav Zavialov2020-10-015-82/+13
| | | | It did not do any useful work.
* Bignum: add integerNegate RULESylvain Henry2020-10-014-0/+22
|
* Fix pretty-printing of the mult-polymorphic arrowVladislav Zavialov2020-10-016-12/+12
| | | | A follow-up to !4020 (5830a12c46e7227c276a8a71213057595ee4fc04)
* Add regression test for #18755.Richard Eisenberg2020-10-013-0/+6
| | | | Close #18755
* Don't attach CPR signatures to NOINLINE data structures (#18154)Sebastian Graf2020-10-012-86/+118
| | | | | | | | | | | | | | | | | Because the generated `KindRep`s don't have an unfolding, !3230 did not actually stop to compute, attach and serialise unnecessary CPR signatures for them. As already said in `Note [CPR for data structures]`, that leads to bloated interface files which is ultimately quadratic for Nested CPR. So we don't attach any CPR signature to bindings that * Are not thunks (because thunks are not in WHNF) * Have arity 0 (which means the top-level constructor is not a lambda) If the data structure has an unfolding, we continue to look through it. If not (as is the case for `KindRep`s), we look at the unchanged CPR signature and see `topCprType`, as expected.
* Don't import GHC.Unit to reduce the number of dependenciesSylvain Henry2020-10-0110-10/+19
|
* Parser: remove some unused importsSylvain Henry2020-10-011-15/+9
| | | | These are not reported by GHC because Happy adds {-# OPTIONS_GHC -w #-}
* Less DynFlags in Header parsingSylvain Henry2020-10-016-18/+22
|
* Use ADTs for parser errors/warningsSylvain Henry2020-10-0127-652/+1453
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Haskell and Cmm parsers/lexers now report errors and warnings using ADTs defined in GHC.Parser.Errors. They can be printed using functions in GHC.Parser.Errors.Ppr. Some of the errors provide hints with a separate ADT (e.g. to suggest to turn on some extension). For now, however, hints are not consistent across all messages. For example some errors contain the hints in the main message. I didn't want to change any message with this patch. I expect these changes to be discussed and implemented later. Surprisingly, this patch enhances performance. On CI (x86_64/deb9/hadrian, ghc/alloc): parsing001 -11.5% T13719 -2.7% MultiLayerModules -3.5% Naperian -3.1% Bump haddock submodule Metric Decrease: MultiLayerModules Naperian T13719 parsing001
* Remove mAIN completelyFendor2020-10-012-4/+2
|
* Use HomeUnit for main module without module declarationFendor2020-10-011-1/+1
|
* Add mainModuleNameIs and demote mainModIsFendor2020-10-012-7/+10
| | | | | | Add `mainModuleNameIs` to DynFlags and demote `mainModIs` to function which uses the homeUnit from DynFlags it is created from.
* Allow fusion with catMaybes (#18574)Sylvain Henry2020-10-012-2/+5
| | | | | Metric Decrease: T18574
* Add test for T18574Sylvain Henry2020-10-013-0/+14
|
* hadrian/doc: Clarify documentation of key-value configurationBen Gamari2020-09-301-1/+2
|
* Regression test for #10709.Richard Eisenberg2020-09-305-0/+110
| | | | Close #10709
* Pmc: Don't call exprType on type arguments (#18767)Sebastian Graf2020-09-301-1/+2
| | | | Fixes #18767.
* Omit redundant kind equality check in solverRichard Eisenberg2020-09-301-13/+21
| | | | | | | See updated Note [Use loose types in inert set] in GHC.Tc.Solver.Monad. Close #18753.
* Remove unused global variablesSylvain Henry2020-09-303-14/+0
| | | | | | | | | | Some removed globals variables were still declared in the RTS. They were removed in the following commits: * 4fc6524a2a4a0003495a96c8b84783286f65c198 * 0dc7985663efa1739aafb480759e2e2e7fca2a36 * bbd3c399939311ec3e308721ab87ca6b9443f358
* Remove unsafeGlobalDynFlags (#17957, #14597)Sylvain Henry2020-09-3017-140/+186
| | | | | There are still global variables but only 3 booleans instead of a single DynFlags.
* Bump Cabal, hsc2hs, directory, process submodulesBen Gamari2020-09-307-3/+3
| | | | Necessary for recent Win32 bump.
* testsuite: Mark T12971 as broken on WindowsBen Gamari2020-09-301-1/+1
| | | | Due to #17945.
* PmCheck: Long-distance information for LocalBinds (#18626)Sebastian Graf2020-09-306-26/+138
| | | | | | | | | | | | | | | | | | | | | | Now `desugarLocalBind` (formerly `desugarLet`) reasons about * `FunBind`s that * Have no pattern matches (so which aren't functions) * Have a singleton match group with a single GRHS * (which may have guards) * and looks through trivial post-typechecking `AbsBinds` in doing so to pick up the introduced renamings. And desugars to `PmLet` LYG-style guards. Since GRHSs are no longer denoted simply by `NonEmpty PmGRHS`, but also need to carry a `[PmGrd]` for the `PmLet`s from `LocalBind`s, I added `PmGRHSs` to capture that. Since we call out to the desugarer more often, I found that there were superfluous warnings emitted when desugaring e.g. case expressions. Thus, I made sure that we deactivate any warnings in the LYG desugaring steps by the new wrapper function `noCheckDs`. There's a regression test in `T18626`. Fixes #18626.
* Make the parser module less dependent on DynFlagsSylvain Henry2020-09-2915-89/+109
| | | | Bump haddock submodule
* Add regression test #18501Ryan Scott2020-09-293-0/+5
| | | | | ghc/ghc!3220 ended up fixing #18501. This patch adds a regression test for #18501 to ensure that it stays fixed.
* Workaround for #18623: GHC crashes bc. under rlimit for vmem it will reserveBenjamin Maurer2020-09-292-5/+58
| | | | | | _all_ of it, leaving nothing for, e.g., thread stacks. Fix will only allocate 2/3rds and check whether remainder is at least large enough for minimum amount of thread stacks.
* Description of flag `-H` was in 'verbosity options', moved to 'misc'.Benjamin Maurer2020-09-291-8/+8
| | | | Fixes #18699
* Improve error messages for (a %m) without LinearTypesVladislav Zavialov2020-09-292-11/+19
| | | | | | | | Detect when the user forgets to enable the LinearTypes extension and produce a better error message. Steals the (a %m) syntax from TypeOperators, the workaround is to write (a % m) instead.
* New linear types syntax: a %p -> b (#18459)Vladislav Zavialov2020-09-2973-162/+183
| | | | | | Implements GHC Proposal #356 Updates the haddock submodule.
* Linear types: fix kind inference when checking dataconsKrzysztof Gogolewski2020-09-291-1/+3
|
* Optimize NthCo (FunCo ...) in coercion optRichard Eisenberg2020-09-293-28/+39
| | | | | | | | | | We were missing this case previously. Close #18528. Metric Decrease: T18223 T5321Fun
* Remove outdated comment in rnHsTyKiVladislav Zavialov2020-09-271-4/+0
| | | | | This comment dates back to 3df40b7b78044206bbcffe3e2c0a57d901baf5e8 and does not seem relevant anymore.
* Don't rearrange (->) in the renamerVladislav Zavialov2020-09-271-36/+26
| | | | | | | | | | The parser produces an AST where the (->) is already associated correctly: 1. (->) has the least possible precedence 2. (->) is right-associative Thus we don't need to handle it in mkHsOpTyRn.
* Comments: change outdated reference to mergeOpswip/docs-no-merge-opsVladislav Zavialov2020-09-271-1/+1
| | | | | | | As of 686e06c59c3aa6b66895e8a501c7afb019b09e36, GHC.Parser.PostProcess.mergeOps no longer exists. [ci skip]
* Fix handling of function coercions (#18747)Krzysztof Gogolewski2020-09-264-1/+135
| | | | This was broken when we added multiplicity to the function type.
* Disallow linear types in FFI (#18472)Krzysztof Gogolewski2020-09-264-10/+48
|
* Make 'undefined x' linear in 'x' (#18731)Krzysztof Gogolewski2020-09-263-2/+13
|
* Bignum: add bigNatFromWordArraySylvain Henry2020-09-262-0/+45
| | | | Reimplementation of integer-gmp's byteArrayToBigNat#