summaryrefslogtreecommitdiff
path: root/testsuite
Commit message (Collapse)AuthorAgeFilesLines
* Fix some negation issues when creating FractionalLitMatthew Pickering2021-04-145-0/+23
| | | | | | | | | | There were two different issues: 1. integralFractionalLit needed to be passed an already negated value. (T19680) 2. negateFractionalLit did not actually negate the argument, only flipped the negation flag. (T19680A) Fixes #19680
* Always generate ModDetails from ModIfaceMatthew Pickering2021-04-1411-43/+43
| | | | | | | | | | | | | | | | | | This vastly reduces memory usage when compiling with `--make` mode, from about 900M when compiling Cabal to about 300M. As a matter of uniformity, it also ensures that reading from an interface performs the same as using the in-memory cache. We can also delete all the horrible knot-tying in updateIdInfos. Goes some way to fixing #13586 Accept new output of tests fixing some bugs along the way ------------------------- Metric Decrease: T12545 -------------------------
* Add {lifted,unlifted}DataConKey to pretendNameIsInScope's list of NamesRyan Scott2021-04-1310-0/+50
| | | | Fixes #19688.
* Make the specialiser handle polymorphic specialisationSimon Peyton Jones2021-04-134-0/+130
| | | | | | | | | | | | | | | | | | | | | | | | | | | Ticket #13873 unexpectedly showed that a SPECIALISE pragma made a program run (a lot) slower, because less specialisation took place overall. It turned out that the specialiser was missing opportunities because of quantified type variables. It was quite easy to fix. The story is given in Note [Specialising polymorphic dictionaries] Two other minor fixes in the specialiser * There is no benefit in specialising data constructor /wrappers/. (They can appear overloaded because they are given a dictionary to store in the constructor.) Small guard in canSpecImport. * There was a buglet in the UnspecArg case of specHeader, in the case where there is a dead binder. We need a LitRubbish filler for the specUnfolding stuff. I expanded Note [Drop dead args from specialisations] to explain. There is a 4% increase in compile time for T13056, because we generate more specialised code. This seems OK. Metric Increase: T13056
* Turn T11545 into a normal performance testMatthew Pickering2021-04-121-2/+2
| | | | | This makes it more robust to people running it with `quick` flavour and so on.
* Add regression test for T19615Matthew Pickering2021-04-123-0/+24
| | | | Fixes #19615
* template-haskell: Run TH splices with err_vars from current contextMatthew Pickering2021-04-123-0/+16
| | | | | | Otherwise, errors can go missing which arise when running the splices. Fixes #19470
* More accurate SrcSpan when reporting redundant constraintsSimon Peyton Jones2021-04-126-7/+115
| | | | | | | | | | | | | | | | | | | | | | | | We want an accurate SrcSpan for redundant constraints: • Redundant constraint: Eq a • In the type signature for: f :: forall a. Eq a => a -> () | 5 | f :: Eq a => a -> () | ^^^^ This patch adds some plumbing to achieve this * New data type GHC.Tc.Types.Origin.ReportRedundantConstraints (RRC) * This RRC value is kept inside - FunSigCtxt - ExprSigCtxt * Then, when reporting the error in GHC.Tc.Errors, use this SrcSpan to control the error message: GHC.Tc.Errors.warnRedundantConstraints Quite a lot of files are touched in a boring way.
* Fix magicDict in ghci (and in the presence of other ticks)Matthew Pickering2021-04-107-1/+64
| | | | | | | | | | | The problem was that ghci inserts some ticks around the crucial bit of the expression. Just like in some of the other rules we now strip the ticks so that the rule fires more reliably. It was possible to defeat magicDict by using -fhpc as well, so not just an issue in ghci. Fixes #19667 and related to #19673
* tests: Allow --skip-perf-tests/--only-perf-tests to be used with ↵Matthew Pickering2021-04-101-1/+1
| | | | --ignore-perf-failures
* Add missing relational constant folding for sized numeric typesJohn Ericson2021-04-103-0/+51
|
* Read constants header instead of global platformConstantsSylvain Henry2021-04-102-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | With this patch we switch from reading the globally installed platformConstants file to reading the DerivedConstants.h header file that is bundled in the RTS unit. When we build the RTS unit itself, we get it from its includes directories. The new parser is more efficient and strict than the Read instance for PlatformConstants and we get about 2.2MB less allocations in every cases. However it only really shows in tests that don't allocate much, hence the following metric decreases. Metric Decrease: Naperian T10421 T10547 T12150 T12234 T12425 T13035 T18304 T18923 T5837 T6048 T18140
* Test #19665 as expect_broken, with commentaryRichard Eisenberg2021-04-102-0/+21
|
* Tweak kick-out condition K2b to deal with LHSsRichard Eisenberg2021-04-102-0/+25
| | | | | | | | | | | | | | Kick out condition K2b really only makes sense for inerts with a type variable on the left. This updates the commentary and the code to skip this check for inerts with type families on the left. Also cleans up some commentary around solver invariants and adds Note [K2b]. Close #19042. test case: typecheck/should_compile/T19042
* Add perf test for #15304Matthew Pickering2021-04-093-0/+778
| | | | | The test max memory usage improves dramatically with the fixes to memory usage in demand analyser from #15455
* testsuite/ppc64le: Mark UnboxedTuples test brokenPeter Trommler2021-04-091-0/+1
|
* Fix typoPeter Trommler2021-04-091-1/+1
|
* testsuite: Skip T18623 on powerpc64lePeter Trommler2021-04-091-1/+2
| | | | | | | In commit f3c23939 T18623 is disabled for aarch64. The limit seems to be too low for powerpc64le, too. This could be because tables next to code is not supported and our code generator produces larger code on PowerPC.
* Fix #19649 by using filterInScopeM in rnFamEqnRyan Scott2021-04-082-15/+250
| | | | | | | | | | Previously, associated type family instances would incorrectly claim to implicitly quantify over type variables bound by the instance head in the `HsOuterImplicit`s that `rnFamEqn` returned. This is fixed by using `filterInScopeM` to filter out any type variables that the instance head binds. Fixes #19649.
* T11545 now also passes due to modifications in demand analysisMatthew Pickering2021-04-082-2/+2
| | | | Fixes #11545
* Remove dynamic-by-default (#16782)Sylvain Henry2021-04-075-21/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Dynamic-by-default was a mechanism to automatically select the -dynamic way for some targets. It was implemented in a convoluted way: it was defined as a flavour option, hence it couldn't be passed as a global settings (which are produced by `configure` before considering flavours), so a build system rule was used to pass -DDYNAMIC_BY_DEFAULT to the C compiler so that deriveConstants could infer it. * Make build system has it disabled for 8 years (951e28c0625ece7e0db6ac9d4a1e61e2737b10de) * It has never been implemented in Hadrian * Last time someone tried to enable it 1 year ago it didn't work (!2436) * Having this as a global constant impedes making GHC multi-target (see !5427) This commit fully removes support for dynamic-by-default. If someone wants to reimplement something like this, it would probably need to move the logic in the compiler. (Doing this would probably need some refactoring of the way the compiler handles DynFlags: DynFlags are used to store and to pass enabled ways to many parts of the compiler. It can be set by command-line flags, GHC API, global settings. In multi-target GHC, we will use DynFlags to load the target platform and its constants: but at this point with the current DynFlags implementation we can't easily update the existing DynFlags with target-specific options such as dynamic-by-default without overriding ways previously set by the user.)
* Make specialisation a bit more aggressiveSimon Peyton Jones2021-04-075-0/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch commit c43c981705ec33da92a9ce91eb90f2ecf00be9fe Author: Simon Peyton Jones <simonpj@microsoft.com> Date: Fri Oct 23 16:15:51 2009 +0000 Fix Trac #3591: very tricky specialiser bug fixed a nasty specialisation bug /for DFuns/. Eight years later, this patch commit 2b74bd9d8b4c6b20f3e8d9ada12e7db645cc3c19 Author: Simon Peyton Jones <simonpj@microsoft.com> Date: Wed Jun 7 12:03:51 2017 +0100 Stop the specialiser generating loopy code extended it to work for /imported/ DFuns. But in the process we lost the fact that it was needed only for DFuns! As a result we started silently losing useful specialisation for non-DFuns. But there was no regression test to spot the lossage. Then, nearly four years later, Andreas filed #19599, which showed the lossage in high relief. This patch restores the DFun test, and adds Note [Avoiding loops (non-DFuns)] to explain why. This is undoubtedly a very tricky corner of the specialiser, and one where I would love to have a more solid argument, even a paper! But meanwhile I think this fixes the lost specialisations without introducing any new loops. I have two regression tests, T19599 and T19599a, so I hope we'll know if we lose them again in the future. Vanishingly small effect on nofib. A couple of compile-time benchmarks improve T9872a(normal) ghc/alloc 1660559328.0 1643827784.0 -1.0% GOOD T9872c(normal) ghc/alloc 1691359152.0 1672879384.0 -1.1% GOOD Many others wiggled around a bit. Metric Decrease: T9872a T9872c
* Revert "[ci/arm/darwin/testsuite] Forwards ports from GHC-8.10"Ben Gamari2021-04-059-57/+28
| | | | This reverts commit 0cbdba2768d84a0f6832ae5cf9ea1e98efd739da.
* Add (expect_broken) test for #11545Matthew Pickering2021-04-052-0/+16
|
* Mark p6 and T3333 as fragileSimon Jakobi2021-04-052-2/+3
| | | | See #17018.
* Add regression test for T19474.Andreas Klebinger2021-04-052-0/+19
| | | | | | | In version 0.12.2.0 of vector when used with GHC-9.0 we rebox values from storeable mutable vectors. This should catch such a change in the future.
* fix sub-word literals in GHCiLuite Stegeman2021-04-057-0/+273
|
* Correct warning for deprecated and unrecognised flagsAlfredo Di Napoli2021-04-0540-49/+52
| | | | | | | | | | Fixes #19616. This commit changes the `GHC.Driver.Errors.handleFlagWarnings` function to rely on the newly introduced `DiagnosticReason`. This allows us to correctly pretty-print the flags which triggered some warnings and in turn remove the cruft around this function (like the extra filtering and the `shouldPrintWarning` function.
* Add type signature for TargetContents.goHarry Garrood harry@garrood.me2021-04-051-1/+10
| | | | | These changes made it slightly easier for me to work out what was going on in this test. I've also fixed a typo in the comments.
* Implement proposal 403: Lexer cleanupOleg Grenrus2021-04-054-0/+35
| | | | | This allows Other Numbers to be used in identifiers, and also documents other, already existing lexer divergence from Haskell Report
* Pmc: Add regression test for #19622Sebastian Graf2021-04-022-0/+57
| | | | | | | It appears that the issue has already been fixed. Judging by the use of a pattern synonym with a provided constraint, my bet is on 1793ca9d. Fixes #19622.
* testsuite: Add test for #7275Ben Gamari2021-04-024-0/+67
|
* testsuite: Check test stats only after test correctnessBen Gamari2021-04-021-5/+5
| | | | | | | | | Ticket #19576 noted that a test that failed in correctness (e.g. due to stderr mismatch) *and* failed due to a metrics change would report misleading stats. This was due to the testsuite driver *first* checking stats, before checking for correctness. Fix this. Closes #19576.
* testsuite: Make passFail a booleanBen Gamari2021-04-022-24/+13
|
* Compute Severity of diagnostics at birthAlfredo Di Napoli2021-04-012-3/+3
| | | | | | | | | | | | | | | | | | | | | This commit further expand on the design for #18516 by getting rid of the `defaultReasonSeverity` in favour of a function called `diagReasonSeverity` which correctly takes the `DynFlags` as input. The idea is to compute the `Severity` and the `DiagnosticReason` of each message "at birth", without doing any later re-classifications, which are potentially error prone, as the `DynFlags` might evolve during the course of the program. In preparation for a proper refactoring, now `pprWarning` from the Parser.Ppr module has been renamed to `mkParserWarn`, which now takes a `DynFlags` as input. We also get rid of the reclassification we were performing inside `printOrThrowWarnings`. Last but not least, this commit removes the need for reclassify inside GHC.Tc.Errors, and also simplifies the implementation of `maybeReportError`. Update Haddock submodule
* Add missing axiom exports for CharToNat/NatToCharVladislav Zavialov2021-04-012-2/+8
| | | | | | | When the CharToNat and NatToChar type families were added, the corresponding axioms were not exported. This led to a failure much like #14934
* Fix testsSylvain Henry2021-04-012-2/+6
|
* Data.List specialization to []Oleg Grenrus2021-04-0119-24/+37
| | | | | | | - Remove GHC.OldList - Remove Data.OldList - compat-unqualified-imports is no-op - update haddock submodule
* Add regression tests for #17772 and #18308Ryan Scott2021-03-313-0/+41
| | | | Resolves #17772. Addresses one part of #18308.
* Avoid fundep-caused loop in the typecheckerSimon Peyton Jones2021-03-313-0/+38
| | | | | | | | | | | Ticket #19415 showed a nasty typechecker loop, which can happen with fundeps that do not satisfy the coverage condition. This patch fixes the problem. It's described in GHC.Tc.Solver.Interact Note [Fundeps with instances] It's not a perfect solution, as the Note explains, but it's better than the status quo.
* EPA : Rename AnnComment to EpaCommentAlan Zimmerman2021-03-3110-458/+458
| | | | Follow-up from !2418, see #19579
* EPA : Rename ApiAnn to EPAnnAlan Zimmerman2021-03-3115-1505/+1505
| | | | | | Follow-up from !2418, see #19579 Updates haddock submodule
* EPA : Rename AddApiAnn to AddEpAnnAlan Zimmerman2021-03-319-219/+219
| | | | | | | As port of the process of migrating naming from API Annotations to exact print annotations (EPA) Follow-up from !2418, see #19579
* The result kind of a signature can't mention quantified varsSimon Peyton Jones2021-03-313-3/+25
| | | | | | | | | | | | | | | | | | | | | This patch fixes a small but egregious bug, which allowed a type signature like f :: forall a. blah not to fail if (blah :: a). Acutally this only showed up as a ASSERT error (#19495). The fix is very short, but took quite a bit of head scratching Hence the long Note [Escaping kind in type signatures] While I was in town, I also added a short-cut for the common case of having no quantifiers to tcImplicitTKBndrsX. Metric Decrease: T9198 Metric Increase: T9198
* Add regression test for #5298Simon Jakobi2021-03-305-0/+38
| | | | Closes #5298.
* [testsuite/aarch64-darwin] disable T12674Moritz Angermann2021-03-291-1/+3
|
* [testsuite/aarch64] disable T18623Moritz Angermann2021-03-291-1/+6
|
* [testlib] ignore strip warningsMoritz Angermann2021-03-291-0/+4
|
* [testsuite] Fix SubsectionsViaSymbols testMoritz Angermann2021-03-292-1/+2
|
* Allocate Adjustors and mark them readable in two stepsMoritz Angermann2021-03-292-5/+5
| | | | | | | | | This drops allocateExec for darwin, and replaces it with a alloc, write, mark executable strategy instead. This prevents us from trying to allocate an executable range and then write to it, which X^W will prohibit on darwin. This will *only* work if we can use mmap.