- 18 May, 2015 1 commit
-
-
Joachim Breitner authored
Previously, the hash function used to cut down the number of block comparisons did not take local registers into account, causing far too many similar, but different bocks to be considered candidates for the (expensive!) comparision. Adding register to the hash takes CmmCommonBlockElim's share of the runtime of the example in #10397 from 17% to 2.5%, and eliminates all unwanted hash collisions. This patch also replaces the fancy trie by a plain Data.Map. It turned out to be not performance critical, so this simplifies the code. Differential Revision: https://phabricator.haskell.org/D896
-
- 16 May, 2015 2 commits
-
-
Joachim Breitner authored
When working on #10397, I noticed that "reorder" in nativeCodeGen/seqBlocks took more than 60% of the time. With this refactoring, it does not even show up in the profile any more. This fixes #10422. Differential Revision: https://phabricator.haskell.org/D893
-
Joachim Breitner authored
This is an attempt to improve the situation described in #10397, where the linear scan of possible candidates for commoning up is far too expensive. There is (ever) more room for improvement, but this is a start. Differential Revision: https://phabricator.haskell.org/D892
-
- 15 May, 2015 1 commit
-
-
Edward Z. Yang authored
Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu>
-
- 14 May, 2015 3 commits
-
-
Edward Z. Yang authored
Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu>
-
Zejun Wu authored
Do not check dir perms when .ghci doesn't exist, otherwise GHCi will print some confusing and useless warnings in some cases (e.g. in travis). This will fix test T8333 and T10408A in travis. T10408A will be a test case to cover this. And T8333 is changed to be not affected by this. Test Plan: chmod o+w ~/.ghc make TESTS="T8333 T10408A T10408B" chmod o-w ~/.ghc Reviewers: austin, nomeata Differential Revision: https://phabricator.haskell.org/D890
-
Austin Seipp authored
This reverts multiple commits from Simon: - 04a484ea Test Trac #10359 - a9ccd37a Test Trac #10403 - c0aae6f6 Test Trac #10248 - eb6ca851 Make the "matchable-given" check happen first - ca173aa3 Add a case to checkValidTyCon - 51cbad15 Update haddock submodule - 6e1174da Separate transCloVarSet from fixVarSet - a8493e03 Fix imports in HscMain (stage2) - a154944b Two wibbles to fix the build - 5910a1bc Change in capitalisation of error msg - 130e93aa Refactor tuple constraints - 8da785d5 Delete commented-out line These break the build by causing Haddock to fail mysteriously when trying to examine GHC.Prim it seems.
-
- 13 May, 2015 13 commits
-
-
Simon Peyton Jones authored
-
Simon Peyton Jones authored
-
Simon Peyton Jones authored
-
Simon Peyton Jones authored
This change makes the matchable-given check apply uniformly to - constraint tuples - natural numbers - Typeable as well as to vanilla class constraints. See Note [Instance and Given overlap] in TcInteract
-
Simon Peyton Jones authored
Apparently when Haddock'ing, we check GHC.Prim. So checkValidTyCon must not crash when dealing with PrimTyCons; and it was doing so in dataConStupidTheta. The fix is easy, but I'm puzzled about why Haddock needs to typecheck GHC.Prim.
-
Simon Peyton Jones authored
The location of setRdrNameSpace has changed in GHC. (Sadly, the build still fails with a tyConStupidTheta failure in a haddock invocation; I have no idea why. But at least Haddock itself builds.)
-
Simon Peyton Jones authored
I wasn't clear about the distinction before, and that led to a bug when I refactored FunDeps.oclose to use transCloVarSet; it should use fixVarSet.
-
Simon Peyton Jones authored
-
Simon Peyton Jones authored
...following the constraint-tuple patch. * There was interaction with the recent Safe Haskell change * Haddock comoplained about constraint tuples defined but not used
-
Simon Peyton Jones authored
-outofmem.exe: Out of memory +outofmem.exe: out of memory
-
Simon Peyton Jones authored
Make tuple constraints be handled by a perfectly ordinary type class, with the component constraints being the superclasses: class (c1, c2) => (c2, c2) This change was provoked by #10359 inability to re-use a given tuple constraint as a whole #9858 confusion between term tuples and constraint tuples but it's generally a very nice simplification. We get rid of - In Type, the TuplePred constructor of PredTree, and all the code that dealt with TuplePreds - In TcEvidence, the constructors EvTupleMk, EvTupleSel See Note [How tuples work] in TysWiredIn. Of course, nothing is ever entirely simple. This one proved quite fiddly. - I did quite a bit of renaming, which makes this patch touch a lot of modules. In partiuclar tupleCon -> tupleDataCon. - I made constraint tuples known-key rather than wired-in. This is different to boxed/unboxed tuples, but it proved awkward to have all the superclass selectors wired-in. Easier just to use the standard mechanims. - While I was fiddling with known-key names, I split the TH Name definitions out of DsMeta into a new module THNames. That meant that the known-key names can all be gathered in PrelInfo, without causing module loops. - I found that the parser was parsing an import item like T( .. ) as a *data constructor* T, and then using setRdrNameSpace to fix it. Stupid! So I changed the parser to parse a *type constructor* T, which means less use of setRdrNameSpace. I also improved setRdrNameSpace to behave better on Exact Names. Largely on priciple; I don't think it matters a lot. - When compiling a data type declaration for a wired-in thing like tuples (,), or lists, we don't really need to look at the declaration. We have the wired-in thing! And not doing so avoids having to line up the uniques for data constructor workers etc. See Note [Declarations for wired-in things] - I found that FunDeps.oclose wasn't taking superclasses into account; easily fixed. - Some error message refactoring for invalid constraints in TcValidity
-
Simon Peyton Jones authored
-
Austin Seipp authored
This caused print007 to fail, so I guess I botched this more than I thought. This is a combination of reverting: "Fix build breakage from 9736c042", commit f35d621d. "compiler: make sure we reject -O + HscInterpreted", commit 9736c042.
-
- 12 May, 2015 12 commits
-
-
Javran Cheng authored
Fix fragile tests according to comment 13 of #9579 (by @bherzog) Done by capturing stderr and replace `xx bytes` with `NUM bytes` (literal). Some numbers like `(1 MB)` would still remain, but I think it's safe to assume the actual difference in bytes (on different architectures) is too small to have an effect on the rounded megabyte value. Test Plan: validate Reviewers: erikd, austin Reviewed By: erikd, austin Subscribers: erikd, bgamari, thomie, bherzog Differential Revision: https://phabricator.haskell.org/D882 GHC Trac Issues: #9579
-
David Terei authored
Biggest change is to document new overlapping instances behavior. We also add back in the explanation of GND being restricted, and improve the docs across the board.
-
David Terei authored
-
Edward Z. Yang authored
Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu>
-
Alan Zimmerman authored
Summary: There is a problem where harbourmaster builds complain about a bad boolFormula.stderr ghc-api/annotations boolFormula [bad stderr] (normal) The problem does not occur for a local build on my box This patch turns off warnings for this test, to get rid of the stderr issue. Test Plan: ./validate Reviewers: hvr, austin Reviewed By: austin Subscribers: bgamari, thomie, hvr Differential Revision: https://phabricator.haskell.org/D888
-
Zejun Wu authored
* Make `-ghci-script` be executed in the order they are specified; * Make `-ignore-dot-ghci` only ignores the default .ghci files but still execute the scripts passed by `-ghci-script`. Reviewed By: simonmar, austin Differential Revision: https://phabricator.haskell.org/D887 GHC Trac Issues: #10408
-
Alan Zimmerman authored
Otherwise the test sometimes fails.
-
Erik de Castro Lopo authored
The <$> operator is only available in the standard Prelude in ghc 7.10 and later. Signed-off-by:
Erik de Castro Lopo <erikd@mega-nerd.com> Test Plan: build with ghc-7.6 Reviewers: dterei, ezyang, austin Subscribers: bgamari, thomie Differential Revision: https://phabricator.haskell.org/D886 GHC Trac Issues: #10407
-
Edward Z. Yang authored
Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate on 7.6 Reviewers: austin, goldfire Subscribers: bgamari, thomie Differential Revision: https://phabricator.haskell.org/D885
-
David Terei authored
We do much better now due to the newish per-instance flags. Rather than mark any module that uses `-XOverlappingInstances`, `-XIncoherentInstances` or the new `OVERLAP*` pragmas as unsafe, we regard them all as safe and defer the check until an overlap occurs. An type-class method call that involves overlapping instances is considered _unsafe_ when: 1) The most specific instance, Ix, is from a module marked `-XSafe` 2) Ix is an orphan instance or a MPTC 3) At least one instance that Ix overlaps, Iy, is: a) from a different module than Ix AND b) Iy is not marked `OVERLAPPABLE` This check is only enforced in modules compiled with `-XSafe` or `-XTrustworthy`. This fixes Safe Haskell to work with the latest overlapping instance pragmas, and also brings consistent behavior. Previously, Safe Inferred modules behaved differently than `-XSafe` modules.
-
David Terei authored
Instances in Safe Inferred modules weren't marked being marked as coming from a Safe module.
-
Edward Z. Yang authored
Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu>
-
- 11 May, 2015 8 commits
-
-
Edward Z. Yang authored
Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu>
-
Edward Z. Yang authored
Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu>
-
Edward Z. Yang authored
Summary: This commit adds stage 1 support for Template Haskell quoting, e.g. [| ... expr ... |], which is useful for authors of quasiquoter libraries that do not actually need splices. The TemplateHaskell extension now does not unconditionally fail; it only fails if the renamer encounters a splice that it can't run. In order to make sure the referenced data structures are consistent, template-haskell is now a boot library. There are some minor BC changes to template-haskell to make it boot on GHC 7.8. Note for reviewer: big diff changes are simply code being moved out of an ifdef; there was no other substantive change to that code. Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu> Test Plan: validate Reviewers: simonpj, austin, goldfire Subscribers: bgamari, thomie Differential Revision: https://phabricator.haskell.org/D876 GHC Trac Issues: #10382
-
Alan Zimmerman authored
Summary: The production for decl_no_th starts decl_no_th :: { Located (OrdList (LHsDecl RdrName)) } : sigdecl { $1 } | '!' aexp rhs {% do { let { e = sLL $1 $> (SectionR (sL1 $1 (HsVar bang_RDR)) $2) }; pat <- checkPattern empty e; ... The e value should be just the pattern, excluding the rhs, but the span created includes the rhs. Test Plan: ./validate Reviewers: hvr, austin Reviewed By: austin Subscribers: bgamari, thomie, mpickering Differential Revision: https://phabricator.haskell.org/D873 GHC Trac Issues: #10358
-
Alan Zimmerman authored
Summary: The Parser.y production for pquals is pquals :: { Located [[LStmt RdrName (LHsExpr RdrName)]] } : squals '|' pquals {% addAnnotation (gl $ last $ unLoc $1) AnnVbar (gl $2) >> return (sLL $1 $> (reverse (unLoc $1) : unLoc $3)) } | squals { L (getLoc $1) [reverse (unLoc $1)] } The squals are returned in reverse order, so the AnnVbar should be attached to the head of the list, not the last. Test Plan: ./validate Reviewers: hvr, austin Reviewed By: austin Subscribers: thomie, mpickering Differential Revision: https://phabricator.haskell.org/D869 GHC Trac Issues: #10357
-
Austin Seipp authored
This was a snaffu caused by my in-tree patch actually differing from the Phab one slightly. Whoops. Signed-off-by:
Austin Seipp <austin@well-typed.com>
-
Alan Zimmerman authored
Summary: The MINIMAL pragma is captured in the parser using a BooleanFormula. The constructors (mkBool,mkAnd,mkOr) are smart and try to minimise the boolean formula as it is constructed. This discards the original information, making round tripping impossible. Note: there is another version which provides a more API Annotations friendly version of the MINIMAL pragma, but this requires changes to haddock, which will cause problems for 7.10.2. See https://github.com/alanz/ghc/tree/wip/10287 Test Plan: ./validate Reviewers: hvr, austin Reviewed By: austin Subscribers: bgamari, Fuuzetsu, thomie, mpickering Differential Revision: https://phabricator.haskell.org/D837 GHC Trac Issues: #10287
-
Austin Seipp authored
When using GHCi, we explicitly reject optimization, because the compilers optimization passes can introduce unboxed tuples, which the interpreter is not able to handle. But this goes the other way too: using GHCi on optimized code may cause the optimizer to float out breakpoints that the interpreter introduces. This manifests itself in weird ways, particularly if you as an API client use custom DynFlags to introduce optimization in combination with HscInterpreted. It turns out we weren't checking for consistent DynFlag settings when doing `setSessionDynFlags`, as #10052 showed. While the main driver handled it in `DynFlags` via `parseDynamicFlags`, we didn't check this elsewhere. This does a little refactoring to split out some of the common code, and immunizes the various `DynFlags` utilities in the `GHC` module from this particular bug. We should probably be checking other general invariants too. This fixes #10052, and adds some notes about the behavior in `GHC` and `FloatOut` As a bonus, expose `warningMsg` from `ErrUtils` as a helper since it didn't exist (somehow). Signed-off-by:
Austin Seipp <austin@well-typed.com> Reviewed By: edsko Differential Revision: https://phabricator.haskell.org/D727 GHC Trac Issues: #10052
-