summaryrefslogtreecommitdiff
path: root/testsuite
Commit message (Collapse)AuthorAgeFilesLines
* Error msg wibbles from reduced module prefixesSimon Peyton Jones2015-04-0739-785/+710
|
* testdriver: delete unused waysThomas Miedema2015-04-072-11/+8
| | | | | | | | | And mention more prominently that `-DDEBUG` and tests that call `compiler_stats_num_fields` don't play well together Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D799
* Typechecker: refactoring onlyThomas Miedema2015-04-071-1/+1
| | | | | | | | | * don't call `nlHsPar`, as `genOpApp` already does so. * don't reimplement `isUnboxedTupleTyCon` and `isBoxedTupleTyCon`. Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D798
* Stop profiling output from running together (#8811)Dave Laing2015-04-0611-235/+244
| | | | | | Reviewed By: thomie Differential Revision: https://phabricator.haskell.org/D779
* Test case for #10246Joachim Breitner2015-04-065-0/+54
| | | | | still marked known_broken. This also adds the test case for #10245, which should pass once #10246 is fixed.
* testsuite: skip T10017 on WindowsAustin Seipp2015-04-031-1/+2
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* testsuite: fix failing amd64/Windows perf testsAustin Seipp2015-04-032-7/+15
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* Comments only, mostly typosThomas Miedema2015-04-031-1/+1
| | | | [skip ci]
* Don't `make accept` output of `expect_broken_for` testsThomas Miedema2015-04-031-16/+17
| | | | | | | | | This is a followup to d4cf7051bc17182238b17ba1dc42e190fa5c6f0d, which did the same for `expect_broken` tests. Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D786
* Data.Complex: Derive GenericBen Gamari2015-04-033-4/+7
| | | | | | Reviewed By: hvr, austin Differential Revision: https://phabricator.haskell.org/D770
* parser: allow type-level cons in prefix positionKinokkory2015-04-032-0/+14
| | | | | | | | Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D768 GHC Trac Issues: #10188
* Fix validate linenumber off-by-oneThomas Miedema2015-04-031-1/+1
|
* Change 'Tab character' warnings so there is one per file (#9723)Dave Laing2015-04-028-5/+50
| | | | | | | | Reviewed By: nomeata, thomie Differential Revision: https://phabricator.haskell.org/D760 Signed-off-by: Dave Laing <dave.laing.80@gmail.com>
* Fake (->) fixity declaration (#10145)Oleg Grenrus2015-04-025-0/+10
| | | | | | Reviewed By: simonpj, austin Differential Revision: https://phabricator.haskell.org/D741
* Change which files --make thinks are 'Haskellish' (#10220)Thomas Miedema2015-04-013-0/+7
| | | | | | | | | | | | | | | | `.hspp` and `.hscpp` are haskell files that have already been preprocessed. Treat `.hspp` and `.hscpp` as Haskellish sources again, as they were before commit a10e1990. This way, ghc --make will load their imports. Make sure that `.cmm` and `.cmmcpp` are still not treated as Haskellish, by moving them out of `haskell_src_suffixes` (but still keeping them in haskellish_suffixes, though I'm not sure what the purpose of that group is). Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D778
* Don't `make accept` output of expect_broken testsThomas Miedema2015-04-011-1/+4
| | | | | | | | | | | | | | | | | | | | | | When running `make accept` on a directory in the testsuite, don't accept the output of tests that are marked as expect_broken. This makes it easier to review `git diff` after running `make accept`. When you change an error message in the compiler that shows up in the output of many tests, you can run `make accept` in the testsuite directory, and all expected test output will be updated. But since your change didn't magically fix all the other bugs in the compiler for which we have an expect_broken test, the output for those tests should probably not be updated. Before, the effect of running `make accept` could be that some tests would end up in the 'unexpected passes' group. [skip ci] Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D781
* Testsuite: redirect stderr to /dev/null when running GS on bad.psThomas Miedema2015-03-311-1/+2
| | | | | | | | This is a followup to a3d0a7a0ba3a1ee458a9883011247561dfe22f4a. Reviewed by: Rufflewind Differential Revision: https://phabricator.haskell.org/D780
* Don't throw exception when start_phase==stop_phase (#10219)Thomas Miedema2015-03-312-0/+6
| | | | | | | | | Just do nothing instead. This bug only shows up when using `-x hspp` in --make mode on registerised builds. Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D776
* Explicitly check for -C on registerised build (#7563)Thomas Miedema2015-03-311-1/+1
| | | | | | | | Show a more descriptive error message. Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D775
* Testsuite: suppress errors when running GS on bad.psPhil Ruffwind2015-03-311-1/+1
| | | | | | | | | Suppress the errors that appear in standard output when running gs on bad.ps since it's expected to fail anyway. Reviewed By: thomie, austin Differential Revision: https://phabricator.haskell.org/D773
* Syntax check package-qualified imports (#9225)Thomas Miedema2015-03-313-0/+9
| | | | | | | | | Version numbers are not allowed in the package name of a package-qualified import. Reviewed By: austin, ezyang Differential Revision: https://phabricator.haskell.org/D755
* Remove an unused include that doesn't exist on OS X (#10211)Dave Laing2015-03-301-1/+0
| | | | Differential Revision: https://phabricator.haskell.org/D765
* Refactor the story around switches (#10137)Joachim Breitner2015-03-304-1/+626
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This re-implements the code generation for case expressions at the Stg → Cmm level, both for data type cases as well as for integral literal cases. (Cases on float are still treated as before). The goal is to allow for fancier strategies in implementing them, for a cleaner separation of the strategy from the gritty details of Cmm, and to run this later than the Common Block Optimization, allowing for one way to attack #10124. The new module CmmSwitch contains a number of notes explaining this changes. For example, it creates larger consecutive jump tables than the previous code, if possible. nofib shows little significant overall improvement of runtime. The rather large wobbling comes from changes in the code block order (see #8082, not much we can do about it). But the decrease in code size alone makes this worthwhile. ``` Program Size Allocs Runtime Elapsed TotalMem Min -1.8% 0.0% -6.1% -6.1% -2.9% Max -0.7% +0.0% +5.6% +5.7% +7.8% Geometric Mean -1.4% -0.0% -0.3% -0.3% +0.0% ``` Compilation time increases slightly: ``` -1 s.d. ----- -2.0% +1 s.d. ----- +2.5% Average ----- +0.3% ``` The test case T783 regresses a lot, but it is the only one exhibiting any regression. The cause is the changed order of branches in an if-then-else tree, which makes the hoople data flow analysis traverse the blocks in a suboptimal order. Reverting that gets rid of this regression, but has a consistent, if only very small (+0.2%), negative effect on runtime. So I conclude that this test is an extreme outlier and no reason to change the code. Differential Revision: https://phabricator.haskell.org/D720
* Renames some files to help with validation cleanup (#10212)Dave Laing2015-03-303-1/+1
| | | | | | | | Test Plan: validate twice Reviewed by: thomie Differential Revision: https://phabricator.haskell.org/D771
* Add Monad instance for `((,) a)` (#10190)Fumiaki Kinoshita2015-03-253-1/+3
| | | | | | | | | | | This was proposed a couple of times in the past, e.g. - https://mail.haskell.org/pipermail/libraries/2011-November/017153.html - https://mail.haskell.org/pipermail/libraries/2013-July/020446.html but its implementation had been blocked by the fact that `Monoid` wasn't in scope where the `Monad` class was defined. Since the AMP/FTP restructuring this is no longer the case.
* Improve environment handling in TcBindsSimon Peyton Jones2015-03-243-3/+3
| | | | | | | | | This is a minor refactoring, but it simplifies the code quite a bit * Decrease the number of variants of tcExtend in TcEnv * Remove "not_actually_free" from TcEnv.tc_extend_local_env2 * Simplify plumbingof the "closed" flag * Remove redundant scoping of wild-card variables
* Some stress tests for the empty case linterJoachim Breitner2015-03-242-0/+28
| | | | | | | | | | | This is a variation of T2431 where the emptyness of the type is hidden behind a newtype, a type family and a closed type family. In all cases, it would be sound for the compiler to determine that the equality type is empty and the case alternatives may be dropped. At the moment, GHC does _not_ determine that. But if it ever does, this test ensures that we do not forget to make the lint from #10180 smarter as well.
* New lint check: Check idArity invariants (#10181)Joachim Breitner2015-03-231-2/+2
| | | | | | | | | The arity of an id should not be larger than what the type allows, and it should also not contradict the strictness signature. This adds a lint check for that. This broke test T8743, uncovering a bug in the SOURCE import machinery, which is now filed as #10182.
* Do proper depth checking in the flattener to avoid looping.Richard Eisenberg2015-03-2343-260/+386
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This implements (roughly) the plan put forward in comment:14:ticket:7788, fixing #7788, #8550, #9554, #10139, and addressing concerns raised in #10079. There are some regressions w.r.t. GHC 7.8, but only with pathological type families (like F a = F a). This also (hopefully -- don't have a test case) fixes #10158. Unsolved problems include #10184 and #10185, which are both known deficiencies of the approach used here. As part of this change, the plumbing around detecting infinite loops has changed. Instead of -fcontext-stack and -ftype-function-depth, we now have one combined -freduction-depth parameter. Setting it to 0 disbales the check, which is now the recommended way to get (terminating) code to typecheck in releases. (The number of reduction steps may well change between minor GHC releases!) This commit also introduces a new IntWithInf type in BasicTypes that represents an integer+infinity. This type is used in a few places throughout the code. Tests in indexed-types/should_fail/T7788 indexed-types/should_fail/T8550 indexed-types/should_fail/T9554 indexed-types/should_compile/T10079 indexed-types/should_compile/T10139 typecheck/should_compile/T10184 (expected broken) typecheck/should_compile/T10185 (expected broken) This commit also changes performance testsuite numbers, for the better.
* Make testsuite driver Python 2.6 compatible againThomas Miedema2015-03-231-8/+8
| | | | | | | | | | | | | Another bug in the #10164 series. Only Python 2.7 and up allow you to omit the positional argument specifiers in format strings. Test Plan: this fixes the Solaris builders Reviewed By: kgardas Differential Revision: https://phabricator.haskell.org/D750 GHC Trac Issues: #10164
* Minor bump `base` version to 4.8.1.0Herbert Valerio Riedel2015-03-2367-75/+75
| | | | | We've accumulated enough to justify a minor version bump to 4.8.1.0, but not enough to justify a major version bump yet as far as I can see.
* Fix quasiquotation test (#4150)Thomas Miedema2015-03-231-1/+1
|
* rts: check arguments to flags that don't have anyCarlos Tomé2015-03-233-0/+21
| | | | | | | | | | | | | | | | There were some flags of the RTS that when given an argument (which they don't have) were not firing an error. e.g -Targument when the flag -T has no argument. Now this is an error and affects the following flags: -B -w -T -Z -P -Pa -c -t Signed-off-by: Carlos Tomé <carlostome1990@gmail.com> Reviewed By: austin, thomie, hvr Differential Revision: https://phabricator.haskell.org/D748 GHC Trac Issues: #9839
* Trim Call ArityJoachim Breitner2015-03-221-1/+1
| | | | | | | to not accidentially invalidate a strictness signature with a Diverges result info. This seems to fix #10176. Differential Revision: https://phabricator.haskell.org/D747
* Test case for #10176Joachim Breitner2015-03-222-0/+35
| | | | | originally provided by Neil Mitchell. Despite what he observed, I can observe the bug even with all in one module.
* testsuite: add test for #10177Austin Seipp2015-03-212-0/+11
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* Bump ghc-prim to 0.4.0.0Herbert Valerio Riedel2015-03-2050-118/+118
| | | | | | | | | | | | This major version bump was made necessary by f44333eae7bc7dc7b6003b75874a02445f6b633b which changed the type signatures of prefetch primops, as well as other changes such as 051d694fc978ad28ac3043d296cafddd3c2a7050 turning `Any` into an abstract closed type family. Reviewed By: ekmett Differential Revision: https://phabricator.haskell.org/D743
* Modify test th/T10019 to wobble lessSimon Peyton Jones2015-03-202-2/+9
| | | | | | | The TH output contains uniques which change too much. So I took the length of the string instead. Crude, perhaps too crude, but it'll still show up most significant output changes
* Update deepseq submodule to 1.4.1.1 tagHerbert Valerio Riedel2015-03-202-4/+4
| | | | This deepseq update drops the redundant ghc-prim dependency for GHC>=7.6
* testsuite: add a regression test for #10011Austin Seipp2015-03-194-0/+17
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* hpc: use System.FilePath.(</>) instead of (++)Thomas Miedema2015-03-173-1/+8
| | | | | | | | | | | | | | | | Summary: BAD: "." ++ "/" ++ "/absolute/path" == ".//absolute/path" GOOD: "." </> "/absolute/path" == "/absolute path" Also replace `++ ".ext"` with `<.> "ext"`. Although it doesn't fix any bugs in this instance, it might in some other. As a general rule it's better not to use (++) on FilePaths. Reviewed By: austin, hvr Differential Revision: https://phabricator.haskell.org/D703 GHC Trac Issues: #10138
* Fix Windows testsuite driverThomas Miedema2015-03-171-4/+4
| | | | This got broken in commit 5258566.
* Dont call unsafeGlobalDynFlags if it is not setThomas Miedema2015-03-162-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Parsing of static and mode flags happens before any session is started, i.e., before the first call to 'GHC.withGhc'. Therefore, to report errors for invalid usage of these two types of flags, we can not call any function that needs DynFlags, as there are no DynFlags available yet (unsafeGlobalDynFlags is not set either). So we always print "on the commandline" as the location, which is true except for Api users, which is probably ok. When reporting errors for invalid usage of dynamic flags we /can/ make use of DynFlags, and we do so explicitly in DynFlags.parseDynamicFlagsFull. Before, we called unsafeGlobalDynFlags when an invalid (combination of) flag(s) was given on the commandline, resulting in panics (#9963). This regression was introduced in 1d6124de. Also rename showSDocSimple to showSDocUnsafe, to hopefully prevent this from happening again. Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D730 GHC Trac Issues: #9963
* Fix testsuite driver for a profiling compilerThomas Miedema2015-03-161-0/+3
| | | | | | | | | This should have been part of commit 5258566ee5c8, to allow expansion of '{hp2ps}' in a command string to `config.hp2ps`. Reviewed by: austin Differential Revision: https://phabricator.haskell.org/D734
* Test Trac #10156Simon Peyton Jones2015-03-162-0/+16
|
* Move the function strip_quotes to testutil.pyThomas Miedema2015-03-132-4/+3
| | | | | | | | | | | | | | | | If one runs the testsuite with a profiling compiler, during the import of `testlib.py`, `testlib.py` sets the global variable `gs_working`. To do so, it executes a few statements which require the function `strip_quotes` to be in scope. But that function only gets defined at the very end of testlib.py. This patch moves the definition of `strip_quotes` to testutil.py, which is imported at the very top of testlib.py. This unbreaks the nightly builders. Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D728
* testsuite: use same flags for ghci way and scriptsThomas Miedema2015-03-111-1/+1
| | | | | | | | | The ghci script tests were using different RTS flags from the normal ghci tests. This commit makes them use the same flags. Reviewers: austin Differential Revision: https://phabricator.haskell.org/D724
* Cleanup test framework string formattingThomas Miedema2015-03-113-56/+56
| | | | | | | | | | | | * Use format strings instead of string concatenation. * Wrap `config.compiler`, `config.hpc` etc. in quotes in `mk/test.mk`, so we don't have to in .T scripts and driver/testlib.py. Update hpc submodule (test cleanup) Reviewers: austin Differential Revision: https://phabricator.haskell.org/D718
* Refactor testsuite with normalise_version()Edward Z. Yang2015-03-106-42/+32
| | | | | | | | | | | | | | | | | | | | Summary: This function generalizes the normaliseBytestringPackage and other similar one-off functions into normalise_version() with takes a package name to normalize against. This JUST manages package versions; we also could use a normalize for keys. In the process, I modified all the normalization functions to be accumulative; I don't think this makes a difference for current test cases but I think it makes things nicer. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Reviewers: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D725
* Update array submodule (min ver bump to 0.5.1.0)Herbert Valerio Riedel2015-03-101-1/+1
|