summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Don't use $SHELL in wrapper scriptsJoachim Breitner2017-10-263-6/+6
| | | | | Do not use $SHELL as $SHELL is the user's preferred interactive shell. We do not want this to leak into the wrapper scripts.
* configure: Add Alpine Linux to checkVendorTuncer Ayaz2017-10-261-1/+1
|
* users-guide: Disable index node generationBen Gamari2017-10-261-2/+3
| | | | | This is breaking the build on some platforms. It's unclear exactly why but I don't have time to investigate at the moment.
* Declare upstram repo location for hsc2hsHerbert Valerio Riedel2017-10-261-1/+1
| | | | [skip ci]
* Factor out readField (#14364)Tobias Dammers2017-10-254-19/+75
| | | | | | | | | | | | | | | | | | | Improves compiler performance of deriving Read instances, as suggested in the issue. Additionally, we introduce `readSymField`, a companion to `readField` that parses symbol-type fields (where the field name is a symbol, e.g. `(#)`, rather than an alphanumeric identifier. The decision between these two functions is made a compile time, because we already know which one we need based on the field name. Reviewers: austin, hvr, bgamari, RyanGlScott Reviewed By: bgamari Subscribers: RyanGlScott, rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D4108
* base: Enable listToMaybe to fuse via foldr/buildDouglas Wilson2017-10-251-3/+6
| | | | | | | | | | | | | | Test Plan: Consider whether this is a good idea. Reviewers: austin, hvr, bgamari, nomeata Reviewed By: bgamari, nomeata Subscribers: nomeata, rwbarton, thomie GHC Trac Issues: #14387 Differential Revision: https://phabricator.haskell.org/D4126
* user-guide: Clarify default optimization flagsBen Gamari2017-10-251-6/+7
| | | | | | | | | | | | | | | | Begins to fix #14214. [skip ci] Test Plan: Read it. Reviewers: austin Subscribers: rwbarton, thomie GHC Trac Issues: #14214 Differential Revision: https://phabricator.haskell.org/D4098
* Fix a bug in 'alexInputPrevChar'Alec Theriault2017-10-253-25/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The lexer hacks around unicode by squishing any character into a 'Word8' and then storing the actual character in its state. This happens at 'alexGetByte'. That is all and well, but we ought to be careful that the characters we retrieve via 'alexInputPrevChar' also fit this convention. In fact, #13986 exposes nicely what can go wrong: the regex in the left context of the type application rule uses the '$idchar' character set which relies on the unicode hack. However, a left context corresponds to a call to 'alexInputPrevChar', and we end up passing full blown unicode characters to '$idchar', despite it not being equipped to deal with these. Test Plan: Added a regression test case Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie GHC Trac Issues: #13986 Differential Revision: https://phabricator.haskell.org/D4105
* Implement `-Wpartial-fields` warning (#7169)Daishi Nakajima2017-10-256-2/+89
| | | | | | | | | | | | | | | | | Warning on declaring a partial record selector. However, disable warn with field names that start with underscore. Test Plan: Added 1 test case. Reviewers: austin, bgamari, simonpj Reviewed By: bgamari, simonpj Subscribers: goldfire, simonpj, duog, rwbarton, thomie GHC Trac Issues: #7169 Differential Revision: https://phabricator.haskell.org/D4083
* Performance improvements linear regAlloc (#7258)Tobias Dammers2017-10-251-11/+13
| | | | | | | | | | | | | | | | | | | | | | | When allocating and potentially spilling registers, we need to check the desired allocations against current allocations to decide where we can spill to, cq. which allocations we can toss and if so, how. Previously, this was done by walking the Cartesian product of the current allocations (`assig`) and the allocations to keep (`keep`), which has quadratic complexity. This patch introduces two improvements: 1. pre-filter the `assig` list, because we are only interested in two types of allocations (in register, and in register+memory), which will only make up a small and constant portion of the list; and 2. use set / map operations instead of lists, which reduces algorithmic complexity. Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D4109
* Fix space leak in BinIface.getSymbolTableDouglas Wilson2017-10-254-14/+29
| | | | | | | | | | | | | | | | | | | | | | | | Replace a call to mapAccumR, which uses linear stack space, with a gadget that uses constant space. Remove an unused parameter from fromOnDiskName. The tests T1292_imports and T4239 are now reporting imported names in a different order. I don't completely understand why, but I presume it is because the symbol tables are now read more strictly. The new order seems better in T1792_imports, and equally random in T4239. There are several performance test improvements. Test Plan: ./validate Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: alexbiehl, rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D4124
* Windows: Update the mirror script to generate hashes and use mirror fallbackTamar Christina2017-10-251-6/+24
| | | | | | | | | | | | | | | | | | | | | This fixes the mirror script so it correctly queries haskell.org and if packages aren't found check repo.msys2.org. Also the mirror functionality now generates the md5 hashes after a mirror fetch that can be placed in the md5sums file. Test Plan: mk/get-win32-tarballs.sh fetch mirror and ./validate Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D4118
* Make layLeft and reduceDoc stricter (#7258)Tobias Dammers2017-10-251-6/+6
| | | | | | | | | | | | | | Making the pretty-printer based assembly output stricter in strategically chosen locations produces a minor performance improvement when compiling large derived Read instance (on the order of 5-10%). Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D4111
* Add info about Github pull requests.AndreasPK2017-10-251-6/+6
|
* typecheck: Clarify errors mentioned in #14385Ben Gamari2017-10-2512-30/+30
|
* Make language extensions their own category in the documentationJoachim Breitner2017-10-258-1005/+925
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I.e. instead of .. ghc-flag:: -XUnboxedTuples :shortdesc: Enable the use of unboxed tuple syntax. :type: dynamic :reverse: -XNoUnboxedTuples :category: one simply writes .. extension:: UnboxedTuples :shortdesc: Enable the use of unboxed tuple syntax. This allows language extensions to be referenced as If :extension:`UnboxedTuples` is enabled, then... This directive still creates the entries for the `-XUnboxedTuples` flag, so in particular, Set :ghc-flag:`-XUnboxedTuples` if you have to. still works, and lists of flags in general (e.g. for the manpage) include these. I also removed lots of links from the shortdesc of the extensions, when this link simply points to the section where the extension is defined. I removed the list of `-X` flags from the flag reference table, but added a table of extension under “10.1. Language options” Lots of text in the manual now refers to “extension `Foo`” rather than “flag `-XFoo`”. I consider `-XFoo` a historic artifact that stems from when language extensions were really just flags. These days, the use of `-XFoo` is (IMHO) deprecated: You should be using `LANGUAGE Foo`, or maybe the appropriate field in a `.cabal` file. See 9278994 which did this change to error messages already. Differential Revision: https://phabricator.haskell.org/D4112
* Revert "Update Win32 version for GHC 8.4."Tamar Christina2017-10-257-9/+2
| | | | | | This reverts commit 561bdca16e2fe88d0b96fc10098955eabca81bba. submodule
* Revert "ghc-cabal: Inline removed function ..."Tamar Christina2017-10-251-8/+1
| | | | This reverts commit f744261ad25942e8a747821fc468f1a21c9c705c.
* ghc-cabal: Inline removed function from Cabal.Tamar Christina2017-10-251-1/+8
|
* Update Win32 version for GHC 8.4.Tamar Christina2017-10-257-2/+9
| | | | | | | | | | | | | | | | Summary: Update to Win32 2.6 which is the expected version release for 8.4 This bumps the required submodule s as well. Test Plan: ./validate Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D4117
* Revert "Windows: Bump to GCC 7.2 for GHC 8.4"Tamar Christina2017-10-252-39/+40
| | | | This reverts commit b62097d10e0ff490f862661a24e3ca1cc1bba841.
* Windows: Bump to GCC 7.2 for GHC 8.4Tamar Christina2017-10-252-40/+39
| | | | | | | | | | | | | | | | | | | Summary: GHC 8.4 is expected to ship with an updated GCC bindist based on GCC 7.2. I am however at this time not updating the crt due to an issue introduced in september. https://sourceforge.net/p/mingw-w64/mailman/message/36085637/ Unless a favorable fix comes out of the discussion I will just ship the old crt with GHC 8.4. Test Plan: ./validate Reviewers: austin, bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D4119
* Remove the 'legroom' part of the timeout-accurate-pure test.Tom Sydney Kerckhove2017-10-253-31/+0
| | | | | | | | | | | | | | | | | | | Summary: This removes the part of the test that checks whether the timeout happened in a 'reasonable' amount of time, because it is flaky. In subsequent work, we can turn this into a benchmark. Test Plan: This _is_ a test Reviewers: nh2, bgamari, Phyx, austin, hvr Reviewed By: Phyx Subscribers: rwbarton, thomie GHC Trac Issues: #8684 Differential Revision: https://phabricator.haskell.org/D4120
* Include usg_file_hash in ghc --show-iface outputSimon Marlow2017-10-241-1/+2
| | | | | | | | | | | | | | Summary: Otherwise we can get an iface hash difference, but no indication of what caused it in the --show-iface output. Test Plan: Harbourmaster Reviewers: austin, bgamari, erikd Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D4115
* User’s guide: Properly link to RTS flag -VJoachim Breitner2017-10-241-1/+1
|
* Temporary fix to Trac #14380Simon Peyton Jones2017-10-244-4/+35
| | | | | | | | This fix replaces an utterly bogus error message with a decent one, rejecting a pattern synonym with a list pattern and rebindable syntax. Not hard to fix properly, but I'm going to wait for a willing volunteer and/or more user pressure.
* Comments onlySimon Peyton Jones2017-10-231-1/+1
|
* submodule nofib: Add digits-of-e2.faststdoutJoachim Breitner2017-10-231-0/+0
|
* submodule nofib: Add digits-of-e1.faststdoutJoachim Breitner2017-10-221-0/+0
|
* nofib submodule: Fix a problem with fasta-c.cJoachim Breitner2017-10-221-0/+0
|
* Add stack traces on crashes on WindowsTamar Christina2017-10-2218-12/+346
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch adds the ability to generate stack traces on crashes for Windows. When running in the interpreter this attempts to use symbol information from the interpreter and information we know about the loaded object files to resolve addresses to symbols. When running compiled it doesn't have this information and then defaults to using symbol information from PDB files. Which for now means only files compiled with ICC or MSVC will show traces compiled. But I have a future patch that may address this shortcoming. Also since I don't know how to walk a pure haskell stack, I can for now only show the last entry. I'm hoping to figure out how Apply.cmm works to be able to walk the stalk and give more entries for pure haskell code. In GHCi ``` $ echo main | inplace/bin/ghc-stage2.exe --interactive ./testsuite/tests/rts/derefnull.hs GHCi, version 8.3.20170830: http://www.haskell.org/ghc/ :? for help Ok, 1 module loaded. Prelude Main> Access violation in generated code when reading 0x0 Attempting to reconstruct a stack trace... Frame Code address * 0x77cde10 0xc370229 E:\..\base\dist-install\build\HSbase-4.10.0.0.o+0x190031 (base_ForeignziStorable_zdfStorableInt4_info+0x3f) ``` and compiled ``` Access violation in generated code when reading 0x0 Attempting to reconstruct a stack trace... Frame Code address * 0xf0dbd0 0x40bb01 E:\..\rts\derefnull.run\derefnull.exe+0xbb01 ``` Test Plan: ./validate Reviewers: austin, hvr, bgamari, erikd, simonmar Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D3913
* Update record-wildcard docsSimon Peyton Jones2017-10-201-11/+22
| | | | | This patch clarifies the story for record wildcards, following the discussion on Trac #14347.
* Improve kick-out in the constraint solverSimon Peyton Jones2017-10-208-124/+207
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch was provoked by Trac #14363. Turned out that we were kicking out too many constraints in TcSMonad.kickOutRewritable, and that mean that the work-list never became empty: infinite loop! That in turn made me look harder at the Main Theorem in Note [Extending the inert equalities]. Main changes * Replace TcType.isTyVarExposed by TcType.isTyVarHead. The over-agressive isTyVarExposed is what caused Trac #14363. See Note [K3: completeness of solving] in TcSMonad. * TcType.Make anyRewriteableTyVar role-aware. In particular, a ~R ty cannot rewrite b ~R f a See Note [anyRewriteableTyVar must be role-aware]. That means it has to be given a role argument, which forces a little refactoring. I think this change is fixing a bug that hasn't yet been reported. The actual reported bug is handled by the previous bullet. But this change is definitely the Right Thing The main changes are in TcSMonad.kick_out_rewritable, and in TcType (isTyVarExposed ---> isTyVarHead). I did a little unforced refactoring: * Use the cc_eq_rel field of a CTyEqCan when it is available, rather than recomputing it. * Define eqCanRewrite :: EqRel -> EqRel -> EqRel, and use it, instead of duplicating its logic
* Comments and white spaceSimon Peyton Jones2017-10-202-1/+4
|
* Outputable: Add pprTraceExceptionBen Gamari2017-10-191-1/+11
|
* Add Functor Bag instanceBen Gamari2017-10-191-0/+3
|
* Untag the potential AP_STACK in stg_getApStackValzhJames Clarke2017-10-194-2/+62
| | | | | | | | | | | | | | | | | If the AP_STACK has been evaluated and a GC has run, the BLACKHOLE indirection will have been removed, and the StablePtr for the original AP_STACK referred to be GHCi will therefore now point directly to the value, and may be tagged. Add a hist002 test for this, and make sure hist001 doesn't do an idle GC, so the case when it's still a BLACKHOLE is definitely also tested. Reviewers: austin, bgamari, erikd, simonmar Reviewed By: simonmar Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D4099
* Give a reference to Foreign.Concurrent.Edward Z. Yang2017-10-191-0/+3
| | | | | | | | | | | | Test Plan: none Reviewers: bgamari, austin, hvr Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D4081
* Added a test for 'timeout' to be accurate.Tom Sydney Kerckhove2017-10-193-0/+31
| | | | | | | | | | | | | | | | | This is the first in a series of regression tests prompted by https://ghc.haskell.org/trac/ghc/ticket/8684 and D4011, D4012, D4041 Test Plan: This _is_ a test. Reviewers: nh2, austin, hvr, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie GHC Trac Issues: #8684 Differential Revision: https://phabricator.haskell.org/D4074
* Expose monotonic time from GHC.Event.ClockTom Sydney Kerckhove2017-10-193-3/+7
| | | | | | | | | | | | | | | | | This diff exposes the monotonic time api from GHC.Event.Clock. This is necessary for future work on regression tests (#D4074) for the timeout problems (8684, for example) in #D4041, #D4011, #D4012 Test Plan: Still builds ... Reviewers: nh2, bgamari, austin, hvr Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D4079
* Bump arcanist-external-json-linter submoduleBen Gamari2017-10-191-0/+0
|
* User's guide: Fix the category of some flagsJoachim Breitner2017-10-194-13/+17
| | | | so now “7.6.12. Language options” only lists `-X` flags, as it should.
* Export injectiveVarsOf{Binder,Type} from TyCoRepRyan Scott2017-10-192-29/+36
| | | | | | | | | | | | | | | | | | Summary: I ended up needing to use the functionality of `injectiveVarsOfBinder`/`injectiveVarsOfType` in this Haddock PR (https://github.com/haskell/haddock/pull/681), but alas, neither of these functions were exported. Let's do so. Test Plan: Does it compile? Reviewers: austin, goldfire, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie Differential Revision: https://phabricator.haskell.org/D4107
* Fix #14369 by making injectivity warnings finer-grainedRyan Scott2017-10-1916-27/+58
| | | | | | | | | | | | | | | | | | | | | Summary: Previously, GHC would always raise the possibility that a type family might not be injective in certain error messages, even if that type family actually //was// injective. Fix this by actually checking for a type family's lack of injectivity before emitting such an error message. Test Plan: ./validate Reviewers: goldfire, austin, bgamari, simonpj Reviewed By: simonpj Subscribers: simonpj, rwbarton, thomie GHC Trac Issues: #14369 Differential Revision: https://phabricator.haskell.org/D4106
* Error when deriving instances in hs-boot filesRyan Scott2017-10-197-2/+39
| | | | | | | | | | | | | | | | | | | | | | | | Summary: According to the GHC users' guide, one cannot derive instances for data types in `.hs-boot` files. However, GHC was not enforcing this in practice, which led to #14365. Fix this by actually throwing an error if a derived instance is detected in an `.hs-boot` file (and recommend how to fix it in the error message.) Test Plan: make test TEST=T14365 Reviewers: ezyang, austin, bgamari, simonpj Reviewed By: simonpj Subscribers: simonpj, rwbarton, thomie GHC Trac Issues: #14365 Differential Revision: https://phabricator.haskell.org/D4102
* Disable -XRebindableSyntax when running internal GHCi expressionsRyan Scott2017-10-193-10/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: It's well known that `-XRebindableSyntax` doesn't play nicely with some of the internal expressions that GHCi runs. #13385 was one example where this problem arose, which was fixed at the time by simply avoiding the use of `do`-notation in these internal GHCi expressions. That seemed to work, but it was a technique that proved not to scale, as #14342 demonstrated //another// example where `-XRebindableSyntax` can bite. Instead of delicately arranging the internal GHCi expressions to avoid anything that might be covered under `-XRebindableSyntax`, this patch takes the much more direct approach of disabling `-XRebindableSyntax` entirely when running any internal GHCi expression. This shouldn't hurt, since nothing internal to GHCi was taking advantage of the extension in the first place, and moreover, we can have greater confidence that some other obscure `-XRebindableSyntax` corner case won't pop up in the future. As an added bonus, this lets us once again use `do`-notation in the code that had to be changed when #13385 was (hackily) fixed before. Test Plan: make test TEST=T14342 Reviewers: bgamari, austin Subscribers: rwbarton, thomie GHC Trac Issues: #14342 Differential Revision: https://phabricator.haskell.org/D4086
* Accept test output for #14350Ryan Scott2017-10-191-0/+30
|
* whitespace onlyGabor Greif2017-10-181-2/+1
|
* Typofix in commentGabor Greif2017-10-181-1/+1
|
* Better solving for representational equalitiesSimon Peyton Jones2017-10-187-179/+252
| | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a bit of extra solving power for representational equality constraints to fix Trac #14333 The main changes: * Fix a buglet in TcType.isInsolubleOccursCheck which wrongly reported a definite occurs-check error for (a ~R# b a) * Get rid of TcSMonad.emitInsolubles. It had an ad-hoc duplicate-removal piece that is better handled in interactIrred, now that insolubles are Irreds. We need a little care to keep inert_count (which does not include insolubles) accurate. * Refactor TcInteract.solveOneFromTheOther, to return a much simpler type. It was just over-complicated before. * Make TcInteract.interactIrred look for constraints that match either way around, in TcInteract.findMatchingIrreds This wasn't hard and it cleaned up quite a bit of code.