summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Update transformer submodule to v0.5.2.0 releasewip/transformers-0.5.2Herbert Valerio Riedel2016-02-182-0/+1
| | | | | Most notably, this update pulls in documentation improvements and several INLINE pragmas.
* Comments only (#11513)Richard Eisenberg2016-02-171-0/+2
|
* users-guide: Fix typosMark Christiaens2016-02-171-4/+4
| | | | | | | | | | | | Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1927 GHC Trac Issues: #11590
* Remove superfluous code when deriving Foldable/TraversableRyanGlScott2016-02-176-96/+445
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, `-XDeriveFoldable` and `-XDeriveTraversable` generate unnecessary `mempty` and `pure` expressions when it traverses of an argument of a constructor whose type does not mention the last type parameter. Not only is this inefficient, but it prevents `Traversable` from being derivable for datatypes with unlifted arguments (see Trac #11174). The solution to this problem is to adopt a slight change to the algorithms for `-XDeriveFoldable` and `-XDeriveTraversable`, which is described in [this wiki page](https://ghc.haskell.org/trac/ghc/wiki/Commentary/Compiler/DeriveFu nctor#Proposal:alternativestrategyforderivingFoldableandTraversable). The wiki page also describes why we don't apply the same changes to the algorithm for `-XDeriveFunctor`. This is techincally a breaking change for users of `-XDeriveFoldable` and `-XDeriveTraversable`, since if someone was using a law-breaking `Monoid` instance with a derived `Foldable` instance (i.e., one where `x <> mempty` does not equal `x`) or a law-breaking `Applicative` instance with a derived `Traversable` instance, then the new generated code could result in different behavior. I suspect the number of scenarios like this is very small, and the onus really should be on those users to fix up their `Monoid`/`Applicative` instances. Fixes #11174. Test Plan: ./validate Reviewers: hvr, simonpj, austin, bgamari Reviewed By: simonpj, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1908 GHC Trac Issues: #11174
* Derive Eq and Ord instance for SrcLoc and RealSrcLocGabriel Gonzalez2016-02-171-28/+2
| | | | | | | | | | | | | | The Eq and Ord instance were previously hand-written and this change updates them to be automatically derived by the compiler. The derived behavior should be equivalent to the original. Reviewers: hvr, austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1913
* Fix #11313.Richard Eisenberg2016-02-177-29/+71
| | | | | Previously, we looked through synonyms when counting arguments, but that's a bit silly.
* Fix #11246.Richard Eisenberg2016-02-175-38/+72
| | | | | | | We have to instantiate any invisible arguments to type families right away. This is now done in tcTyCon in TcHsType. testcase: typecheck/should_compile/T11246
* Fix #11241.Richard Eisenberg2016-02-174-2/+21
| | | | | | | When renaming a type, now looks for wildcards in bound variables' kinds. testcase: dependent/should_compile/T11241
* Use CoercionN and friends in TyCoRepRichard Eisenberg2016-02-172-20/+21
|
* Remove extraneous fundeps on (~)Richard Eisenberg2016-02-171-1/+5
|
* Add missing kind cast to pure unifier.Richard Eisenberg2016-02-171-1/+1
|
* Existentials should be specified.Richard Eisenberg2016-02-171-1/+1
| | | | This addresses point (2) from #11513.
* Make exactTyCoVarsOfTypes closed over kinds.Richard Eisenberg2016-02-171-1/+1
|
* Small refactor and commentsSimon Peyton Jones2016-02-171-9/+25
| | | | Related to the fix to Trac #9611
* Simplify the defn of coreViewOneStarKindSimon Peyton Jones2016-02-171-6/+5
| | | | | I discussed it with Richard, but this version is much simmpler and more efficient.
* Comments onlySimon Peyton Jones2016-02-171-1/+1
|
* Testsuite: delete compiler_lt/le/gt/ge setup functionsThomas Miedema2016-02-1724-87/+43
| | | | | | | | Since we're not consisently keeping track of which tests should pass with which compiler versions, there is no point in keeping these functions. Update submodules containers, hpc and stm.
* DynFlags: Don't panic on incompatible Safe Haskell flagsBen Gamari2016-02-161-1/+1
| | | | | | | | | | | | | | | | | We just return an arbitrary value since we are destined to fail due to the error anyways. Fixes #11580. Test Plan: Needs to be tested Reviewers: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1925 GHC Trac Issues: #11580
* Remove documentation for -Wlazy-unlifted-bindingsBen Gamari2016-02-162-11/+0
| | | | | | | | | | | | | | | | | This flag was supposed to be removed in 7.10. This finally resolves Trac #8022. Test Plan: Read it Reviewers: austin Reviewed By: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1922 GHC Trac Issues: #8022
* Suggest candidate instances in error messageYuras Shumovich2016-02-164-5/+40
| | | | | | | | | | | | | | | | | | See Trac #9611. In "No instance..." error message we suggest instances for other types with the same occ name. It is usefull e.g. when we have two different versions of the same package installed. Test Plan: typecheck/should_fail/tcfail224 Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1919 GHC Trac Issues: #9611
* Fix typosRik Steenkamp2016-02-1613-35/+35
| | | | | | | | | | Reviewers: bgamari, austin Reviewed By: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1915
* PowerPC: Improve float register assignment.Peter Trommler2016-02-161-3/+9
| | | | | | | | | | | | | | | | | | On Linux assign F5 and F6 and D3 through D6 to caller-saved registers. Fixes #11273 Test Plan: validate on powerpc (I validated on powerpc64) Reviewers: bgamari, erikd, austin Reviewed By: erikd, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1914 GHC Trac Issues: #11273
* Fix two wrong uses of "data constructor" in error msgsRik Steenkamp2016-02-163-9/+15
| | | | | | | | | | | | | | | | | | | Replace `NoDataKinds :: PromotionErr` by `NoDataKindsTC` and `NoDataKindsDC` (just like there is `NoTypeInTypeTC` and `NoTypeInTypeDC`). This allows for a correct error message when a kind signature contains a type constructor and `-XDataKinds` is not specified. Apply a small fix to `TcError.hs` where instead of "data constructor" we should say "pattern synonym". Reviewers: austin, goldfire, bgamari Reviewed By: bgamari Subscribers: goldfire, thomie Differential Revision: https://phabricator.haskell.org/D1909
* Improved error message about exported type operators.Ulya Trofimovich2016-02-166-13/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | There is ambiguty between (1) type constructors and (2) data constructors in export lists, e.g. '%%' can stand for both of them. This ambiguity is resolved in favor of (2). If the exported data constructor is not in scope, but type constructor with the same name is in scope, GHC should suggest adding 'type' keyword to resolve ambiguity in favor of (1) and enabling 'TypeOperators' extension. The patch only extends the error message. See Trac #11432. Test Plan: `make test` Reviewers: simonpj, bgamari, austin Reviewed By: simonpj Subscribers: mpickering, thomie, goldfire, kosmikus Differential Revision: https://phabricator.haskell.org/D1902 GHC Trac Issues: #11432
* Make bootstrapping more robustHerbert Valerio Riedel2016-02-162-1/+19
| | | | | | | | | | | | | | | Starting with GHC 8.0 we rely on GHC's native cabal macro generation. As a side-effect, this limits the packages in scope when compiling `ghc-cabal` for all bootstrapping GHCs. Reviewers: ezyang, austin, thomie, bgamari Reviewed By: thomie, bgamari Differential Revision: https://phabricator.haskell.org/D1897 GHC Trac Issues: #11413
* Bump haddock submoduleBen Gamari2016-02-161-0/+0
|
* Testsuite: delete only_compiler_types, assume ghcThomas Miedema2016-02-166-30/+45
| | | | | | Update submodules stm, hpc and unix. Differential Revision: https://phabricator.haskell.org/D1921
* Add missing newlines at end of file [skip ci]Thomas Miedema2016-02-168-8/+8
|
* Rename missing-pat-syn-sigs to missing-pat-syn-signaturesMatthew Pickering2016-02-155-6/+6
|
* Make T11361 actually run with reversed uniquesBartosz Nitka2016-02-152-3/+3
| | | | | | | | | | | | | | `-dunique-increment` doesn't work inside the file. Test Plan: I've discovered it doesn't work in D1917. Reviewers: simonpj, bgamari, austin Subscribers: thomie, simonmar Differential Revision: https://phabricator.haskell.org/D1918 GHC Trac Issues: #11361
* Add a testcase for #11362Bartosz Nitka2016-02-152-0/+28
| | | | | | | | | | | | | | | | This reproduces the issue that I encountered in #11362. Test Plan: this testcase Reviewers: simonpj, bgamari, austin Reviewed By: simonpj Subscribers: thomie, simonmar Differential Revision: https://phabricator.haskell.org/D1917 GHC Trac Issues: #11362
* A tiny, outright bug in tcDataFamInstDeclSimon Peyton Jones2016-02-154-15/+39
| | | | | | | | | | | | | | This bug was revealed by Trac #11362. It turns out that in my patch for Trac #11148 (namely 1160dc5), I failed to turn one occurrence of tvs' into full_tvs. Sigh. This is tricky stuff and it cost me several hours to page it back in and figure out what was happening. The result was a CoAxiom whose lhs had rhs had different kinds. Eeek! Anyway it's fixed. I also added an ASSERT, in FamInst.newFamInst, that trips on such bogus CoAxioms.
* Comments and white spaceSimon Peyton Jones2016-02-151-2/+7
|
* Tiny refactor; use guards instead of 'if'Simon Peyton Jones2016-02-151-7/+7
|
* Document -dynamic-too (#11488)Simon Marlow2016-02-154-19/+36
|
* Comments onlySimon Peyton Jones2016-02-155-6/+30
|
* Improve error message suppressionSimon Peyton Jones2016-02-156-104/+56
| | | | | | | | | TcErrors has a system for suppressing some type errors if a more serious one occurs. But there was a crucial missing case, which sometimes resulted in a cascade of irrelevant errors overwhelming the actual cause. This was Trac #11541. The fix is simple. Worth merging to 8.0
* Update directory submodule to v1.2.5.1 releaseHerbert Valerio Riedel2016-02-141-0/+0
|
* renamer discards name location for HsRecFieldAlan Zimmerman2016-02-141-2/+3
| | | | | | | When renaming a HsVar it can be converted to a HsRecField. In the process the location of the enclosed name is converted to a noLoc Closes #11576
* testsuite: tweak error messages for new Show instanceSergei Trofimovich2016-02-125-7/+7
| | | | | | | | | | | | | | | be3d7f661968a7b8c6751c0be3bf23e703b32c3e added Show instance for Callstack. That made a couple of error messages to drift as: instance Show Ordering -- Defined in ‘GHC.Show’ instance Show Integer -- Defined in ‘GHC.Show’ ...plus 23 others - ...plus 20 instances involving out-of-scope types + ...plus 21 instances involving out-of-scope types Signed-off-by: Sergei Trofimovich <siarheit@google.com>
* User manual improvmentsSimon Peyton Jones2016-02-121-867/+879
| | | | | | | | - Document that you can use 'forall' in instance decls - Change the sections a bit, so that big sections (like lexically scoped type variables, pattern synonyms, implicit parameters) become more visible
* Minor refactoring to tauifyMultipleMatchesSimon Peyton Jones2016-02-122-16/+15
| | | | No change in behaviour
* Improve pretty-printing of HsWrappersSimon Peyton Jones2016-02-126-56/+64
| | | | | | | | Reduces un-neede parens. Also -fprint-typechecker-elaboration now makes type applications and casts in expressions also appear. (Previously those were confusingly controlled by -fprint-explicit-coercions.)
* Beef up tc124Simon Peyton Jones2016-02-121-4/+10
| | | | Makes it a slightly more stringent test of record pattern bindings
* Simplify AbsBinds wrappingSimon Peyton Jones2016-02-127-252/+186
| | | | | | | | | | | | | | | | | | | | | | In poking Trac #11414 I found myself sinking into the abe_inst_wrap swamp. What is this strange thing? (It turned out that #11414 was breaking because of it.) Thrillingly, I found a way to sweep it away again, putting the deep instantation into tcMonoBinds instead of mkExport; and it turned out that the fun_co_fn field of FunBind was already there ready to receive exactly this wrapper. Hooray. Result * Death to abe_inst_wrap * Death to mbi_orig * Death to the plumbing in tcPolyInfer that did the deep instantiation I did find that I had to re-engineer the treatment of instance type signatures (again), but the result looks more modular and robust to me. And #11414 is fixed.
* Revert "Build the substitution correctly in piResultTy"Bartosz Nitka2016-02-121-20/+6
| | | | | | | | | | | | | This reverts commit dbf72dbc6e49b3db7f2337a7a41e95c1d0169163. This commit introduced performance regressions: https://ghc.haskell.org/trac/ghc/ticket/11371#comment:27, I will push it again after I fix it. Test Plan: revert Reviewers: simonpj, bgamari, simonmar, austin, goldfire, thomie Differential Revision: https://phabricator.haskell.org/D1907
* Add IsList instance for CallStack, restore Show instance for CallStackRyanGlScott2016-02-126-6/+32
| | | | | | | | | | | | | | | | | | | | Summary: Ties up loose ends from D1894. GHC 7.10.2 and 7.10.3 featured a `Show` instance for `CallStack`, but since it was derived, it broke encapsulation. This adds a `Show` instance which displays the `CallStack` as if it were a `[(String, SrcLoc)]`. To ensure that the output of `Show` is technically a valid Haskell term, we also add a corresponding `IsList CallStack` instance. Reviewers: gridaphobe, austin, hvr, bgamari Reviewed By: gridaphobe, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1903
* Revert "sizeExpr: fix a bug in the size calculation"Simon Marlow2016-02-121-15/+3
| | | | This reverts commit 51a33924fc118d9b6c1db556c75c0d010ef95e18.
* Add test for #11319Reid Barton2016-02-112-0/+7
|
* Build the substitution correctly in piResultTyBartosz Nitka2016-02-111-6/+20
| | | | | | | | | | | | | | | | | | This fixes a bug where piResultTy created substitutions that would violate both of the invariants in Note [The substitution invariant]. Test Plan: ./validate --slow Reviewers: goldfire, simonpj, austin, bgamari Reviewed By: simonpj, bgamari Subscribers: simonmar, thomie Differential Revision: https://phabricator.haskell.org/D1855 GHC Trac Issues: #11371