summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/master' into wip/orf-rebootwip/orf-rebootAdam Gundry2015-10-16448-44079/+38749
|\ | | | | | | | | | | | | Conflicts: compiler/rename/RnNames.hs compiler/typecheck/TcRnMonad.hs utils/haddock
| * 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.
| * Test Trac #10931Simon Peyton Jones2015-10-122-0/+26
| |
| * base: MRP-refactoring of AMP instancesHerbert Valerio Riedel2015-10-1218-65/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This refactors `(>>)`/`(*>)`/`return`/`pure` methods into normal form. The redundant explicit `return` method definitions are dropped altogether. The explicit `(>>) = (*>)` definitions can't be removed yet, as the default implementation of `(>>)` is still in terms of `(*>)` (even though that should have been changed according to the AMP but wasn't -- see note in GHC.Base for details why this had to be postponed) A nofib comparision shows this refactoring to result in minor runtime improvements (unless those are within normal measurement fluctuations): Program Size Allocs Runtime Elapsed TotalMem ------------------------------------------------------------------------- Min -0.0% -0.0% -1.6% -3.9% -1.1% Max -0.0% +0.0% +0.5% +0.5% 0.0% Geometric Mean -0.0% -0.0% -0.4% -0.5% -0.0% Full `nofib` report at https://phabricator.haskell.org/P68 Reviewers: quchen, alanz, austin, #core_libraries_committee, bgamari Reviewed By: bgamari Differential Revision: https://phabricator.haskell.org/D1316
| * PPC: Fix right shift by 32 bits #10870Erik de Castro Lopo2015-10-124-6/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Test included. Test Plan: Run test T10870.hs on X86/X86_64/Arm/Arm64 etc Reviewers: bgamari, nomeata, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1322 GHC Trac Issues: #10870
| * compiler/nativeGen/PPC/Ppr.hs: WhitespaceErik de Castro Lopo2015-10-121-7/+7
| |
| * Delete ShPackageKey for now.Edward Z. Yang2015-10-104-304/+0
| | | | | | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
| * Testsuite: T3333 still fails on non-linux statically linked ghci (#3333)Thomas Miedema2015-10-101-1/+1
| |
| * sphinx: Don't share doctrees between targetsBen Gamari2015-10-101-3/+6
| | | | | | | | | | | | Sphinx may trip over itself when multiple instances are run in parallel. Fixes #10950.
| * Rename SpecInfo to RuleInfo (upon SPJ's advice).Edward Z. Yang2015-10-1016-88/+88
| | | | | | | | | | | | | | | | | | | | | | | | Test Plan: validate Reviewers: simonpj, austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1319
| * Keep `shift{L,R}` on `Integer` from segfaultingBen Gamari2015-10-102-8/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This can happen because the underlying primitive operations in `integer-gmp` don't support negative shift-amounts, and since `integer-gmp` can't throw proper exceptions and just provides a low-level API, it simply segfaults instead... This patch simply removes the `shift{L,R}` method definitions (and defines `unsafeShift{L,R}` instead) whose default-impls fallback on using `shift` which properly handles negative shift arguments. This addresses #10571 Test Plan: harbormaster can do it Reviewers: hvr, austin, rwbarton Subscribers: rwbarton, thomie, bgamari Differential Revision: https://phabricator.haskell.org/D1018 GHC Trac Issues: #10571
| * Add short library names support to Windows linkerTamar Christina2015-10-109-16/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make Linker.hs try asking gcc for lib%s.dll as well, also changed tryGcc to pass -L to all components by using -B instead. These two fix shortnames linking on windows. re-enabled tests: ghcilink003, ghcilink006 and T3333 Added two tests: load_short_name and enabled T1407 on windows. Reviewed By: thomie, bgamari Differential Revision: https://phabricator.haskell.org/D1310 GHC Trac Issues: #9878, #1407, #1883, #5289
| * Fix error msg: ghci can't be used with -prof or -static (#10936)Thomas Miedema2015-10-101-1/+1
| | | | | | | | | | | | Reviewed by: austin Differential Revision: https://phabricator.haskell.org/D1314
| * Revert "Switch to LLVM version 3.7"Erik de Castro Lopo2015-10-105-24/+30
| | | | | | | | | | | | Pushed by mistacke before it was ready. This reverts commit 5dc3db743ec477978b9727a313951be44dbd170f.
| * Switch to LLVM version 3.7Erik de Castro Lopo2015-10-105-33/+27
| |
| * Simplify type of ms_srcimps and ms_textual_imps.Edward Z. Yang2015-10-095-35/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Previously, we stored an entire ImportDecl, which was pretty wasteful since all we really cared about was the package qualifier and the module name. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: bgamari, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1317
| * Ignore __pycache__.Edward Z. Yang2015-10-091-0/+1
| | | | | | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
| * Disable man building for most quick build styles.Edward Z. Yang2015-10-0911-0/+11
| | | | | | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
| * Extra files to ignore from the new Restructured documentation.Edward Z. Yang2015-10-091-0/+3
| | | | | | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
| * Move orphan instance/rule warnings to typechecker/desugarer.Edward Z. Yang2015-10-0813-118/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Instead of doing these warnings at MkIface time, we do them when we create the instances/rules in the typechecker/desugarer. Emitting warnings for auto-generated instances was a pain (since the specialization monad doesn't have the capacity to emit warnings) so instead I just deprecated -fwarn-auto-orphans. Auto rule orphans are pretty harmless anyway: they don't cause interface files to be eagerly loaded in. Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonpj, austin, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1297
| * Tests for #10945 and #10946Jan Stolarek2015-10-083-0/+24
| |
| * Parser: revert some error messages to what they were before 7.10Thomas Miedema2015-10-078-34/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Among doing other things, Phab:D201 (bc2289e13d9586be087bd8136943dc35a0130c88) tried to improve the error messages thrown by the parser. For example a missing else clause now prints "parse error in if statement: else clause empty" instead of "parse error (possibly incorrect indentation or mismatched brackets)". Some error messages got much worse however (see tests), and the result seems to be a net negative. Although not entirely satisfactory, this commits therefore reverts those parser changes. Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D1309 GHC Trac Issues: #10498
| * Allow non-operator infix pattern synonymsMatthew Pickering2015-10-073-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | For example ``` pattern head `Cons` tail = head : tail ``` Reviewed By: goldfire, austin Differential Revision: https://phabricator.haskell.org/D1295 GHC Trac Issues: #10747
| * Improve error messages for ambiguous type variablesDavid Kraeutmann2015-10-0721-98/+173
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improved error messages are only printed when the old message would be "No instance for...", since they're not as helpful for "Could not deduce..." No special test case as error messages are tested by other tests already. Signed-off-by: David Kraeutmann <kane@kane.cx> Reviewed By: austin, goldfire Differential Revision: https://phabricator.haskell.org/D1182 GHC Trac Issues: #10733
| * Ensure shiftL/shiftR arguments aren't negativeBen Gamari2015-10-071-2/+6
| | | | | | | | Fixes #10571.
| * AsmCodeGen: Ensure LLVM .line directives are sortedBen Gamari2015-10-071-2/+6
| | | | | | | | | | | | | | | | Apparently some Clang 3.6 expects these to be sorted. Patch due to Peter Wortmann. Fixes #10687.
| * Documentation for FrontendResultEdward Z. Yang2015-10-061-0/+8
| | | | | | | | Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
| * Comments about TcLevel assignmentSimon Peyton Jones2015-10-061-1/+21
| | | | | | | | Triggered by investigations around Trac 10845
| * Comments onlySimon Peyton Jones2015-10-061-0/+3
| |
| * Remove dead code: ruleLhsOrphNamesSimon Peyton Jones2015-10-062-17/+1
| |