- 22 Jan, 2017 5 commits
-
-
Edward Z. Yang authored
Forgot to handle these! In they go, plus a test case. Signed-off-by:
Edward Z. Yang <ezyang@cs.stanford.edu>
-
The `clean_cmd` and `extra_clean` setup functions don't do anything. Remove them from .T files. Created using https://github.com/thomie/refactor-ghc-testsuite. This diff is a test for the .T-file parser/processor/pretty-printer in that repository. find . -name '*.T' -exec ~/refactor-ghc-testsuite/Main "{}" \; Tests containing inline comments or multiline strings are not modified. Preparation for #12223. Test Plan: Harbormaster Reviewers: austin, hvr, simonmar, mpickering, bgamari Reviewed By: mpickering Subscribers: mpickering Differential Revision: https://phabricator.haskell.org/D3000 GHC Trac Issues: #12223
-
Ben Gamari authored
These are only failing on Darwin, strangely enough, but do so quite reproducibly.
-
Ben Gamari authored
-
Ryan Scott authored
Summary: This reverts commit a0899b2f. This is because removing these checks prompts panics in at least two different programs reported in #12785. Test Plan: ./validate Reviewers: simonpj, goldfire, bgamari, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2931 GHC Trac Issues: #12785
-
- 21 Jan, 2017 1 commit
-
-
niteria authored
Currently we use `-Wl` which takes a list of comma-separated options. Unfortunately that breaks when you use it with `-rpath` and a path that has commas in them. Buck, the build system, produces paths with commas in them. `-Xlinker` doesn't have this disadvantage and as far as I can tell is supported by both `gcc` and `clang`. Anecdotally `nvcc` supports `-Xlinker`, but not `-Wl`. Test Plan: ./validate, harbourmaster Reviewers: nomeata, simonmar, austin, bgamari, hvr Reviewed By: simonmar, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2971
-
- 20 Jan, 2017 12 commits
-
-
Introduce a warning, -Wmissing-home-modules, to warn about home modules, not listed in command line. It is usefull for cabal when user fails to list a module in `exposed-modules` and `other-modules`. Test Plan: make TEST=MissingMod Reviewers: mpickering, austin, bgamari Reviewed By: bgamari Subscribers: simonpj, mpickering, thomie Differential Revision: https://phabricator.haskell.org/D2977 GHC Trac Issues: #13129
-
Test Plan: GHC CI Reviewers: austin, hvr, bgamari Reviewed By: bgamari Subscribers: thomie, erikd Differential Revision: https://phabricator.haskell.org/D2993
-
Test Plan: harbormaster Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2991
-
Reviewers: austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2990 GHC Trac Issues: #13099
-
This fixes #12441, where definitions in a Haskell module and its boot file which differed only in their quantifiers produced a confusing error message. Here we teach GHC to always show quantifiers for these errors. Reviewers: goldfire, simonmar, erikd, austin, hvr, bgamari Reviewed By: bgamari Subscribers: snowleopard, simonpj, mpickering, thomie Differential Revision: https://phabricator.haskell.org/D2734 GHC Trac Issues: #12441
-
This commits relaxes the invariants of the Core syntax so that a top-level variable can be bound to a primitive string literal of type Addr#. This commit: * Relaxes the invatiants of the Core, and allows top-level bindings whose type is Addr# as long as their RHS is either a primitive string literal or another variable. * Allows the simplifier and the full-laziness transformer to float out primitive string literals to the top leve. * Introduces the new StgGenTopBinding type to accomodate top-level Addr# bindings. * Introduces a new type of labels in the object code, with the suffix "_bytes", for exported top-level Addr# bindings. * Makes some built-in rules more robust. This was necessary to keep them functional after the above changes. This is a continuation of D2554. Rebasing notes: This had two slightly suspicious performance regressions: * T12425: bytes allocated regressed by roughly 5% * T4029: bytes allocated regressed by a bit over 1% * T13035: bytes allocated regressed by a bit over 5% These deserve additional investigation. Rebased by: bgamari. Test Plan: ./validate --slow Reviewers: goldfire, trofi, simonmar, simonpj, austin, hvr, bgamari Reviewed By: trofi, simonpj, bgamari Subscribers: trofi, simonpj, gridaphobe, thomie Differential Revision: https://phabricator.haskell.org/D2605 GHC Trac Issues: #8472
-
Ben Gamari authored
-
Reviewers: dfeuer, austin, bgamari, hvr Subscribers: dfeuer, mpickering, RyanGlScott, ekmett, yav, lelf, simonpj, thomie Differential Revision: https://phabricator.haskell.org/D2632 GHC Trac Issues: #12162
-
rwbarton authored
-
Simon Peyton Jones authored
-
Simon Peyton Jones authored
Trac #13156 showed a lost opportunity for CSE. I found that it was easy to fix, and it had the nice side effect of rendering a previous nasty case, described in Note [Corner case for case expressions], unnecessary. Simpler code, does more. Great.
-
Simon Peyton Jones authored
This bug has been lurking for ages: Trac #13155 The important semantic change is to ensure that exprIsExpandable returns False for primop calls. Previously exprIsExpandable used exprIsCheap' which always used primOpIsCheap. I took the opportunity to combine the code for exprIsCheap' (two variants: exprIsCheap and exprIsExpandable) with that for exprIsWorkFree. Result is simpler, tighter, easier to understand. And correct (at least wrt this bug)!
-
- 19 Jan, 2017 4 commits
-
-
Eric Mertens pointed out that using the default `foldMap` implementation for `Maybe` led to an efficiency problem by implementing `foldMap f (Just x)` as `f x <> mempty` rather than as `f x`. This should solve the problem. Reviewers: hvr, austin, bgamari Reviewed By: bgamari Subscribers: glguy, thomie Differential Revision: https://phabricator.haskell.org/D2988
-
dobenour authored
Summary: If Perl isn't needed, we don't need to error out. Since all Perl is used for is the splitter, we can just warn. Test Plan: GHC CI Reviewers: bgamari, hvr, austin Reviewed By: bgamari Subscribers: thomie, erikd Differential Revision: https://phabricator.haskell.org/D2986 GHC Trac Issues: #13141
-
Ryan Scott authored
Following e7985ed2. HasDebugCallStack now appears in IdInfo, which requires `FlexibleContexts` to be enabled when built with GHC 7.10.
-
Richard Eisenberg authored
This commit implements the proposal in https://github.com/ghc-proposals/ghc-proposals/pull/29 and https://github.com/ghc-proposals/ghc-proposals/pull/35. Here are some of the pieces of that proposal: * Some of RuntimeRep's constructors have been shortened. * TupleRep and SumRep are now parameterized over a list of RuntimeReps. * This means that two types with the same kind surely have the same representation. Previously, all unboxed tuples had the same kind, and thus the fact above was false. * RepType.typePrimRep and friends now return a *list* of PrimReps. These functions can now work successfully on unboxed tuples. This change is necessary because we allow abstraction over unboxed tuple types and so cannot always handle unboxed tuples specially as we did before. * We sometimes have to create an Id from a PrimRep. I thus split PtrRep * into LiftedRep and UnliftedRep, so that the created Ids have the right strictness. * The RepType.RepType type was removed, as it didn't seem to help with * much. * The RepType.repType function is also removed, in favor of typePrimRep. * I have waffled a good deal on whether or not to keep VoidRep in TyCon.PrimRep. In the end, I decided to keep it there. PrimRep is *not* represented in RuntimeRep, and typePrimRep will never return a list including VoidRep. But it's handy to have in, e.g., ByteCodeGen and friends. I can imagine another design choice where we have a PrimRepV type that is PrimRep with an extra constructor. That seemed to be a heavier design, though, and I'm not sure what the benefit would be. * The last, unused vestiges of # (unliftedTypeKind) have been removed. * There were several pretty-printing bugs that this change exposed; * these are fixed. * We previously checked for levity polymorphism in the types of binders. * But we also must exclude levity polymorphism in function arguments. This is hard to check for, requiring a good deal of care in the desugarer. See Note [Levity polymorphism checking] in DsMonad. * In order to efficiently check for levity polymorphism in functions, it * was necessary to add a new bit of IdInfo. See Note [Levity info] in IdInfo. * It is now safe for unlifted types to be unsaturated in Core. Core Lint * is updated accordingly. * We can only know strictness after zonking, so several checks around * strictness in the type-checker (checkStrictBinds, the check for unlifted variables under a ~ pattern) have been moved to the desugarer. * Along the way, I improved the treatment of unlifted vs. banged * bindings. See Note [Strict binds checks] in DsBinds and #13075. * Now that we print type-checked source, we must be careful to print * ConLikes correctly. This is facilitated by a new HsConLikeOut constructor to HsExpr. Particularly troublesome are unlifted pattern synonyms that get an extra void# argument. * Includes a submodule update for haddock, getting rid of #. * New testcases: typecheck/should_fail/StrictBinds typecheck/should_fail/T12973 typecheck/should_run/StrictPats typecheck/should_run/T12809 typecheck/should_fail/T13105 patsyn/should_fail/UnliftedPSBind typecheck/should_fail/LevPolyBounded typecheck/should_compile/T12987 typecheck/should_compile/T11736 * Fixed tickets: #12809 #12973 #11736 #13075 #12987 * This also adds a test case for #13105. This test case is * "compile_fail" and succeeds, because I want the testsuite to monitor the error message. When #13105 is fixed, the test case will compile cleanly.
-
- 18 Jan, 2017 8 commits
-
-
Test Plan: validate Reviewers: simonpj, austin, bgamari Reviewed By: bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2985 GHC Trac Issues: #13132
-
This adds a `CBool` type wrapping C99's `bool`, i.e., an `unsigned char`. Fixes #13136. Test Plan: ./validate on Tier-1 platforms Reviewers: austin, hvr, simonmar, bgamari Reviewed By: simonmar, bgamari Subscribers: thomie, erikd Differential Revision: https://phabricator.haskell.org/D2982 GHC Trac Issues: #13136
-
Test Plan: Added 2 test cases, verified that ghc can suggest in the following cases: - for misspelled flag containing '=', ghc suggests flags that doesn't contain '=' - for misspelled flag containing '=', ghc suggests flags that contains '=' Reviewers: austin, dfeuer, bgamari Reviewed By: dfeuer, bgamari Subscribers: dfeuer, mpickering, thomie Differential Revision: https://phabricator.haskell.org/D2978 GHC Trac Issues: #11789
-
Reviewers: austin, rwbarton, simonmar, hvr, bgamari Reviewed By: rwbarton, simonmar Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2970
-
Clean up the linker code for PE. 1. Stop copying structures from the windows header and use those that are in the headers. There's no point in copying them and we got a few types wrong. 2. Replace custom typedef with C99 types. If we're not going to use the Windows type aliases, at least use standard ones. Test Plan: ./validate Reviewers: simonmar, austin, erikd, bgamari Reviewed By: simonmar, bgamari Subscribers: dfeuer, thomie, #ghc_windows_task_force Differential Revision: https://phabricator.haskell.org/D2944
-
Ben Gamari authored
The fix in D2964 wasn't quite right; the sleep was in the wrong place, as pointed out by @gracjan.
-
Gabor Greif authored
-
Gabor Greif authored
-
- 17 Jan, 2017 10 commits
-
-
Test Plan: build with ghc-7.10.1 Reviewers: austin, bgamari, dfeuer Reviewed By: dfeuer Subscribers: dfeuer, thomie Differential Revision: https://phabricator.haskell.org/D2976 GHC Trac Issues: #13120
-
Previously, `mkInlineUnfolding` took a `Maybe` argument indicating whether the caller requested a specific arity. This was not self-documenting at call sites. Now we distinguish between `mkInlineUnfolding` and `mkInlineUnfoldingWithArity`. Reviewers: simonpj, austin, bgamari Reviewed By: simonpj, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2933
-
In module ‘Prelude’: ‘True’ is a data constructor of ‘Bool’ To import it use ‘import’ Prelude( Bool( True ) ) The quotes around `import` don't make any sense. Test Plan: manual Reviewers: austin, mpickering, bgamari Reviewed By: mpickering, bgamari Subscribers: dfeuer, thomie Differential Revision: https://phabricator.haskell.org/D2935
-
This fixes #12038, where the TimerManager would attempt to wake up a manager that was already dead, resulting in setnumcapabilities001 occassionally failing during shutdown with unexpected output on stderr. I'm frankly still not entirely confident in this solution but perhaps it will help to get a few more eyes on this. My hypothesis is that the TimerManager is racing: thread TimerManager worker ------- -------------------- requests that thread manager shuts down begins to clean up, closing eventfd calls wakeManager, which tries to write to closed eventfd To prevent this `wakeManager` will need to synchronize with the TimerManger worker to ensure that the worker doesn't clean up the `Control` while another thread is trying to send a wakeup. However, this would add a bit of overhead on every timer interaction, which feels rather costly for what is really a problem only at shutdown. Moreover, it seems that the event manager (e.g. `GHC.Event.Manager`) is also afflicted by a similar race. This patch instead simply tries to catch the write failure after it has happened and silence it in the case that the fd has vanished. It feels rather hacky but it seems to work. Test Plan: Run `setnumcapabilities001` repeatedly Reviewers: hvr, austin, simonmar Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2957 GHC Trac Issues: #12038
-
Test Plan: Built it and looked at it Reviewers: niteria, erikd, dfeuer, austin, hvr, bgamari Reviewed By: bgamari Subscribers: dfeuer, thomie, erikd Differential Revision: https://phabricator.haskell.org/D2959
-
Ben Gamari authored
Unfortunately it's not clear why but this has been failing on Harbormaster.
-
These are producing StgWords so foldl' is the natural choice. I'm not sure how I didn't notice this when I wrote D1041. Test Plan: Validate Reviewers: austin, simonmar Reviewed By: simonmar Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2955 GHC Trac Issues: #7450
-
Some operating systems (e.g. Darwin) have very poor file timestamp resolution. On these systems GHC often fails to notice that B.hs changes in this testsuite, leading to sporatic test failures. Add a sleep to ensure the change is noticed. Test Plan: Validate Reviewers: ezyang, austin Subscribers: mpickering, gracjan, thomie Differential Revision: https://phabricator.haskell.org/D2964
-
Alan Zimmerman authored
An unboxed tuple such as (# | b | | | | | #) Ends up in the parser via `tup_exprs` as Sum 2 7 lexp where `lexp` is a `LHsExpr` From an API annotation perspective, the 5 `AnnVbar`s after the `b` were attached to `lexp`, but the leading `AnnVbar`s did not have a home. This patch attaches them all to the the parent tuple expression. The first (alt - 1) of them come before `lexp`, and the remaining (arity - alt) come after. Test Plan: ./validate Reviewers: osa1, austin, bgamari Subscribers: thomie, mpickering Differential Revision: https://phabricator.haskell.org/D2968 GHC Trac Issues: #12417
-
Gabor Greif authored
-