summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* FastString: Reduce allocations of concatFSwip/T12357-concatBen Gamari2016-07-051-1/+1
| | | | | Instead of unpacking and then repacking we simply concatenate all of the individual ByteStrings.
* Increase constraint tuple limit to 62 (Trac #10451)Nick Terrell2015-06-144-5/+328
| | | | | | | | | | | * Increase max constraint tuple size to 62 * Modify test case to reflect change Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D986 GHC Trac Issues: #10451
* add type annotations to SrcLoc functionsÖmer Sinan Ağacan2015-06-141-0/+3
| | | | | | | | Because sometimes types make more sense than docs. Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D983
* UNREG: fix pprHexVal to emit zeros (#10518)Sergei Trofimovich2015-06-143-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | jakzale on #ghc reported a build failure when ported GHC on a new target. The code 'pprHexVal (2^32) W32' emits '0xU' which is invalid C. I've introduced bug in 43f1b2ecd1960fa7377cf55a2b97c66059a701ef when added literal truncation. That truncation is a new source of zeros. Signed-off-by: Sergei Trofimovich <siarheit@google.com> Test Plan: added test and tested on UNREG ghc Reviewers: austin Reviewed By: austin Subscribers: thomie, bgamari Differential Revision: https://phabricator.haskell.org/D987 GHC Trac Issues: #10518
* Testsuite: add function compile_timeout_multiplier (#10345)Thomas Miedema2015-06-134-11/+25
| | | | | | | | | | | And rename timeout_multiplier to run_timeout_multiplier. timeout_multiplier was added in commit a00389794b839971c7d52ead9e8570bfaa25ac55. The name suggested that it would affect any test, but it actually only affected tests that had a run component, and only that run component (as needed by test T367). Differential Revision: https://phabricator.haskell.org/D982
* Testsuite: diff non-whitespace normalised output (#10152)Thomas Miedema2015-06-131-29/+36
| | | | | | | | | | | | | | | | | | | | | On a test failure, we show a diff between the expected and the actual output. The method of how we do this has changed a couple of times: * In 2007: 9951189ccf90b709436fa55ee49eeef031f79f4e "On failure, diff the normalised test outputs" * In 2011: 3019b1e409c129ef7af63e6a7408fb36ec44444b "When the output files differ, present the diffs between the *actual* output, not the normalised output. The latter may have newlines removed, making the diff unreadable." * In 2015 (now): do something in between. - Do apply the normalisers again, to make the diff smaller (only showing the actual problem). - But don't apply normalise_whitespace, as it indeed makes the diff unreadable. Differential Revision: https://phabricator.haskell.org/D984
* Add versioning section to Backpack docs.Edward Z. Yang2015-06-123-4/+148
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Docs: `-XTypeOperators` (#10175)Thomas Miedema2015-06-121-1/+1
| | | | [skip ci]
* Docs: it's `gv --orientation=seascape` nowadays (#10497)Thomas Miedema2015-06-121-2/+2
| | | | [skip ci]
* Fix typo in `traceShowM` haddock comment (#10392)Thomas Miedema2015-06-121-2/+2
| | | | [skip ci]
* Do not copy stack after stack overflow, refix #8435Flaviu Andrei Csernik (archblob)2015-06-121-0/+1
| | | | | | | | | | | | | | | | | | Summary: This was reverted in d70b19bfb5ed79b22c2ac31e22f46782fc47a117 and is a part of the reason for #10445. Test Plan: validate Reviewers: ezyang, simonmar, austin Reviewed By: simonmar, austin Subscribers: bgamari, thomie Differential Revision: https://phabricator.haskell.org/D938 GHC Trac Issues: #8435
* Add parseExpr and compileParsedExpr and use them in GHC API and GHCiSimon Marlow2015-06-1215-98/+226
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: This commit brings following changes and fixes: * Implement parseExpr and compileParsedExpr; * Fix compileExpr and dynCompilerExpr, which returned `()` for empty expr; * Fix :def and :cmd, which didn't work if `IO` or `String` is not in scope; * Use GHCiMonad instead IO in :def and :cmd; * Clean PrelInfo: delete dead comment and duplicate entries, add assertion. See new tests for more details. Test Plan: ./validate Reviewers: austin, dterei, simonmar Reviewed By: simonmar Subscribers: thomie, bgamari Differential Revision: https://phabricator.haskell.org/D974 GHC Trac Issues: #10508
* Testsuite: fix the little known CHECK_FILES_WRITTEN=1Thomas Miedema2015-06-121-3/+17
| | | | | | | | | | | | | The testsuite driver has a little known feature to check which files each test writes to, whether there are tests that write to same file, and whether the tests leave any files behind when CLEANUP=1. It uses strace under the hood. This commit fixes some bitrot, and filters out some more strace lines that we're not interested in (and are shown as framework failures otherwise). Differential Revision: https://phabricator.haskell.org/D979
* Squash typos in commentsGabor Greif2015-06-123-3/+3
|
* docs: Fix unicode alternatives table (fixes #10509).Sebastian Reuße2015-06-121-5/+5
| | | | | | | | | | | The alternatives table gave the wrong glyphs for LEFTWARDS resp. RIGHTWARDS ARROW-TAIL notation. The listed codepoint was correct, but the entities corresponded to characters different from those codepoints. This also adds the glyphs for LEFTWARDS resp. RIGHTWARDS DOUBLE ARROW-TAIL, which were formerly missing, and the PROPORTION glyph, which was formerly given as ASCII.
* Delete _MSC_VER when not necessary, fix #10511Bernard Desmyter2015-06-126-8/+8
| | | | | | | Simplify some preprocessor expressions involving `_MSC_VER` because `_WIN32` is always defined when `_MSC_VER` is. Differential Revision: https://phabricator.haskell.org/D981
* Revert "Change loadSrcInterface to return a list of ModIface"Edward Z. Yang2015-06-114-96/+38
| | | | | | | | As it turns out, in our new design these changes are no longer needed. The code is simpler without returning a list of ModIface, so let's do it! This reverts commit 8c7d20d8c7e63a1123755aae69cfa825c749e9e8.
* Revert "Support for multiple signature files in scope."Edward Z. Yang2015-06-1140-581/+139
| | | | This reverts commit a7524eaed33324e2155c47d4a705bef1d70a2b5b.
* Remove redundant tcg_visible_orphan_mods, it is recorded in imp_orphs.Edward Z. Yang2015-06-115-18/+15
| | | | | | | | | | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonpj, austin Subscribers: bgamari, thomie Differential Revision: https://phabricator.haskell.org/D947
* Add failing test for #9562.Edward Z. Yang2015-06-119-0/+59
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Removes all occurrences of __MINGW32__ (#10485)Thomas Miedema2015-06-118-26/+26
| | | | | | | | | | In Haskell files, replace `__MINGW32__` by `mingw32_HOST_OS`. In .c and .h files, delete `__MINGW32__` when `_WIN32` is also tested because `_WIN32` is always defined when `__MINGW32__` is. Also replace `__MINGW32__` by `_WIN32` when used standalone for consistency. Differential Revision: https://phabricator.haskell.org/D971
* Travis: use apt-get -qThomas Miedema2015-06-111-3/+3
| | | | [skip ci]
* Testsuite: change some expect_fail tests to expect_brokenThomas Miedema2015-06-119-8/+18
| | | | | | | | | | | | | | | | | | | | | | | | Change the following tests from expect_fail to expect_broken: and list the ticket number: * driver/sigof03m/sigof03 (#9252) * driver/static001 (#8127) * partial-sigs/should_compile/EqualityConstraint (#9478) * partial-sigs/should_compile/ExtraNumAMROn (#9478) * partial-sigs/should_compile/PatBind2 (#9478) * partial-sigs/should_fail/TidyClash2 (#9478) * simplCore/should_compile/T8832 (#8832) The following tests are still marked as expect_fail, but it is not clearly documented why so: * gadt/lazypatok * indexed-types/should_fail/SkolemOccursLoop All other expect_fail tests are only expected to fail on either a certain platform/os or for a certain way only. Differential Revision: https://phabricator.haskell.org/D966
* Testsuite: mention the existence of ticket #10510Thomas Miedema2015-06-111-1/+1
| | | | [skip ci]
* Testsuite: mark T4945 as expect_broken (#4945)Thomas Miedema2015-06-112-10/+1
| | | | | | | | | | | | | | | | In commit 7d519dabd2006c9742e82fce02df55704da15482, the file T4945.stdout was added to the repository, to make T4945 pass validatation presumably. When that test produces output however, there is a bug somewhere, and we shouldn't hide it. There is a comment in the Makefile which says: "When SpecConstr works there are no STUArrays at all" So here we remove T4945.stdout again, mark T4945 as expect_broken, and reopen the ticket. Differential Revision: https://phabricator.haskell.org/D976
* Testsuite: mark tests as expect_broken on win64Thomas Miedema2015-06-113-2/+5
| | | | | | Tickets: #1407, #9381, #9878. Differential Revision: https://phabricator.haskell.org/D977
* Testsuite Windows: fix T8172 (#8172)Thomas Miedema2015-06-112-1/+6
| | | | | Use the new function `normalise_drive_letter` to change D:\ to C:\ before comparing outputs.
* Update submodule process to masterThomas Miedema2015-06-111-0/+0
| | | | | This allows a warning free build on Windows, and thus an error free validate.
* Fix DWARF generation for MinGW (#10468)Peter Wortmann2015-06-113-12/+16
| | | | | | | Fortunately this is relatively straightforward - all we need to do is switch to a non-ELF-specific way of specifying object file sections and make sure that section-relative addresses work correctly. This is enough to make "gdb" work on MinGW builds.
* IndTypesPerfMerge no longer seems to requre -M20MSimon Peyton Jones2015-06-111-2/+2
|
* Another major improvement of "improvement"Simon Peyton Jones2015-06-1130-1361/+1811
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I wasn't very happy with my fix to Trac #10009. This is much better. The main idea is that the inert set now contains a "model", which embodies *all* the (nominal) equalities that we know about, with a view to exposing unifications. This requires a lot fewer iterations of the solver than before. There are extensive comments in TcSMonad: Note [inert_model: the inert model] Note [Adding an inert canonical constraint the InertCans] The big changes are * New inert_model field in InertCans * Functions addInertEq, addInertCan deal with adding a constraint, maintaining the model * A nice improvement is that unification variables can unify with fmvs, so that from, say alpha ~ fmv we get alpha := fmv See Note [Orientation of equalities with fmvs] in TcFlatten It's still not perfect, as the Note explains New flag -fconstraint-solver-iterations=n, allows us to control the number of constraint solver iterations, and in particular will flag up when it's more than a small number. Performance is generally slightly better: T5837 is a lot better for some reason.
* docs: Fix #10416Austin Seipp2015-06-104-4/+4
| | | | | | | | | | | | | | | | | | | | | | This commit fixes #10416 by using an EPS-based file-format for embedding images in the users guide, as opposed to a png. This is because 'latex' in some distributions is actually 'pdflatex', which supports reading the size of PNGs in DVI mode, while traditional latex does not. Rather than fiddle with the build a whole bunch, it's easy and simple to just convert the png into a eps file and embed that instead. But apparently we already had an EPS file, added in 1cce2f51656cfbd8c7933a914a4bd981792aa1e6! But it was quite large, so instead I used `convert` to shrink it down from 1.7MB to about 20kb, the same size as the original PDF (by using level3 postscript, which is not as wasteful.) Signed-off-by: Austin Seipp <austin@well-typed.com> Differential Revision: https://phabricator.haskell.org/D970 GHC Trac Issues: #10416
* make sdist: distclean testsuite for real (#10406)Thomas Miedema2015-06-091-1/+1
|
* Build: run autoreconf jobs in parallelThomas Miedema2015-06-091-3/+12
| | | | | | | | Running ./boot takes ~20 seconds on my laptop with 2 cores. With this change, that goes down to a little over 10 seconds. There are 8 configure.ac files in total, so max 8 parallel jobs. Differential Revision: https://phabricator.haskell.org/D962
* Testsuite: delete expect_fail setups for ghc < 7.1Thomas Miedema2015-06-098-15/+12
| | | | | | This makes it easier to grep for expect_fail in the tests directory. Differential Revision: https://phabricator.haskell.org/D965
* Testsuite: delete expect_fail setups for hugsThomas Miedema2015-06-097-19/+11
| | | | | | This makes it easier to grep for expect_fail in the tests directory. Differential Revision: https://phabricator.haskell.org/D964
* Revert "The test runner now also works under the msys-native Python."Thomas Miedema2015-06-092-16/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To make the test runner work under msys-native Python... Commit 5258566ee5c89aa757b0cf1433169346319c018f broke the msys testsuite driver (#10441). It changed the quoting of `config.compiler` from single quotes to double quote, which turns out to not be compatible with what the function `passThroughCmd` expected. We could fix `passThroughCmd` to handle the case where `config.compiler` is double quoted, and scatter some notes around to make sure the quoting done in various places of the testsuite driver stay compatible. Instead, this commit reverts 101c62e26286353dd3fac1ef54323529b64c9902, which introdced the function `passThroughCmd` in the first place (#9626). ezyang reports that doing this revert fixes the testsuite driver for him using the the following version of msys2: msys2-keyring r8.3864337-1 msys2-runtime 2.1.0.16351.cd3184b-1 msys2-runtime-devel 2.1.0.16351.cd3184b-1 msys2-w32api-headers 5.0.0.4456.c8b6742-1 msys2-w32api-runtime 5.0.0.4455.32db221-1 Ideally we'd know what minimum version of msys2 we require, but for now this fix is better than nothing. Only gintas ever reported the original problem, and he actually mentioned shortly afterwards: "This may have been fixed by a recent release of msys2, but I am not sure." Differential Revision: https://phabricator.haskell.org/D952
* Always force the exception in enqueued commandsZejun Wu2015-06-095-8/+14
| | | | | | | | | | | | | | `enqueueCommands` should always force exception in commands. Otherwise the exception thrown in `:cmd` (e.g. `:cmd return $ head []`) will cause GHCi to terminate with panic. Test Plan: `cd testsuite/tests/ghci/ && make` Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D967 GHC Trac Issues: #10501
* build: Clean testsuite before sdistAustin Seipp2015-06-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | When making the `sdist` tarball, we don't really need anything inside $(TOP)/testsuite in order to do our thing. So make sure we clean it first to avoid situations like #10406. With D917 landed, this can actually avoided entirely by fixing the official release process to instead build an `sdist` //first// from the clean git repository and then build that (to fixpoint) and test it. Then the originall clean tarball can be shipped. But it's nice to be safe in the general case where someone might want to (in the future) `sdist` out of their build tree. Signed-off-by: Austin Seipp <austin@well-typed.com> Reviewed By: thomie Differential Revision: https://phabricator.haskell.org/D956 GHC Trac Issues: #10406
* Refactor wild card renamingThomas Winant2015-06-0949-496/+396
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Refactor wild card error reporting * Merge `HsWildcardTy` and `HsNamedWildcardTy` into one constructor `HsWildCardTy` with as field the new type `HsWildCardInfo`, which has two constructors: `AnonWildCard` and `NamedWildCard`. * All partial type checks are removed from `RdrHsSyn.hs` and are now done during renaming in order to report better error messages. When wild cards are allowed in a type, the new function `rnLHsTypeWithWildCards` (or `rnHsSigTypeWithWildCards`) should be used. This will bring the named wild cards into scope before renaming them. When this is not done, renaming will trigger "Unexpected wild card..." errors. Unfortunately, this has to be done separately for anonymous wild cards because they are given a fresh name during renaming, so they will not cause an out-of-scope error. They are handled in `tc_hs_type`, as a special case of a lookup that fails. The previous opt-out approach is replaced with an opt-in approach. No more panics because of forgotten checks! * `[t| _ |]` isn't caught by the above two checks, so it is currently handled by a special case. The error message (generated in the `DsM` monad) doesn't provide as much context information as the other cases. * Instead of three (!) functions that walk `HsType`, there is now only one pure function called `collectWildCards`. * Alternative approach: catch all unwanted wild cards in `rnHsTyKi` by looking at the `HsDocContext`. This will reduce the number of places to catch unwanted wild cards form three to one, and make the error messages more uniform, albeit less informative, as the error context for renaming is not as informative as the one for type checking. A new constructor of `HsDocContext` will be required for pattern synonyms signatures. Small problem: currently type-class type signatures can't be distinguished from type signatures using the `HsDocContext`. This requires an update to the Haddock submodule. Test Plan: validate Reviewers: goldfire, simonpj, austin Reviewed By: simonpj Subscribers: bgamari, thomie, goldfire Differential Revision: https://phabricator.haskell.org/D613 GHC Trac Issues: #10098
* Revert "docs: Fix #10416"Austin Seipp2015-06-081-1/+1
| | | | | | | This causes the buildbots and other users to choke when building the user documentation, but I haven't figured out why. This reverts commit dcaaa980dc59202744bb3888d9662f9a7558cdf6.
* Fix for CAF retention when dynamically loading & unloading codeSimon Marlow2015-06-086-13/+50
| | | | | | | | | | | | | In a situaion where we have some statically-linked code and we want to load and unload a series of objects, we need the CAFs in the statically-linked code to be retained indefinitely, while the CAFs in the dynamically-linked code should be GC'd as normal, so that we can detect when the code is unloadable. This was wrong before - we GC'd CAFs in the static code, leading to a crash in the rare case where we use a CAF, GC it, and then load a new object that uses it again. I also did some tidy up: RtsConfig now has a field keep_cafs to indicate whether we want CAFs to be retained in static code.
* Fix the build when SplitObjs=YESThomas Miedema2015-06-061-1/+1
| | | | | | | The default (perf) build, which sets SplitObjs=YES, was broken with commit 5dd02864a844bcf6fe0018755ff261affdef3fea. I accidently removed the wrong `endif`. This should fix it.
* Fix the sdist buildThomas Miedema2015-06-061-2/+80
| | | | | | | | | | | | | | | Since commit 824e34e30338b4b1de0ab5467ffd29da4c7c805a, building ghc from a source distribution doesn't work. The error is: make[3]: *** No rule to make target 'utils/genprimopcode/dist/build/Lexer.hs', needed by 'utils/genprimopcode/dist/build/Lexer.o'. Stop. This commit fixes that. See note [Implicit rule search algorithm]. Differential Revision: https://phabricator.haskell.org/D959
* Testsuite: only show output diff when test is expected to passThomas Miedema2015-06-061-11/+17
| | | | | | | | | | | | | | | | | | | | | | Don't let the output of tests that either have missing libraries or are expected to be broken obscure real failures. This makes it easier to analyse the testlogs. The only consequence is that when a test fails because a certain library isn't installed, you have to check the all.T file in which the test is defined to actually find out _which_ library that is. Before it would print something like Compile failed (status 256) errors were: stm052.hs:10:8: error: Could not find module ‘System.Random’ Use -v to see a list of the files searched for. And now it doesn't. I think this is an acceptable tradeoff. Differential Revision: https://phabricator.haskell.org/D945
* docs: Fix #10416Austin Seipp2015-06-051-1/+1
| | | | | | | | | | | | | | | | | | | | Summary: Apparently this was broken by b30c6012c7552c874281050d40e5a59012b2c5e7, but I can't reproduce the issue described there at all. Signed-off-by: Austin Seipp <austin@well-typed.com> Test Plan: Use my eyes to read the resulting user manual. Reviewers: hvr, thomie Reviewed By: thomie Subscribers: bgamari, thomie Differential Revision: https://phabricator.haskell.org/D958 GHC Trac Issues: #10416
* Fix #10489Richard Eisenberg2015-06-053-10/+15
| | | | | | Dang, roles are annoying. Test case: typecheck/should_compile/T10489
* Minor code cleanupRichard Eisenberg2015-06-051-8/+2
|
* Fix #10488 by unwrapping type synonyms.Richard Eisenberg2015-06-051-1/+3
| | | | | | | | | | | | | | | | | Summary: Previously, I had forgotten to unwrap vanilla type synonyms in the "flattener" that is used around the closed-type-family apartness check. Test Plan: validate Reviewers: austin Subscribers: bgamari, thomie Differential Revision: https://phabricator.haskell.org/D955 GHC Trac Issues: #10488
* Travis: allow user forksThomas Miedema2015-06-041-6/+15
| | | | | | | | | | | | Check for each submodule repository url if the user made its own fork. If so, use that. Otherwise, fall back on the one from github.com/ghc. As suggested by Richard in this mailinglist discussion: https://mail.haskell.org/pipermail/ghc-devs/2014-November/007300.html Documentation is at [wiki:TestingPatches#Travis]. Differential Revision: https://phabricator.haskell.org/D939