summaryrefslogtreecommitdiff
path: root/testsuite
Commit message (Collapse)AuthorAgeFilesLines
* PPC NCG: Remove Darwin supportPeter Trommler2019-01-011-2/+0
| | | | | | | Support for Mac OS X on PowerPC has been dropped by Apple years ago. We follow suit and remove PowerPC support for Darwin. Fixes #16106.
* Introduce NCG config flag and add helperGabor Greif2018-12-302-1/+6
| | | | | | | ... for testing presence of NCG This commit adds a criterion for checking whether we can expect sensible output from --ddump-asm.
* testsuite: Disable more tests in unregisterised buildwip/disable-fragile-unreg-testsBen Gamari2018-12-283-3/+12
| | | | | | This disables `ghcilink005`, `foreignInterruptable`, and `T7040_ghci` in the unregisterised build as they tend to fail non-deterministically. See ticket #16085.
* rebindable-clash-warning-fix : correct warning logicShayne Fletcher2018-12-285-0/+37
|
* Skip test when external interpreter missingPeter Trommler2018-12-281-0/+1
|
* arith011 is no longer broken with integer-simpleAlec Theriault2018-12-271-3/+1
|
* testsuite: Skip ffi018_ghci when unregisterisedBen Gamari2018-12-251-1/+3
| | | | As noted in #16085 this test is fragile in unregisterised compilers.
* testsuite: Fix a variety of issues when building with integer-simpleBen Gamari2018-12-2410-24/+33
| | | | | | | | | | | | | | | | | | | | | | | | | * Mark arith011 as broken with integer-simple As noted in #16091, arith011 fails when run against integer-simple with a "divide by zero" exception. This suggests that integer-gmp and integer-simple are handling division by zero differently. * This also fixes broken_without_gmp; the lack of types made the previous failure silent, sadly. Improves situation of #16043. * Mark several tests implicitly depending upon integer-gmp as broken with integer-simple. These expect to see Core coming from integer-gmp, which breaks with integer-simple. * Increase runtime timeout multiplier of T11627a with integer-simple I previously saw that T11627a timed out in all profiling ways when run against integer-simple. I suspect this is due to integer-simple's rather verbose heap representation. Let's see whether increasing the runtime timeout helps. Fixes test for #11627. This is all in service of fixing #16043.
* testsuite: Enable T11627a on DarwinBen Gamari2018-12-241-3/+0
| | | | | | The retainer profiler no longer uses the C stack for its mark stack (#14758). Consequently even the small C stack provided on Darwin should be sufficient to run this test. See #11627
* Simplify Core output with -dsuppress-type-signaturesÖmer Sinan Ağacan2018-12-242-4/+0
| | | | | | | | | | | | | | | | | | | | | | | Currently we duplicate top-level binder ids for no reason: $fEqHsExpr_$c/= $fEqHsExpr_$c/= = \ @ id_a27U $dEq_a27V eta_B2 eta1_B1 -> case $fEqHsExpr_$c== $dEq_a27V eta_B2 eta1_B1 of { False -> True; True -> False } with this patch we drop the first line when type signatures are not printed (-dsuppress-type-signatures, which is implied by -dsuppress-all) Reviewers: simonpj, bgamari Reviewed By: simonpj Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5472
* testsuite: Mark th tests as broken in ext-interp way in LLVM build flavoursBen Gamari2018-12-242-0/+9
| | | | | | | This is due to the failures documented in #16087. The condition here could be improved as it matches on `BUILD_FLAVOUR` instead of looking at the compiler flags. However, it's better than nothing and I hope we will be able to fix these issues before long.
* Revert "testsuite: Fix broken_without_gmp"Ben Gamari2018-12-231-4/+5
| | | | | | | This reverts commit e59439af3222d151918ad1ad2a03942ce9e6a1ff. This is causing unexpected failures in some test ways. Further proof that no change is too trivial for CI.
* testsuite: Fix broken_without_gmpBen Gamari2018-12-231-5/+4
| | | | | The lack of types made the previous failure silent, sadly. Improves situation of #16043.
* testsuite: Mark heapprof001 as broken in prof_hc_hb way on i386Ben Gamari2018-12-221-1/+3
| | | | | | As documented in #15382, this is known to fail in prof_hc_hb on i386. Concerningly, I have also seen this test non-deterministically fail in prof_hc_hb on amd64. We should really investigate this.
* testsuite: Mark objcpp-hi and T13366 as broken on Darwin due to #16083Ben Gamari2018-12-222-1/+5
|
* testsuite: Remove expect_broken on readFail032 and readFail048Ben Gamari2018-12-221-4/+6
| | | | | | | | As noted in #15662, these used to be broken on Darwin due to a Clang toolchain bug. However, this bug appears to be fixed in the Clang shipped with macOS Mojave. Unfortunately, we don't really have any way to only mark it as broken on certain operation system releases so I am just removing the expect_broken entirely.
* Add test for #16038Ömer Sinan Ağacan2018-12-226-0/+44
|
* Fix treatment of hi-boot files and dfunsSimon Peyton Jones2018-12-211-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Trac #16038 exposed the fact that TcRnDriver.checkHiBootIface was creating a binding, in the module being compiled, for $fxBlah = $fBlah but $fxBlah was a /GlobalId/. But all bindings should be for /LocalIds/ else dependency analysis goes down the tubes. * I added a CoreLint check that an occurrence of a GlobalId is not bound by an binding of a LocalId. (There is already a binding-site check that no binding binds a GlobalId.) * I refactored (and actually signficantly simplified) the tricky code for dfuns in checkHiBootIface to ensure that we get LocalIds for those boot-dfuns. Alas, I then got "duplicate instance" messages when compiling HsExpr. It turns out that this is a long-standing, but extremely delicate, bug: even before this patch, if you compile HsExpr with -ddump-tc-trace, you get "duplicate instance". Without -ddump-tc-trace, it's OK. What a mess! The reason for the duplicate-instance is now explained in Note [Loading your own hi-boot file] in LoadIface. I fixed it by a Gross Hack in LoadIface.loadInterface. This is at least no worse than before. But there should be a better way. I have opened #16081 for this.
* Make candidateQTvs contain tyvar with zonked kindsSimon Peyton Jones2018-12-213-0/+27
| | | | | | | | | | | candidateQTyVars was failing to return fully-zonked tyvars, and that made things fall over chaotically when we try to sort them into a well-scoped telescope. Result: Trac #15795 So I made candidateQTvs guarantee to have fully-zonked tyvars (i.e. with zonked kinds). That's a bit annoying but not really difficult.
* Fix #16002 by moving a validity check to the renamerRyan Scott2018-12-205-6/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The validity check which rejected things like: ```lang=haskell type family B x where A x = x ``` Used to live in the typechecker. But it turns out that this validity check was //only// being run on closed type families without CUSKs! This meant that GHC would silently accept something like this: ```lang=haskell type family B (x :: *) :: * where A x = x ``` This patch fixes the issue by moving this validity check to the renamer, where we can be sure that the check will //always// be run. Test Plan: make test TEST=T16002 Reviewers: simonpj, bgamari Reviewed By: simonpj Subscribers: goldfire, rwbarton, carter GHC Trac Issues: #16002 Differential Revision: https://phabricator.haskell.org/D5420
* Refine the suppression of RuntimeRep variablesSimon Peyton Jones2018-12-203-0/+28
| | | | | | | | When we pretty-print types, we suppress RuntimeRep variables, but we were being too aggressive in doing so, resulting in Trac #16074. This patch makes the suppression a bit less aggressive. See Note [Defaulting RuntimeRep variables]
* Add solveLocalEqualities to tcHsPatSigTypeSimon Peyton Jones2018-12-202-0/+8
| | | | | | | This call plain missing, and as a result the casts messed up deep-skolemisation in tcSubType Fixes Trac #16033
* Fix #16030 by refactoring IfaceSyn's treatment of GADT constructorsRyan Scott2018-12-194-0/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: GHCi's `:info` command was pretty-printined GADT constructors suboptimally in the following ways: 1. Sometimes, fields were parenthesized when they did not need it, e.g., ```lang=haskell data Foo a where MkFoo :: (Maybe a) -> Foo a ``` I fixed this by refactoring some code in `pprIfaceConDecl` to be a little smarter with respect to GADT syntax. See `pprFieldArgTy` and `pprArgTy`. 2. With `-fprint-explicit-kinds` enabled, there would be times when specified arguments would be printed without a leading `@` in GADT return types, e.g., ```lang=haskell data Bar @k (a :: k) where MkBar :: Bar k a ``` It turns out that `ppr_tc_app`, the function which pretty-prints these return types, was not using the proper machinery to print out the arguments, which caused the visibilities to be forgotten entirely. I refactored `ppr_tc_app` to do this correctly. Test Plan: make test TEST=T16030 Reviewers: goldfire, bgamari, simonpj Reviewed By: simonpj Subscribers: simonpj, rwbarton, carter GHC Trac Issues: #16030 Differential Revision: https://phabricator.haskell.org/D5440
* Use unicode arrows with -fprint-unicode-syntaxKrzysztof Gogolewski2018-12-191-2/+2
| | | | | | | | | | | | | | | | | | Summary: See #8959, this is one more place where we can pretty-print Unicode syntax. Test Plan: validate Reviewers: nomeata, bgamari Reviewed By: bgamari Subscribers: rwbarton, carter GHC Trac Issues: #8959 Differential Revision: https://phabricator.haskell.org/D5439
* don't suggest Rank2Types in error messages (Fixed #16000)chessai2018-12-196-6/+6
| | | | | | | | | | | | | | Summary: Rank2Types is deprecated. Don't suggest to users to use it. Reviewers: bgamari, RyanGlScott, simonpj Reviewed By: RyanGlScott, simonpj Subscribers: RyanGlScott, rwbarton, carter GHC Trac Issues: #16000 Differential Revision: https://phabricator.haskell.org/D5447
* Fix ghci crash when starting with -fno-implicit-import-qualifiedZejun Wu2018-12-174-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | `ghci -fno-implicit-import-qualified` didn't start with error message: ``` GHCi, version 8.6.2: http://www.haskell.org/ghc/ :? for help <interactive>:1:6: error: Not in scope: ‘System.IO.hSetBuffering’ No module named ‘System.IO’ is imported. ... ``` This change fixes it and update test T2452 to cover this. Test Plan: TEST=T2452 make accept harbormaster build runs Reviewers: simonmar, bgamari, RyanGlScott Reviewed By: simonmar Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5452
* Stomp a few typos and grammarosGabor Greif2018-12-173-9/+7
| | | | Also use 'id'
* testsuite: Fix typo: integer-gimp /= integer-gmpBen Gamari2018-12-131-1/+1
|
* testsuite: Normalise away package name differences from safePkg01Ben Gamari2018-12-121-1/+1
| | | | Spurious changes observed in a integer-simple build. In service of #16043.
* testsuite: Normalise away spurious differences in out-of-scope instancesBen Gamari2018-12-125-6/+15
| | | | | | | | | | | | | | | | | | | | This fixes a variety of testsuite failures with integer-simple of the form ``` --- typecheck/should_fail/tcfail072.run/tcfail072.stderr.normalised +++ typecheck/should_fail/tcfail072.run/tcfail072.comp.stderr.normalised @@ -12,7 +12,7 @@ -- Defined in ‘integer-<IMPL>-<VERSION>:GHC.Integer.Type’ instance Ord () -- Defined in ‘GHC.Classes’ ...plus 21 others - ...plus three instances involving out-of-scope types + ...plus two instances involving out-of-scope types (use -fprint-potential-instances to see them all) In the expression: g A In an equation for ‘g’: g (B _ _) = g A ``` In service of fixing #16043.
* testsuite: Fix a number of GHCi-related failures due to integer-simpleBen Gamari2018-12-125-30/+38
| | | | Towards fixing #16043.
* testsuite: Print which ways we are going to runBen Gamari2018-12-121-1/+4
|
* testsuite: Try accepting new output for memcpy testBen Gamari2018-12-121-2/+2
| | | | See #16037.
* Fix recompilation checking of pure pluginsDaniel Gröber2018-12-123-0/+62
| | | | | | | | | | | | | | | | | | | Previously when switching from using a Plugin with `RecompMaybe`/`ForceRecompile` in `pluginRecompile` to a Plugin with `NoForceRecompile` GHC would never even consider recompiling. However the previously active plugin could have modified the compilation output so we should recompile. Test Plan: validate Reviewers: bgamari, mpickering Subscribers: mpickering, rwbarton, carter GHC Trac Issues: #15858 Differential Revision: https://phabricator.haskell.org/D5299
* Improvements to demand analysisSimon Peyton Jones2018-12-1213-24/+57
| | | | | | | | | | | | | | | | | | | | | | | | This patch collects a few improvements triggered by Trac #15696, and fixing Trac #16029 * Stop making toCleanDmd behave specially for unlifted types. This special case was the cause of stupid behaviour in Trac #16029. And to my joy I discovered the let/app invariant rendered it unnecessary. (Maybe the special case pre-dated the let/app invariant.) Result: less special-case handling in the compiler, and better perf for the compiled code. * In WwLib.mkWWstr_one, treat seqDmd like U(AAA). It was not being so treated before, which again led to stupid code. * Update and improve Notes There are .stderr test wibbles because we get slightly different strictness signatures for an argumment of unlifted type: <L,U> rather than <S,U> for Int# <S,U> rather than <S(S),U(U)> for Int
* testsuite: Mark linkwhole as broken on FreeBSDBen Gamari2018-12-111-0/+1
| | | | See #16035.
* testsuite: Mark keep-cafs and keep-cafs-fail as broken on FreeBSDBen Gamari2018-12-111-1/+3
| | | | See #16035.
* testsuite: Skip T703 on non-Linux platformsBen Gamari2018-12-111-1/+3
| | | | | | | | While the test is in principle applicable to many platforms, the current implementation requires readelf, which we can only assume is present on ELF-based platforms (e.g. Linux). See Trac #703.
* testsuite: Don't use sed -i in T15369Ben Gamari2018-12-111-1/+3
| | | | | BSD sed doesn't allow use of sed -i on symlinks and the source file is symlinked into place.
* testsuite: Ensure that unregisterised function is calledBen Gamari2018-12-116-10/+10
| | | | | Strangely the previous formulation works locally and under CircleCI but fails on another machine. Odd.
* Enable rebindable fail with overloaded stringsShayne Fletcher2018-12-113-0/+22
| | | | | | | | | | | | | | Summary: enable rebindable fail with overloaded strings Reviewers: bgamari, simonpj Reviewed By: bgamari, simonpj Subscribers: simonpj, ndmitchell, rwbarton, carter GHC Trac Issues: #15645 Differential Revision: https://phabricator.haskell.org/D5251
* testsuite: Add tests for #15270Ben Gamari2018-12-115-0/+28
| | | | | | | | | | Reviewers: alpmestan Reviewed By: alpmestan Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5216
* Support generating HIE filesAlec Theriault2018-12-1132-1/+4308
| | | | | | | | | | | | | | | | | | | | Adds a `-fenable-ide-info` flag which instructs GHC to generate `.hie` files (see the wiki page: https://ghc.haskell.org/trac/ghc/wiki/HIEFiles). This is a rebased version of Zubin Duggal's (@wz1000) GHC changes for his GSOC project, as posted here: https://gist.github.com/wz1000/5ed4ddd0d3e96d6bc75e095cef95363d. Test Plan: ./validate Reviewers: bgamari, gershomb, nomeata, alanz, sjakobi Reviewed By: alanz, sjakobi Subscribers: alanz, hvr, sjakobi, rwbarton, wz1000, carter Differential Revision: https://phabricator.haskell.org/D5239
* Support registering Plugins through the GHC APIDaniel Gröber2018-12-114-0/+113
| | | | | | | | | | | | | | | | | This allows tooling using the GHC API to use plugins internally. Hopefully this will make it possible to decouple the development of useful plugins from (currently) kitchen-sink type tooling projects such as ghc-mod or HIE -- at least to some extent. Test Plan: validate Reviewers: bgamari, mpickering Subscribers: mpickering, alanz, rwbarton, carter GHC Trac Issues: #15826 Differential Revision: https://phabricator.haskell.org/D5278
* Misleading msg with qualified imports "No module named X imported"Roland Senn2018-12-113-0/+6
| | | | | | | | | | | | | | | | | | | | To check whether a given module has been imported, we do the following: From the list of all qualified names we extract the distinct module names to a list of module names. Then we check whether the given module name is in this list of module names. Test Plan: make test TEST=T14225 Reviewers: mpickering, hvr, monoidal, osa1, bgamari Reviewed By: bgamari Subscribers: rwbarton, carter GHC Trac Issues: #14225 Differential Revision: https://phabricator.haskell.org/D5331
* Do not save performance test results if worktree is dirty.David Eichmann2018-12-112-2/+11
| | | | | | | | | | | | Reviewers: bgamari, tdammers Reviewed By: bgamari, tdammers Subscribers: rwbarton, carter GHC Trac Issues: #15924 Differential Revision: https://phabricator.haskell.org/D5368
* Fix recompilation bug with default class methods (#15970)Simon Marlow2018-12-116-0/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a module uses a class, then it can instantiate the class and thereby use its default methods, so we must include the default methods when calculating the fingerprint for the class. Test Plan: New unit test: driver/T15970 Before: ``` =====> T15970(normal) 1 of 1 [0, 0, 0] cd "T15970.run" && $MAKE -s --no-print-directory T15970 Wrong exit code for T15970()(expected 0 , actual 2 ) Stdout ( T15970 ): Makefile:13: recipe for target 'T15970' failed Stderr ( T15970 ): C.o:function Main_zdfTypeClassMyDataType1_info: error: undefined reference to 'A_toTypedData2_closure' C.o:function Main_main1_info: error: undefined reference to 'A_toTypedData2_closure' C.o(.data+0x298): error: undefined reference to 'A_toTypedData2_closure' C.o(.data+0x480): error: undefined reference to 'A_toTypedData2_closure' collect2: error: ld returned 1 exit status `gcc' failed in phase `Linker'. (Exit code: 1) ``` After: test passes. Reviewers: bgamari, simonpj, erikd, watashi, afarmer Subscribers: rwbarton, carter GHC Trac Issues: #15970 Differential Revision: https://phabricator.haskell.org/D5394
* Fix uninformative hp2ps error when the cmdline contains double quotesZejun Wu2018-12-114-0/+24
| | | | | | | | | | | | | | | | | | | | | | | Reapply D5346 with fix incompatible shell quoting in tests. It seems like `$'string'` is not recognized under all test environments, so let's avoid it in tests. Test Plan: ``` hp2ps: "T15904".hp, line 2: integer must follow identifier ``` use new ghc and hp2ps to profile a simple program. Reviewers: simonmar, bgamari, erikd, tdammers Reviewed By: bgamari Subscribers: tdammers, carter, rwbarton GHC Trac Issues: #15904 Differential Revision: https://phabricator.haskell.org/D5388
* testsuite: Mark tickets identified in #15467 as brokenBen Gamari2018-12-115-5/+13
|
* testsuite: Use explicit -e in sed commandBen Gamari2018-12-111-1/+1
| | | | Otherwise Darwin's sed interprets the command as the suffix for -i.