summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Stop the pipeline when it doesn't need to be run.ghc-validateEdward Z. Yang2015-10-211-3/+3
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Remove old trace statementRichard Eisenberg2015-10-211-3/+1
|
* Fix breakage in the GHCi debuggerSimon Marlow2015-10-211-10/+3
| | | | | | | | | | | | | | | | | | | | Summary: There was a broken offset calculation that only worked when the sections of the binary were in a particular order, and this broke (sometimes) after we started mapping the sections separately in the linker (see D975). Test Plan: ghci debugger tests now work with DYNAMIC_GHC_PROGRAMS=NO Reviewers: austin, hvr, bgamari, erikd Reviewed By: bgamari Subscribers: Phyx, thomie, trommler Differential Revision: https://phabricator.haskell.org/D1346 GHC Trac Issues: #10994
* Fix caching of pagesizeSimon Marlow2015-10-211-3/+2
| | | | | | | | | | | | Summary: Spotted by @erikd Test Plan: validate Reviewers: austin, bgamari, erikd Subscribers: thomie, erikd Differential Revision: https://phabricator.haskell.org/D1345
* Testsuite: add test for #10997Thomas Miedema2015-10-213-0/+34
|
* Extended default rules now specialize Foldable, Traversable to [] (#10971)David Kraeutmann2015-10-2013-15/+186
| | | | | | | | Default rules deliberately accept any kind. Reviewed By: simonpj, thomie, goldfire Differential Revision: https://phabricator.haskell.org/D1329
* Reject top-level typed TH splices. Fixes #10945Jan Stolarek2015-10-203-5/+41
| | | | | | | | | | | | | | | | | When TemplateHaskell language extension is enabled it is valid to have top-level expressions. Each such expression is treated as a contents of a splice. The problem arises with typed splices. They are not valid at the top level and therefore we should interpret them not as a splice but as a top-level expression (aka. implicit splice). So saying: $$foo is equivalent of: $( $$foo ) This patch makes sure that this is indeed the case. Until now we incorrectly treated typed splices as explicit splices.
* Testsuite Windows: don't use forward slashes in topdir pathThomas Miedema2015-10-202-3/+5
| | | | | | | | | | | | | | Changing backwards slashes to forward slashes apparently confuses msys2/mingw magic path handling. I don't quite understand why, but this fixes it. Test Plan: on Windows, make sure PATH does not contain 'inplace/mingw/bin' (let the testsuite driver add it), then run: make TEST='ghcilink003 ghcilink006'. Before this patch, it would fail. Reviewed by: Phyx, bgamari, austin Differential Revision: https://phabricator.haskell.org/D1343
* Systools.hs: Improve detection of GCC and ClangErik de Castro Lopo2015-10-203-4/+4
| | | | | | | | | | | | Test Plan: Build on Debian using `--with-gcc=clang` Reviewers: austin, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1336 GHC Trac Issues: #10981
* base: Have the argument of mask restore the state.Facundo Domínguez2015-10-195-3/+31
| | | | | | | | | | | | | | | | | | | | | The implementation of `mask` and `uninterruptibleMask` assumed so far that the restore argument would be called in a context with the same masking state as that set by `mask` or `uninterruptibleMask`. This patch has the restore argument restore the masking, whatever the current masking state is. Test Plan: validate Reviewers: simonmar, hvr, austin, bgamari Reviewed By: bgamari Subscribers: thomie, qnikst Differential Revision: https://phabricator.haskell.org/D1327 GHC Trac Issues: #10149
* Driver: `ghci -e` should behave like `ghc -e` (#9360)Thomas Miedema2015-10-193-2/+20
| | | | | | | | Patch by lukyanov. Reviewed by: bgamari Differential Revision: https://phabricator.haskell.org/D1337
* fix RTS linker compilation failure on SolarisKarel Gardas2015-10-181-1/+2
| | | | | | | | Reviewers: bgamari, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1341
* template-haskell: set explicit return=pureHerbert Valerio Riedel2015-10-182-0/+2
| | | | This fixups a thinko in c6781a5064049e0a7c17c1f2239567a3c44955af
* MRP-refactor `GHCi` Applicative/Monad instanceHerbert Valerio Riedel2015-10-181-2/+1
| | | | | As GHCi is compiled by stage1+ GHC only, we can drop the explicit `return` definition rightaway.
* template-haskell: MRP-refactor Applicative/Monad instancesHerbert Valerio Riedel2015-10-182-4/+3
| | | | | As `template-haskell` is compiled by stage1+ GHC only, we can drop the explicit `return` definition rightaway.
* ghc-pkg: Express return-method in terms of pureHerbert Valerio Riedel2015-10-181-2/+2
|
* Signals: Always install SIGUSR2 handlerBen Gamari2015-10-181-2/+0
| | | | Even if libdw isn't available.
* CmmParse: Clarify description of calling conventionBen Gamari2015-10-171-1/+4
|
* Make Monad/Applicative instances MRP-friendlyHerbert Valerio Riedel2015-10-1740-99/+113
| | | | | | | | | | | | | | | | | | | | | | | | | This patch refactors pure/(*>) and return/(>>) in MRP-friendly way, i.e. such that the explicit definitions for `return` and `(>>)` match the MRP-style default-implementation, i.e. return = pure and (>>) = (*>) This way, e.g. all `return = pure` definitions can easily be grepped and removed in GHC 8.1; Test Plan: Harbormaster Reviewers: goldfire, alanz, bgamari, quchen, austin Reviewed By: quchen, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1312
* Signals: Print backtrace on SIGUSR2Ben Gamari2015-10-171-0/+30
| | | | | | | | | | | | | | | This uses the backtrace support introduced in D1196 to provide backtraces from Haskell processes when SIGUSR2 is thrown. Test Plan: Need to add a test. Reviewers: scpmw, simonmar, Tarrasch, austin Reviewed By: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1197
* Libdw: Add libdw-based stack unwindingBen Gamari2015-10-1711-0/+509
| | | | | | | | | | | | | | | | | | | | | This adds basic support to the RTS for DWARF-assisted unwinding of the Haskell and C stack via libdw. This only adds the infrastructure; consumers of this functionality will be introduced in future diffs. Currently we are carrying the initial register collection code in Libdw.c but this will eventually make its way upstream to libdw. Test Plan: See future patches Reviewers: Tarrasch, scpmw, austin, simonmar Reviewed By: austin, simonmar Subscribers: simonmar, thomie, erikd Differential Revision: https://phabricator.haskell.org/D1196 GHC Trac Issues: #10656
* Move Control.Monad.IO.Class to base from transformersRyanGlScott2015-10-174-0/+40
| | | | | | | | | | | | | | | | | | | | | See Trac #10773 Remove Control.Monad.IO.Class from `transformers`. Updates `transformers` submodule. See Trac #10773 Test Plan: ./validate Reviewers: ekmett, hvr, bgamari, austin Reviewed By: hvr, bgamari, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1147 GHC Trac Issues: #10773
* Silence the linker on Windows so tests passTamar Christina2015-10-171-2/+2
| | | | | | | Silence the unconditional debugBelch statements recently added to HEAD which on Windows cause debug information to always be printed. Differential Revision: https://phabricator.haskell.org/D1338
* Build system: fix `make -j1` (#10973)Thomas Miedema2015-10-173-6/+13
| | | | | | | | | | | | | | | | | | | | There are multiple hacks all over the build system to account for the fact that the ghc package uses different build subdirectories (stage1/stage2) than the other packages (dist/dist-install). One such hack filtered on 'ghc%', with the intention of filtering the ghc package only. After renaming bin-package-db to ghc-boot (d2f9972a35ce05ceb8a78893e433ef1df06f73ef, Phab:D1313, #10796), ghc-boot also got caught in the hack, which broke the build when running without parallelism. This patch replaces the before mentioned hack by a different one, such that filtering on 'ghc%' is no longer necessary. See Note [inconsistent distdirs]. Reviewed by: austin Differential Revision: https://phabricator.haskell.org/D1333
* base: MINIMAL pragmas for Arrow/ArrowChoiceAustin Seipp2015-10-161-0/+2
| | | | | | | | | | Summary: This was left off in the previous commits. Signed-off-by: Austin Seipp <austin@well-typed.com> Reviewed By: ekmett Differential Revision: https://phabricator.haskell.org/D1332
* base: changelog entries for Arrow/ArrowChoiceAustin Seipp2015-10-161-0/+3
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* Allow left ∨ (+++) as minimal definition of ArrowChoice instanceM Farkas-Dyck2015-10-161-6/+7
| | | | | | | | See #10911. Reviewers: ekmett Signed-off-by: Austin Seipp <austin@well-typed.com>
* Add typed holes support in Template Haskell.Jan Stolarek2015-10-1624-101/+227
| | | | | Fixes #10267. Typed holes in typed Template Haskell currently don't work. See #10945 and #10946.
* Implement DuplicateRecordFieldsAdam Gundry2015-10-16113-740/+2455
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This implements DuplicateRecordFields, the first part of the OverloadedRecordFields extension, as described at https://ghc.haskell.org/trac/ghc/wiki/Records/OverloadedRecordFields/DuplicateRecordFields This includes fairly wide-ranging changes in order to allow multiple records within the same module to use the same field names. Note that it does *not* allow record selector functions to be used if they are ambiguous, and it does not have any form of type-based disambiguation for selectors (but it does for updates). Subsequent parts will make overloading selectors possible using orthogonal extensions, as described on the wiki pages. This part touches quite a lot of the codebase, and requires changes to several GHC API datatypes in order to distinguish between field labels (which may be overloaded) and selector function names (which are always unique). The Haddock submodule has been adapted to compile with the GHC API changes, but it will need further work to properly support modules that use the DuplicateRecordFields extension. Test Plan: New tests added in testsuite/tests/overloadedrecflds; these will be extended once the other parts are implemented. Reviewers: goldfire, bgamari, simonpj, austin Subscribers: sjcjoosten, haggholm, mpickering, bgamari, tibbe, thomie, goldfire Differential Revision: https://phabricator.haskell.org/D761
* Remove dead function patSynTyDetailsSimon Peyton Jones2015-10-161-9/+1
| | | | | And that allows us to remove the nasty import of HsBinds, which has no business in this module.
* rts/Linker.c : Fix armhf build (#10977)Erik de Castro Lopo2015-10-161-6/+3
| | | | | | | | | | | | Test Plan: Validate on x86_64, PowerPC and Arm Reviewers: simonmar, austin, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1330 GHC Trac Issues: #10977
* Fix windows build after D975Tamar Christina2015-10-161-0/+2
| | | | | | | | Add a missing #ifdef Reviewed By: simonmar Differential Revision: https://phabricator.haskell.org/D1328
* ELF/x86_64: map object file sections separately into the low 2GBSimon Marlow2015-10-155-264/+689
| | | | | | | | | | | | | | | | | | | | | | | On 64-bit ELF we need to link object files into the low 2GB due to the small memory model. Previously we would map the entire object file using MAP_32BIT, but the object file can consist of 75% or more symbols, which only need to be present during linking, so this is wasteful. In our particular application, we're already running out of space here. This patch changes the way we load object files on ELF platforms so that the object is first mapped above the 2GB boundary, parsed, and then the important sections are re-mapped into the low 2GB area. Test Plan: validate (also needs testing on OS X & Windows, preferably 32 & 64 bit) Reviewers: Phyx, trommler, bgamari, austin Subscribers: hsyl20, thomie, bgamari Differential Revision: https://phabricator.haskell.org/D975
* Minor stylistic update.Edward Z. Yang2015-10-141-1/+1
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Rename PACKAGE_KEY and LIB_NAME in build system.Edward Z. Yang2015-10-148-29/+29
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Rename package key to unit ID, and installed package ID to component ID.Edward Z. Yang2015-10-1476-481/+481
| | | | | | Comes with Haddock submodule update. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Update Cabal to HEAD, IPID renamed to Component ID.Edward Z. Yang2015-10-1444-412/+325
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit contains a Cabal submodule update which unifies installed package IDs and package keys under a single notion, a Component ID. We update GHC to keep follow this unification. However, this commit does NOT rename installed package ID to component ID and package key to unit ID; the plan is to do that in a companion commit. - Compiler info now has "Requires unified installed package IDs" - 'exposed' is now expected to contain unit keys, not IPIDs. - Shadowing is no more. We now just have a very simple strategy to deal with duplicate unit keys in combined package databases: if their ABIs are the same, use the latest one; otherwise error. Package databases maintain the invariant that there can only be one entry of a unit ID. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonpj, austin, bgamari, hvr, goldfire Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1184 GHC Trac Issues: #10714
* User should use -package-id flag if value in question is IPID.Edward Z. Yang2015-10-141-1/+1
| | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
* Fix GHCi on Arm (#10375).Erik de Castro Lopo2015-10-154-10/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Arm has two instruction sets, Arm and Thumb, and an execution mode for each. Executing Arm code in Thumb mode or vice-versa will likely result in an Illegal instruction exception. Furthermore, Haskell code compiled via LLVM was generating Arm instructions while C code compiled via GCC was generating Thumb code by default. When these two object code types were being linked by the system linker, all was fine, because the system linker knows how to jump and call from one instruction set to the other. The first problem was with GHCi's object code loader which did not know about Thumb vs Arm. When loading an object file `StgCRun` would jump into the loaded object which could change the mode causing a crash after it returned. This was fixed by forcing all C code to generate Arm instructions by passing `-marm` to GCC. The second problem was the `mkJumpToAddr` function which was generating Thumb instructions. Changing that to generate Arm instructions instead results in a working GHCi on Arm. Test Plan: validate on x86_64 and arm Reviewers: bgamari, austin, hvr Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1323 GHC Trac Issues: #10375
* travis: use LLVM 3.7Austin Seipp2015-10-131-3/+3
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* Switch to LLVM version 3.7Erik de Castro Lopo2015-10-148-78/+51
| | | | | | | | | | | | | | | | | | | | | | | | Before this commit, GHC only supported LLVM 3.6. Now it only supports LLVM 3.7 which was released in August 2015. LLVM version 3.6 and earlier do not work on AArch64/Arm64, but 3.7 does. Also: * Add CC_Ghc constructor to LlvmCallConvention. * Replace `maxSupportLlvmVersion`/`minSupportLlvmVersion` with a single `supportedLlvmVersion` variable. * Get `supportedLlvmVersion` from version specified in configure.ac. * Drop llvmVersion field from DynFlags (no longer needed because only one version is supported). Test Plan: Validate on x86_64 and arm Reviewers: bgamari, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1320 GHC Trac Issues: #10953
* Allow arr ∧ (first ∨ (***)) as minimal definition of Arrow instanceM Farkas-Dyck2015-10-131-7/+4
| | | | | | See #10216. Signed-off-by: Austin Seipp <austin@well-typed.com>
* base: Add forkOSWithUnmaskJoey Adams2015-10-132-2/+13
| | | | | | | | | | Fixes #8010, according to the specified libraries proposal. [1] Also, some minor wordsmithing. [1] http://thread.gmane.org/gmane.comp.lang.haskell.libraries/22709 Signed-off-by: Austin Seipp <austin@well-typed.com>
* docs: overhaul Derive{Functor,Foldable,Traversable} notesRyanGlScott2015-10-131-136/+207
| | | | | | | | | | | | | | | The previous users' guide documentation was too implementation-oriented. This attempts to make it more accessible to those who aren't familiar with how `-XDeriveFunctor` and friends work (and more importantly, what will not work when using them). Fixes #10831. Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D1293 GHC Trac Issues: #10831
* Fix incorrect import warnings when methods with identical names are importedÖmer Sinan Ağacan2015-10-139-6/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, GHC's warning generation code is assuming that a name (`RdrName`) can be imported at most once. This is a correct assumption, because 1) it's OK to import same names as long as we don't use any of them 2) when we use one of them, GHC generates an error because it doesn't disambiguate it automatically. But apparently the story is different with typeclass methods. If I import two methods with same names, it's OK to use them in typeclass instance declarations, because the context specifies which one to use. For example, this is OK (where modules A and B define typeclasses A and B, both with a function has), import A import B data Blah = Blah instance A Blah where has = Blah instance B Blah where has = Blah But GHC's warning generator is not taking this into account, and so if I change import list of this program to: import A (A (has)) import B (B (has)) GHC is printing these warnings: Main.hs:5:1: Warning: The import of ‘A.has’ from module ‘A’ is redundant Main.hs:6:1: Warning: The import of ‘B.has’ from module ‘B’ is redundant Why? Because warning generation code is _silently_ ignoring multiple symbols with same names. With this patch, GHC takes this into account. If there's only one name, then this patch reduces to the previous version, that is, it works exactly the same as current GHC (thanks goes to @quchen for realizing this). Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D1257 GHC Trac Issues: #10890
* Make dataToQa aware of Data instances which use functions to implement toConstrRyanGlScott2015-10-1324-64/+200
| | | | | | | | | | | | | | | | | | | | Trac #10796 exposes a way to make `template-haskell`'s `dataToQa` function freak out if using a `Data` instance that produces a `Constr` (by means of `toConstr`) using a function name instead of a data constructor name. While such `Data` instances are somewhat questionable, they are nevertheless present in popular libraries (e.g., `containers`), so we can at least make `dataToQa` aware of their existence. In order to properly distinguish strings which represent variables (as opposed to data constructors), it was necessary to move functionality from `Lexeme` (in `ghc`) to `GHC.Lexeme` in a new `ghc-boot` library (which was previously named `bin-package-db`). Reviewed By: goldfire, thomie Differential Revision: https://phabricator.haskell.org/D1313 GHC Trac Issues: #10796
* Slightly wibble TcSimplify documentationAlexander Berntsen2015-10-131-55/+57
| | | | | | | | | | Add some commas, fix some typos, etc. Signed-off-by: Alexander Berntsen <alexander@plaimi.net> Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D1321
* testsuite: attempt fixing T10935 outputAustin Seipp2015-10-121-1/+6
| | | | | | | | This fallout was caused by f8fbf385b879fe17740 (see #10935), and looks easy enough, but admittedly I just tried patching the output, so we're doing it live. Signed-off-by: Austin Seipp <austin@well-typed.com>
* Don't inline/apply other rules when simplifying a rule RHS.Andrew Farmer2015-10-123-18/+15
| | | | | | | | | | | | | | | | HERMIT users depend on RULES to specify equational properties. 7.10.2 performed both inlining and simplification in both sides of the rules, meaning they can't really be used for this. This breaks most HERMIT use cases. A separate commit already disabled this for the LHS of rules. This does so for the RHS. See Trac #10829 for nofib results. Reviewed By: austin, bgamari, simonpj Differential Revision: https://phabricator.haskell.org/D1246 GHC Trac Issues: #10829
* Reinstate monomorphism-restriction warningsSimon Peyton Jones2015-10-127-23/+39
| | | | | | | | | | | | This patch is driven by Trac #10935, and reinstates the -fwarn-monomorphism-restriction warning. It was first lost in 2010: d2ce0f52d "Super-monster patch implementing the new typechecker -- at last" I think the existing documentation is accurate; it is not even turned on by -Wall. I added one test.