summaryrefslogtreecommitdiff
path: root/testsuite/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* HsUniToken for :: in GADT constructors (#19623)Vladislav Zavialov2022-04-086-11/+61
| | | | | | One more step towards the new design of EPA. Updates the haddock submodule.
* Add flag -fprof-manual which controls if GHC should honour manual cost centres.Andreas Klebinger2022-04-084-0/+46
| | | | | | | This allows disabling of manual control centres in code a user doesn't control like libraries. Fixes #18867
* Merge remote-tracking branch 'origin/master'Ben Gamari2022-04-0825-35/+743
|\
| * Reject illegal quote mark in data con declarations (#17865)Vladislav Zavialov2022-04-082-2/+22
| | | | | | | | | | | | * Non-fatal (i.e. recoverable) parse error * Checking infix constructors * Extended the regression test
| * Correctly report SrcLoc of redundant constraintssheaf2022-04-083-0/+11
| | | | | | | | | | | | | | | | | | We were accidentally dropping the source location information in certain circumstances when reporting redundant constraints. This patch makes sure that we set the TcLclEnv correctly before reporting the warning. Fixes #21315
| * testsuite: Lint RTS #includesBen Gamari2022-04-083-1/+99
| | | | | | | | | | | | | | | | | | | | | | Verifies two important properties of #includes in the RTS: * That system headers don't appear inside of a `<BeginPrivate.h>` block as this can hide system library symbols, resulting in very hard-to-diagnose linker errors * That no headers precede `Rts.h`, ensuring that __USE_MINGW_ANSI_STDIO is set correctly before system headers are included.
| * Add test for #21338sheaf2022-04-083-0/+74
| | | | | | | | | | | | | | | | This no-skolem-info bug was fixed by the no-skolem-info patch that will be part of GHC 9.4. This patch adds a regression test for the issue reported in issue #21338. Fixes #21338.
| * Fix the free-var test in validDerivPredSimon Peyton Jones2022-04-073-0/+32
| | | | | | | | | | | | | | | | | | | | The free-var test (now documented as (VD3)) was too narrow, affecting only class predicates. #21302 demonstrated that this wasn't enough! Fixes #21302. Co-authored-by: Ryan Scott <ryan.gl.scott@gmail.com>
| * Rename [] to List (#21294)Vladislav Zavialov2022-04-0710-14/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch implements a small part of GHC Proposal #475. The key change is in GHC.Types: - data [] a = [] | a : [a] + data List a = [] | a : List a And the rest of the patch makes sure that List is pretty-printed as [] in various contexts. Updates the haddock submodule.
| * Use prepareBinding in tryCastWorkerWrapperSimon Peyton Jones2022-04-072-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As #21144 showed, tryCastWorkerWrapper was calling prepareRhs, and then unconditionally floating the bindings, without the checks of doFloatFromRhs. That led to floating an unlifted binding into a Rec group. This patch refactors prepareBinding to make these checks, and do them uniformly across all calls. A nice improvement. Other changes * Instead of passing around a RecFlag and a TopLevelFlag; and sometimes a (Maybe SimplCont) for join points, define a new Simplifier-specific data type BindContext: data BindContext = BC_Let TopLevelFlag RecFlag | BC_Join SimplCont and use it consistently. * Kill off completeNonRecX by inlining it. It was only called in one place. * Add a wrapper simplImpRules for simplRules. Compile time on T9630 drops by 4.7%; little else changes. Metric Decrease: T9630
| * EPA: handling of con_bndrs in mkGadtDeclAlan Zimmerman2022-04-072-19/+570
| | | | | | | | | | | | Get rid of unnnecessary case clause that always matched. Closes #20558
| |
| \
| \
| \
*---. \ Merge branches 'wip/windows-high-codegen', 'wip/windows-high-linker', ↵Ben Gamari2022-04-0730-109/+227
|\ \ \ \ | |_|_|/ |/| | | | | | | 'wip/windows-clang-2' and 'wip/lint-rts-includes' into wip/windows-clang-join
| | | * testsuite: Lint RTS #includeswip/lint-rts-includesBen Gamari2022-04-063-1/+99
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Verifies two important properties of #includes in the RTS: * That system headers don't appear inside of a `<BeginPrivate.h>` block as this can hide system library symbols, resulting in very hard-to-diagnose linker errors * That no headers precede `Rts.h`, ensuring that __USE_MINGW_ANSI_STDIO is set correctly before system headers are included.
| | * testsuite: Mark T9405 as broken on WindowsBen Gamari2022-04-071-1/+1
| | | | | | | | | | | | Due to #21361.
| | * testsuite: Mark linker unloading tests as broken on WindowsBen Gamari2022-04-072-0/+2
| | | | | | | | | | | | | | | | | | Due to #20354. We will need to investigate this prior the release.
| | * testsuite: Mark T20918 as broken on WindowsBen Gamari2022-04-071-4/+5
| | | | | | | | | | | | Our toolchain on Windows doesn't currently have Windows support.
| | * testsuite: Update expected output from T5435 tests on WindowsBen Gamari2022-04-072-1/+3
| | | | | | | | | | | | | | | I'll admit, I don't currently see *why* this output is reordered but it is a fairly benign difference and I'm out of time to investigate.
| | * testsuite: Fix exit code of bounds checking tests on WindowsBen Gamari2022-04-071-1/+1
| | | | | | | | | | | | `abort` exits with 255, not 134, on Windows.
| | * testsuite: Mark T10420 as broken on WindowsBen Gamari2022-04-072-2/+3
| | | | | | | | | | | | Due to #21322.
| | * testsuite: Mark TH_spliceE5_prof as unbroken on WindowsBen Gamari2022-04-061-2/+1
| | | | | | | | | | | | | | | | | | | | | It was previously failing due to #18721 and now passes with the new toolchain. Closes #18721.
| | * testsuite: Mark test-defaulting-plugin as fragile on WindowsBen Gamari2022-04-061-0/+2
| | | | | | | | | | | | | | | Currently llvm-ar does not handle long file paths, resulting in occassional failures of these tests and #21293.
| | * testsuite: Provide module definitions in T10955dynBen Gamari2022-04-064-7/+25
| | | | | | | | | | | | | | | | | | | | | | | | Otherwise the linker will export all symbols, including those provided by the RTS, from the produced shared object. Consequently, attempting to link against multiple objects simultaneously will cause the linker to complain that RTS symbols are multiply defined. Avoid this by limiting the DLL exports with a module definition file.
| | * testsuite: Fix mk-big-objBen Gamari2022-04-061-1/+1
| | | | | | | | | | | | | | | I'm a bit unclear on how this previously worked as it attempted to build an executable without defining `main`.
| | * testsuite: Split T13366 into two testsBen Gamari2022-04-065-17/+30
| | | | | | | | | | | | | | | Split up the C and C++ uses since the latter is significantly more platform-dependent.
| | * testsuite: Clean up tests depending on C++ std libBen Gamari2022-04-065-21/+5
| | |
| | * testsuite: Rework T13606 to avoid gcc dependenceBen Gamari2022-04-061-1/+2
| | | | | | | | | | | | | | | Previously we used libgcc_s's import library in T13606. However, now that we ship with clang we no longer have this library. Instead we now use gdi32.
| | * testsuite: Mark FloatFnInverses as fixedBen Gamari2022-04-061-2/+1
| | | | | | | | | | | | | | | | | | The new toolchain has fixed it. Closes #15670.
| | * testsuite: Mark T9405 as fixed on WindowsBen Gamari2022-04-061-1/+1
| | | | | | | | | | | | | | | | | | I have not seen it fail since moving to clang. Closes #12714.
| | * testsuite: Port T16514 to CBen Gamari2022-04-063-46/+32
| | | | | | | | | | | | | | | Previously this test was C++ which made it a bit of a portability problem.
| | * testsuite: Test that we can build bigobj PE objectsBen Gamari2022-04-062-0/+12
| |/ |/|
| * rts/linker: Report archive member indexBen Gamari2022-04-063-3/+3
|/
* Add warnings for file header pragmas that appear in the body of a module ↵Zubin Duggal2022-04-0612-5/+67
| | | | | | | | | | | | | | | (#20385) Once we are done parsing the header of a module to obtain the options, we look through the rest of the tokens in order to determine if they contain any misplaced file header pragmas that would usually be ignored, potentially resulting in bad error messages. The warnings are reported immediately so that later errors don't shadow over potentially helpful warnings. Metric Increase: T13719
* Ensure implicit parameters are liftedsheaf2022-04-013-0/+16
| | | | | | | | `tcExpr` typechecked implicit parameters by introducing a metavariable of kind `TYPE kappa`, without enforcing that `kappa ~ LiftedRep`. This patch instead creates a metavariable of kind `Type`. Fixes #21327
* Fix error when using empty case in arrow notationJakob Bruenker2022-04-013-0/+12
| | | | | | | | | It was previously not possible to use -XEmptyCase in Arrow notation, since GHC would print "Exception: foldb of empty list". This is now fixed. Closes #21301
* Add a regression test for #21323sheaf2022-04-012-0/+56
| | | | | This bug was fixed at some point between GHC 9.0 and GHC 9.2; this patch simply adds a regression test.
* Implement \cases (Proposal 302)Jakob Bruenker2022-04-0131-57/+263
| | | | | | | | | | | | This commit implements proposal 302: \cases - Multi-way lambda expressions. This adds a new expression heralded by \cases, which works exactly like \case, but can match multiple apats instead of a single pat. Updates submodule haddock to support the ITlcases token. Closes #20768
* Keep track of promotion ticks in HsOpTywip/no-c-stubswip/matt-merge-batchsheaf2022-04-017-5/+74
| | | | | | | | | | | | | | | | This patch adds a PromotionFlag field to HsOpTy, which is used in pretty-printing and when determining whether to emit warnings with -fwarn-unticked-promoted-constructors. This allows us to correctly report tick-related warnings for things like: type A = Int : '[] type B = [Int, Bool] Updates haddock submodule Fixes #19984
* driver: In oneshot mode, look for interface files in hidirMatthew Pickering2022-04-014-0/+10
| | | | | | | | | | | | | | | | How things should work: * -i is the search path for source files * -hidir explicitly sets the search path for interface files and the output location for interface files. * -odir sets the search path and output location for object files. Before in one shot mode we would look for the interface file in the search locations given by `-i`, but then set the path to be in the `hidir`, so in unusual situations the finder could find an interface file in the `-i` dir but later fail because it tried to read the interface file from the `-hidir`. A bug identified by #20569
* driver: Improve -Wunused-packages error message (and simplify implementation)Matthew Pickering2022-04-013-5/+5
| | | | | | | | | | | | | | | | | | | | | In the past I improved the part of -Wunused-packages which found which packages were used. Now I improve the part which detects which ones were specified. The key innovation is to use the explicitUnits field from UnitState which has the result of resolving the package flags, so we don't need to mess about with the flag arguments from DynFlags anymore. The output now always includes the package name and version (and the flag which exposed it). ``` The following packages were specified via -package or -package-id flags, but were not needed for compilation: - bytestring-0.11.2.0 (exposed by flag -package bytestring) - ghc-9.3 (exposed by flag -package ghc) - process-1.6.13.2 (exposed by flag -package process) ``` Fixes #21307
* Change GHC.Prim to GHC.Exts in docs and testsKrzysztof Gogolewski2022-04-01110-113/+89
| | | | | Users are supposed to import GHC.Exts rather than GHC.Prim. Part of #18749.
* Fix panic when pretty printing HsCmdLamJakob Bruenker2022-04-014-2/+13
| | | | | | | When pretty printing a HsCmdLam with more than one argument, GHC panicked because of a missing case. This fixes that. Closes #21300
* Add tests and docs on plugin args and order.Phil de Joux2022-04-0116-0/+178
|
* Minor cleanupKrzysztof Gogolewski2022-04-0118-58/+12
| | | | | | | | | | | - Remove unused functions exprToCoercion_maybe, applyTypeToArg, typeMonoPrimRep_maybe, runtimeRepMonoPrimRep_maybe. - Replace orValid with a simpler check - Use splitAtList in applyTysX - Remove calls to extra_clean in the testsuite; it does not do anything. Metric Decrease: T18223
* Add test cases for #20640ARATA Mizuki2022-04-015-0/+22
| | | | Closes #20640
* Unify RuntimeRep arguments in ty_co_matchsheaf2022-04-012-1/+26
| | | | | | | | | | | | | | | | | The `ty_co_match` function ignored the implicit RuntimeRep coercions that occur in a `FunCo`. Even though a comment explained that this should be fine, #21205 showed that it could result in discarding a RuntimeRep coercion, and thus discarding an important cast entirely. With this patch, we first match the kinds in `ty_co_match`. Fixes #21205 ------------------------- Metric Increase: T12227 T18223 -------------------------
* new datatypes for parsedResultActionJakob Bruenker2022-04-014-22/+18
| | | | | | | | Previously, the warnings and errors were given and returned as a tuple (Messages PsWarnings, Messages PsErrors). Now, it's just PsMessages. This, together with the HsParsedModule the parser plugin gets and returns, has been wrapped up as ParsedResult.
* T13366 requires c++ & c++abi libraries on OpenBSDGreg Steuck2022-04-011-1/+1
| | | | | | | | | | | | | | Fixes this failure: =====> 1 of 1 [0, 0, 0] T13366(normal) 1 of 1 [0, 0, 0] Compile failed (exit code 1) errors were: <no location info>: error: user specified .o/.so/.DLL could not be loaded (File not found) Whilst trying to load: (dynamic) stdc++ Additional directories searched: (none) *** unexpected failure for T13366(normal)
* Give parsing plugins access to errorsJakob Brünker2022-03-3013-7/+170
| | | | | | | | | | | Previously, when the parser produced non-fatal errors (i.e. it produced errors but the 'PState' is 'POk'), compilation would be aborted before the 'parsedResultAction' of any plugin was invoked. This commit changes that, so that such that 'parsedResultAction' gets collections of warnings and errors as argument, and must return them after potentially modifying them. Closes #20803
* Add test for T21306Matthew Pickering2022-03-293-0/+55
| | | | Fixes #21306
* EPA: let stmt with semicolon has wrong anchorAlan Zimmerman2022-03-283-0/+11
| | | | | | | | | | | | | The code let ;x =1 Captures the semicolon annotation, but did not widen the anchor in the ValBinds. Fix that. Closes #20247