summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Make validate more quietThomas Miedema2015-06-047-42/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * By default use V=0, and call the testsuite with VERBOSE=2, which we did before only with validate --quiet. This disables printing the test commands it runs. * When --quiet is used, call the testsuite with VERBOSE=1. This disables printing the '====> Scanning' lines, and doesn't print which test is being run. So it only prints something when a test accidentally prints to stdout or when it fails. Don't set this option on Travis, as Travis will cancel a build if it doesn't see any output for more than 10 minutes. * When --quiet is used, set the new test option NO_PRINT_SUMMARY, which skips printing the test summary. Only the list of unexpected failures is printed, if there are any. Note that the full summary can still be found in testsuite_summary.txt * When --quiet is used, don't pass the `-v` flag to `ghc-pkg check` * When --quiet is used, don't print the Oops! header. It shoud be clear from the list of failing tests that something is wrong. This is all done to get the most out of 30 lines of logfile. These changes can be disabled later by simply not passing the --quiet flag to validate. Differential Revision: https://phabricator.haskell.org/D942
* Build: remove more unnecessary CLEANING/=YES checksThomas Miedema2015-06-042-6/+0
| | | | | | | | | | | | | All these checks that CLEANING/=YES are no longer needed, because nowadays $1_$2_PROGNAME is always set explicitly, and $1_$2_PROG isn't. They were once introduce to allow `make clean` before `./configure`. I checked, and it still works. Remove the checks to make the build system a tiny bit shorter, and to no longer wonder why they are there. Differential Revision: https://phabricator.haskell.org/D941
* Build: remove unnecessary CLEANING/=YES checkThomas Miedema2015-06-042-7/+0
| | | | | | | | | | | | | | | | | | | The comment "INPLACE_BIN might be empty if we're distcleaning" is no longer true, and the check that CLEANING isn't YES isn't necessary. It was introduced in cd12c32de77ac18a69ed1733a558095567ec5ba8, to "make repeated 'make distclean' not fail", and and later revised in 39253008705e3ca590afdfa1b87bfbb5a16da7e7. It was needed because INPLACE_BIN was defined in config.mk. Commit 6793a033e1ce41f77316675e8f7aa83196a9b211 however, two days later, introduced a better solution to this problem: "Move the fixed paths out of config.mk, so cleaning works without configuring" So here we remove the original comment and check. One less thing to worry about when trying to understand the build system. Differential Revision: https://phabricator.haskell.org/D940
* Build: ./boot && ./configure && make sdist (#8723)Thomas Miedema2015-06-044-26/+102
| | | | | | | | | | | | | | | | | Make it possible to run `make sdist` right after configure, without completing a complete build first. Test Plan: I compared the contents of the created `.tar.bz2` files in the `sdistprep` directory, after running `make sdist` both before and after completing a full build, using `diff -r`. There weren't any differences (after applying the patches from D914). Note that the `.tar.bz2` files were not exactly the same size, but they aren't either when tarring and bzipping the same directory twice. It seems tarring and bzipping is not deterministic (on my system). Differential Revision: https://phabricator.haskell.org/D917
* ghc-cabal: don't warn about missing cabal fieldsThomas Miedema2015-06-041-5/+3
| | | | | | | | | | | | | | Only print and exit on errors. Warnings of the type 'PackageDistSuspicious' are not very useful. The following show up in the build logs currently: * The 'license' field is missing. * No 'maintainer' field * No 'category' field * 'ghc-options: -O2' is rarely needed. Check that it is giving a real benefit and not just imposing longer compile times on your users. Differential Revision: https://phabricator.haskell.org/D944
* Build: make configure and ghc-pkg a bit less chattyThomas Miedema2015-06-041-0/+11
| | | | | | Only when V=0. Differential Revision: https://phabricator.haskell.org/D943
* Re-center perf numbers for haddock.compilerThomas Miedema2015-06-041-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Phabricator/Harbormaster measured the following allocation numbers for haddock.compiler: Expected: 33562468736 June 2nd [1]: 36740649320 Upper bound: 36918715610 June 3rd [2]: 36956620504 So although this test didn't start failing until June 2nd/3rd, the biggest increase in allocation must have occured sometime before that. [1] 2f0011aca137055f139bed484302679c10238d55 [2] 942cfa4e3257347dfc4644ce1a8a28db1fb0aee0 Test Plan: validate Reviewers: austin Subscribers: bgamari, thomie Differential Revision: https://phabricator.haskell.org/D948
* ghc-pkg support query by package-key, fixes #9507Edward Z. Yang2015-06-041-12/+30
| | | | | | | | | | | | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: austin Subscribers: bgamari, thomie Differential Revision: https://phabricator.haskell.org/D946 GHC Trac Issues: #9507
* Travis: Send notifications to author and commiterJoachim Breitner2015-06-041-5/+0
| | | | | | | This is the Travis default. It should only spam people who have an GitHub account and are a member of the ghc organization on GitHub, as noted by thomie on https://phabricator.haskell.org/D939#25497. Let's see how that works out.
* typo: 'Ture' / 'True'Sergei Trofimovich2015-06-031-1/+1
| | | | Signed-off-by: Sergei Trofimovich <siarheit@google.com>
* Move liftData and use it as a default definition for Lift.Edward Z. Yang2015-06-033-76/+113
| | | | | | | | | | | | | | | | | | | | | Summary: This should make it a lot easier to define Lift instances. See https://mail.haskell.org/pipermail/libraries/2015-May/025728.html for motivating discussion. I needed to muck out some code from Quote into Syntax to get the definition in the right place; but I would argue that code never really belonged in Quote to begin with. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: austin, ekmett, goldfire Subscribers: bgamari, thomie Differential Revision: https://phabricator.haskell.org/D923
* Allow Any return in foreign prim, fixes #10460.Edward Z. Yang2015-06-034-3/+12
| | | | | | | | | | | | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonpj, goldfire, austin Subscribers: bgamari, thomie Differential Revision: https://phabricator.haskell.org/D935 GHC Trac Issues: #10460
* Refactor RdrName.Provenance, to fix #7672Simon Peyton Jones2015-06-0314-265/+285
| | | | | | | | | | | Trac #7672 has a data type T in module A that is in scope *both* locally-bound *and* imported (with a qualified) name. The Provenance of a GlobalRdrElt simply couldn't express that before. Now you can. In doing so, I flattened out Provenance into GlobalRdrElt, so quite a lot of modules are touched in a not-very-interesting way.
* Remove outdated uBackpack docs.Edward Z. Yang2015-06-022-381/+0
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Suggest -H to improve GC productivity, fixes #10474.Edward Z. Yang2015-06-021-2/+6
| | | | | | | | | | | | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: none Reviewers: rwbarton, austin Subscribers: bgamari, thomie Differential Revision: https://phabricator.haskell.org/D937 GHC Trac Issues: #10474
* TypofixesGabor Greif2015-06-035-11/+11
|
* newTempName: Do not include pid in basenameJoachim Breitner2015-06-021-5/+14
| | | | | | | | | | | | | | | | | | | | | The filename of temporary files, especially the basename of C files, can end up in the output in some form, e.g. as part of linker debug information. In the interest of bit-wise exactly reproducible compilation (#4012), the basename of the temporary file no longer contains random information (it used to ontain the process id). This is ok, as the temporary directory used contains the pid (see getTempDir). This patch has been applied to the Debian package (version 7.10.1-5) and allowed a fully bit-wise reproducible build: https://reproducible.debian.net/rb-pkg/experimental/amd64/ghc.html Reviewed By: austin, rwbarton Differential Revision: https://phabricator.haskell.org/D910 GHC Trac Issues: #4012
* testsuite: mark test T9938 (#9938) as passing againAustin Seipp2015-06-021-1/+1
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* Detabify a programlisting in the User's Guide (#10425)Reid Barton2015-06-021-1/+1
|
* Improve FFI error reportingSimon Peyton Jones2015-06-024-50/+77
| | | | | I refactored TcType FFI functions to return Validity rather than Bool, which turned out to be an easy way to solve Trac #10461.
* build: make haddock a bit less chattyAustin Seipp2015-06-022-1/+2
| | | | | | | | | | | | | | | | | | | Summary: Haddock outputs well over a thousand lines of file output just to give its executive summary about coverage. Kill this by default, since we really don't need it in any setting. Signed-off-by: Austin Seipp <austin@well-typed.com> Test Plan: Crossed my fingers. Reviewers: nomeata, thomie Reviewed By: thomie Subscribers: bgamari, thomie Differential Revision: https://phabricator.haskell.org/D933
* compiler: make sure we reject -O + HscInterpretedAustin Seipp2015-06-0212-13/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using GHCi, we explicitly reject optimization, because the compilers optimization passes can introduce unboxed tuples, which the interpreter is not able to handle. But this goes the other way too: using GHCi on optimized code may cause the optimizer to float out breakpoints that the interpreter introduces. This manifests itself in weird ways, particularly if you as an API client use custom DynFlags to introduce optimization in combination with HscInterpreted. It turns out we weren't checking for consistent DynFlag settings when doing `setSessionDynFlags`, as #10052 showed. While the main driver handled it in `DynFlags` via `parseDynamicFlags`, we didn't check this elsewhere. This does a little refactoring to split out some of the common code, and immunizes the various `DynFlags` utilities in the `GHC` module from this particular bug. We should probably be checking other general invariants too. This fixes #10052, and adds some notes about the behavior in `GHC` and `FloatOut` As a bonus, expose `warningMsg` from `ErrUtils` as a helper since it didn't exist (somehow). Signed-off-by: Austin Seipp <austin@well-typed.com> Reviewed By: edsko Differential Revision: https://phabricator.haskell.org/D727 GHC Trac Issues: #10052
* Test Trac #10438Simon Peyton Jones2015-06-023-0/+35
|
* Test Trac #10466Simon Peyton Jones2015-06-022-0/+4
|
* Test Trac #10451Simon Peyton Jones2015-06-023-1/+18
|
* Test Trac #10423Simon Peyton Jones2015-06-022-0/+10
|
* Remove redundant importSimon Peyton Jones2015-06-021-1/+0
|
* Set 32-bit perf figureSimon Peyton Jones2015-06-021-1/+1
|
* Improve constraint tuples (Trac #10451)Simon Peyton Jones2015-06-022-6/+17
| | | | | | * Increase max constraint tuple size to 16 * Produce a civilised error message if the max size is exceeded
* Re-do superclass solving (again); fixes #10423Simon Peyton Jones2015-06-027-231/+233
| | | | | | | | | | | | | | | TcInstDcls.tcSuperClasses was getting increasingly baroque as a succession of tickets (#10423 being the latest) pointed out that my cunning plan was not so cunning. The big issue is how to restrict the evidence that we generate for superclass constraints in an instance declaration to avoid superclass loops. See Note [Recursive superclasses] in TcInstDcls which explains the plan. The question is how to implement the plan. The new implementation is much neater, and is described in Note [Solving superclass constraints] in TcInstDcls.
* Mark sigof02 tests as expect_brokenSimon Peyton Jones2015-06-021-4/+4
| | | | | Consequence of the GlobalRdrEnv refactoring; see Trac #10472
* Refactor the GlobalRdrEnv, fixing #7672Simon Peyton Jones2015-06-0224-569/+581
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch started innocently enough, by deleting a single call from rnImportDecl, namely let gbl_env = mkGlobalRdrEnv (filterOut from_this_mod gres) The 'filterOut' makes no sense, and was the cause of #7672. But that little loose end led to into a twisty maze of little passages, all alike, which has taken me an unreasonably long time to straighten out. Happily, I think the result is really much better. In particular: * INVARIANT 1 of the GlobalRdrEnv type was simply not true: we had multiple GlobalRdrElts in a list with the same gre_name field. This kludgily implmented one form of shadowing. * Meanwhile, extendGlobalRdrEnvRn implemented a second form of shadowing, by deleting stuff from the GlobalRdrEnv. * In turn, much of this shadowing stuff depended on the Names of the Ids bound in the GHCi InteractiveContext being Internal names, even though the TyCons and suchlike all had External Names. Very confusing. So I have made the following changes * I re-established INVARIANT 1 of GlobalRdrEnv. As a result some strange code in RdrName.pickGREs goes away. * RnNames.extendGlobalRdrEnvRn now makes one call to deal with shadowing, where necessary, and another to extend the environment. It deals separately with duplicate bindings. The very complicated RdrName.extendGlobalRdrEnv becomes much simpler; we need to export the shadowing function, now called RdrName.shadowNames; and we can nuke RdrName.findLocalDupsRdrEnv altogether. RdrName Note [GlobalRdrEnv shadowing] summarises the shadowing story * The Names of the Ids bound in the GHCi interactive context are now all External. See Note [Interactively-bound Ids in GHCi] in HscTypes. * Names for Ids created by the debugger are now made by IfaceEnv.newInteractiveBinder. This fixes a lurking bug which was that the debugger was using mkNewUniqueSupply 'I' to make uniques, which does NOT guarantee a fresh supply of uniques on successive calls. * Note [Template Haskell ambiguity] in RnEnv shows that one TH-related error is reported lazily (on occurrences) when it might be better reported when extending the environment. In some (but not all) cases this was done before; but now it's uniformly at occurrences. In some ways it'd be better to report when extending the environment, but it's a tiresome test and the error is rare, so I'm leaving it at the lookup site for now, with the above Note. * A small thing: RnNames.greAvail becomes RdrName.availFromGRE, where it joins the dual RdrName.gresFromAvail.
* Treat pattern-synonym binders more consistentlySimon Peyton Jones2015-06-026-54/+45
| | | | | | | | | | | Pattern-synonyms are in value declarations, but were being bound by getLocalNonValBinders. This seemed odd, and indeed staightening it out allowed me to remove a field from TopSigCtxt. The main changes are in RnSource.rnSrcDecls. Nice.
* White space onlySimon Peyton Jones2015-06-022-6/+5
|
* Re-center perf numbers for T5631Herbert Valerio Riedel2015-06-011-1/+2
| | | | | | | | | | | | | | | | | | | | | 7dd0ea7428379df848e3d13528921b39b7bf5b95 seems to have tipped this one over, although 7dd0ea74283 itself had only a minimal impact on my local system. Locally, I measured right before 7dd0ea74283: Expected T5631(normal) bytes allocated: 776121120 +/-5% Actual T5631(normal) bytes allocated: 811973144 Deviation T5631(normal) bytes allocated: 4.6 % and at 7dd0ea74283: Expected T5631(normal) bytes allocated: 776121120 +/-5% Actual T5631(normal) bytes allocated: 812288344 Deviation T5631(normal) bytes allocated: 4.7 % Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D936
* Don't call DEAD_WEAK finalizer again on shutdown (#7170)Simon Marlow2015-06-013-4/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: There's a race condition like this: # A foreign pointer gets promoted to the last generation # It has its finalizer called manually # We start shutting down the runtime in `hs_exit_` from the main thread # A minor GC starts running (`scheduleDoGC`) on one of the threads # The minor GC notices that we're in `SCHED_INTERRUPTING` state and advances to `SCHED_SHUTTING_DOWN` # The main thread tries to do major GC (with `scheduleDoGC`), but it exits early because we're in `SCHED_SHUTTING_DOWN` state # We end up with a `DEAD_WEAK` left on the list of weak pointers of the last generation, because it relied on major GC removing it from that list This change: * Ignores DEAD_WEAK finalizers when shutting down * Makes the major GC on shutdown more likely * Fixes a bogus assert Test Plan: before this diff https://ghc.haskell.org/trac/ghc/ticket/7170#comment:5 reproduced and after it doesn't Reviewers: ezyang, austin, simonmar Reviewed By: simonmar Subscribers: bgamari, thomie Differential Revision: https://phabricator.haskell.org/D921 GHC Trac Issues: #7170
* Newline after type of allocate().Edward Z. Yang2015-06-011-1/+2
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Add (failing) test case for #7672.Edward Z. Yang2015-06-014-0/+8
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Typofix: missing period. (#10460)Edward Z. Yang2015-06-011-1/+1
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Add information about allowed foreign prim args, see #10460.Edward Z. Yang2015-06-011-1/+7
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Replace tabs with spaces.Edward Z. Yang2015-06-011-118/+118
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Comments onlySimon Peyton Jones2015-06-011-5/+12
|
* Use named fields in SimplCont.Select constructorSimon Peyton Jones2015-06-012-30/+39
| | | | Just refactoring
* Add some missing seqs to Coercion.seqCoSimon Peyton Jones2015-06-011-3/+3
|
* Move seqExpr, seqIdInfo etc to CoreUtilsSimon Peyton Jones2015-06-015-111/+112
| | | | Refactoring only : it just brings some scattered "seq" code together
* Use seq rather than (==) to force the sizeSimon Peyton Jones2015-06-011-1/+1
| | | | Just a minor refactoring
* Fix dropped event registrationsBen Gamari2015-06-012-14/+33
| | | | | | | | | | | | | | | | D347 introduced a bug wherein the event manager would drop registrations that should be retained during processing. This occurs when an fd has multiple registrations, not all of which fire, as well as the case of multi-shot registrations. I also do some general house-keeping, try to better document things, and fix a bug which could result in unnecessary calls to `epoll_ctl` Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D849 GHC Trac Issues: #10317
* Add constraint creation functions to TcPluginM APIAdam Gundry2015-06-014-15/+81
| | | | | | | | | | | | | | | | | Summary: This extends the TcPluginM API with functions to create new constraints, as described here: https://ghc.haskell.org/trac/ghc/wiki/Plugins/TypeChecker#Post-7.10changestoTcPluginMAPI Test Plan: validate and hope Reviewers: austin, yav, christiaanb Reviewed By: christiaanb Subscribers: bgamari, thomie Differential Revision: https://phabricator.haskell.org/D909
* ApiAnnotations : strings in warnings do not return SourceTextAlan Zimmerman2015-06-0134-119/+390
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The strings used in a WARNING pragma are captured via strings :: { Located ([AddAnn],[Located FastString]) } : STRING { sL1 $1 ([],[L (gl $1) (getSTRING $1)]) } .. The STRING token has a method getSTRINGs that returns the original source text for a string. A warning of the form {-# WARNING Logic , mkSolver , mkSimpleSolver , mkSolverForLogic , solverSetParams , solverPush , solverPop , solverReset , solverGetNumScopes , solverAssertCnstr , solverAssertAndTrack , solverCheck , solverCheckAndGetModel , solverGetReasonUnknown "New Z3 API support is still incomplete and fragile: \ \you may experience segmentation faults!" #-} returns the concatenated warning string rather than the original source. This patch now deals with all remaining instances of getSTRING to bring in a SourceText for each. This updates the haddock submodule as well, for the AST change. Test Plan: ./validate Reviewers: hvr, austin, goldfire Reviewed By: austin Subscribers: bgamari, thomie, mpickering Differential Revision: https://phabricator.haskell.org/D907 GHC Trac Issues: #10313
* Update binary submodule to 0.7.5.0 releaseHerbert Valerio Riedel2015-06-011-0/+0
| | | | | | | | | | | | | | | | | | | | | | Quoting the changelog, this pulls in the following fixes: binary-0.7.5.0 -------------- - Fix performance bug that was noticable when you get a big strict ByteString and the input to the decoder consists of many small chunks. - https://github.com/kolmodin/binary/issues/73 - https://github.com/kolmodin/binary/pull/76 - Fix memory leak when decoding Double and Float. - Commit 497a181c083fa9faf7fa3aa64d1d8deb9ac76ecb - We now require QuickCheck >= 2.8. Remove our version of arbitrarySizedNatural. binary-0.7.4.0 -------------- - Some invalid UTF-8 strings caused an exception when decoded. Those errors will now now fail in the Get monad instead. See issue 70. Patch contributed by @ttuegel.