| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: See the new T12005 test case for an example of this.
Test Plan: make TEST=T12005
Reviewers: bgamari, osa1
Reviewed By: osa1
Subscribers: osa1, rwbarton, carter
GHC Trac Issues: #12005
Differential Revision: https://phabricator.haskell.org/D5182
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
In order to properly honor the different ways in which the RTS must
be built by hadrian, and in particular to have fine grained control over that,
I'm introducing new Cabal flags in rts.cabal[.in]. This should not affect the
make build system and will only be used and picked up by hadrian, which uses
Cabal directly to operate on cabal packages, including libHSrts.
Reviewers: bgamari, erikd, simonmar
Reviewed By: bgamari
Subscribers: rwbarton, carter
Differential Revision: https://phabricator.haskell.org/D5166
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: allow -main-is to change export list for default module
header, allowing one to change the entry point to one's program.
Test Plan: ./validate
Reviewers: bgamari, nomeata, mpickering
Reviewed By: mpickering
Subscribers: mpickering, rwbarton, carter
GHC Trac Issues: #13704
Differential Revision: https://phabricator.haskell.org/D5189
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Previously, `kcLHsQTyVars` would always quantify class-bound
variables invisibly in the kinds of associated types, resulting in
#15591. We counteract this by explicitly passing the class-bound
variables to `kcLHsQTyVars` and quantifying over the ones that are
mentioned in the associated type such that (1) they are specified,
and (2) they come before other kind variables.
See `Note [Kind variable ordering for associated types]`.
Test Plan: make test TEST=T15591
Reviewers: goldfire, simonpj, bgamari
Reviewed By: simonpj
Subscribers: rwbarton, carter
GHC Trac Issues: #15591
Differential Revision: https://phabricator.haskell.org/D5159
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The code that GND was generating before could crumple over
if it derived an instance for a class with an ambiguous type variable
in the class head, such as the example in #15637. The solution is
straightforward: simply instantiate all variables bound by the class
head explicitly using visible type application, which will nip any
ambiguity in the bud.
Test Plan: make test TEST=T15637
Reviewers: bgamari, simonpj, goldfire
Reviewed By: simonpj
Subscribers: simonpj, rwbarton, carter
GHC Trac Issues: #15637
Differential Revision: https://phabricator.haskell.org/D5148
|
| |
|
| |
|
| |
|
|
|
|
| |
Pointed out by @andrewthad.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
hadrian will explicitly enable this flag, but more importantly needs it
as otherwise we just never end up passing -threaded to GHC when building
a new GHC binary. We could quite likely unconditionally pass -threaded,
as the corresponding logic for GhcThreaded in mk/config.mk.in seems to
always lead to it being set to True, but we instead leave a way out for
anyone in need of a GHC linked against a non-threaded runtime system in
the future.
Test Plan: T8242 (with a GHC built by hadrian)
Reviewers: bgamari
Reviewed By: bgamari
Subscribers: rwbarton, carter
Differential Revision: https://phabricator.haskell.org/D5146
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: simonmar
Reviewed By: simonmar
Subscribers: rwbarton, carter
Differential Revision: https://phabricator.haskell.org/D5186
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Always check that no overflow happens during relocation for x86_64.
It's not safe to assume the result returned by `ocAllocateSymbolExtras` is
always valid if we allocate it neither in lower 2G nor in a contiguous range
with the image.
There are also some minor fixes in this diff:
* `off >= 0x7fffffffL` should be `>`
* use of unaligned pointer is undefined behavior, use `memcpy` instead, gcc
will be able to optimize it to `mov %edx, (%rax)`.
Test Plan:
build ghci with:
```
DYNAMIC_GHC_PROGRAMS = NO
DYNAMIC_BY_DEFAULT = NO
```
and play with it.
./validate
Reviewers: simonmar, austin, bgamari, erikd
Reviewed By: simonmar
Subscribers: alpmestan, rwbarton, carter
Differential Revision: https://phabricator.haskell.org/D5168
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
I noticed while playing around with
https://github.com/fbsamples/ghc-hotswap/ that the main binary needs to
have a custom main function to set `config.keep_cafs = true` when
initialising the runtime. This is pretty annoying, it means an extra
C file with some cryptic incantations in it, and a `-no-hs-main` flag.
So I've replaced this with a link-time flag to GHC, `-fkeep-cafs` that
does the same thing.
Test Plan:
New unit test that tests for the RTS's GC'd CAFs assertion, and also
the -keep-cafs flag.
Reviewers: bgamari, osa1, erikd, noamz
Reviewed By: osa1
Subscribers: rwbarton, carter
Differential Revision: https://phabricator.haskell.org/D5183
|
|
|
|
| |
PR: https://github.com/ghc/ghc/pull/199/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Certain `EmptyCase` expressions were mistakently producing
warnings since their types did not have as many type families reduced
as they could have. The most direct way to fix this is to normalise
these types initially using the constraint solver to solve for any
local equalities that may be in scope.
Test Plan: make test TEST=T14813
Reviewers: simonpj, bgamari, goldfire
Reviewed By: simonpj
Subscribers: rwbarton, carter
GHC Trac Issues: #14813
Differential Revision: https://phabricator.haskell.org/D5094
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
When using -fexternal-interpreter, recover was not treating a Q
compuation that simply registered an error with addErrTc as failing.
Test Plan:
New unit tests:
* T15418 is the repro from in the ticket
* TH_recover_warns is a new test to ensure that we're keeping warnings when
the body of recover succeeds.
Reviewers: bgamari, RyanGlScott, angerman, goldfire, erikd
Subscribers: rwbarton, carter
GHC Trac Issues: #15418
Differential Revision: https://phabricator.haskell.org/D5185
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In this patch
commit 869f69fd4a78371c221e6d9abd69a71440a4679a
Author: Simon Peyton Jones <simonpj@microsoft.com>
Date: Wed Dec 11 18:19:34 2013 +0000
Guarding against silly shifts
we deal with silly shifts like (Sll 1 9223372036854775807). But
I only dealt with primops that Int# and Word#.
Alas, the same problem affects shifts of Integer, as Trac #15673
showed. Fortunately, the problem is easy to fix.
|
|
|
|
|
|
|
|
|
|
| |
GHC allows types to have unsaturated type synonyms and type families,
provided they /are/ saturated if you expand all type synonyms.
TcValidity carefully checked this; see check_syn_tc_app. But
Lint only did half the job, adn that led to Trac #15664.
This patch just teaches Core Lint to be as clever as TcValidity.
|
| |
|
|
|
|
|
|
| |
Commit 59f38587d44efd00b10a6d98f6a7a1b22e87f13a ended up
fixing #15666. Let's add a regression test to ensure that it stays
fixed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This means that 'GHC.Classes.(%,%)' is no longer mentioned in
error messages for things like
class (a,b,c) -- outside of 'GHC.Classes'
class (a,Bool)
Test Plan: make TEST=T14907a && make TEST=T14907b
Reviewers: RyanGlScott, bgamari
Reviewed By: RyanGlScott
Subscribers: rwbarton, carter
GHC Trac Issues: #14907
Differential Revision: https://phabricator.haskell.org/D5172
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Reported-by: Evan Laforge
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Reviewers: bgamari
Subscribers: rwbarton, erikd, carter
Differential Revision: https://phabricator.haskell.org/D5171
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: simonmar, bgamari, erikd
Reviewed By: simonmar
Subscribers: rwbarton, carter
GHC Trac Issues: #15508
Differential Revision: https://phabricator.haskell.org/D5178
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Previously `nonVoid` outright refused to call itself
recursively to avoid the risk of hitting infinite loops when
checking recurisve types. But this is too conservative—we //can//
call `nonVoid` recursively as long as we incorporate a way to detect
the presence of recursive types, and bail out if we do detect one.
Happily, such a mechanism already exists in the form of `checkRecTc`,
so let's use it.
Test Plan: make test TEST=T15584
Reviewers: simonpj, bgamari
Reviewed By: simonpj
Subscribers: rwbarton, carter
GHC Trac Issues: #15584
Differential Revision: https://phabricator.haskell.org/D5116
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This bug, discovered by Trac #15325, has been lurking since
commit 1c9fd3f1c5522372fcaf250c805b959e8090a62c
Author: Simon Peyton Jones <simonpj@microsoft.com>
Date: Thu Dec 3 12:57:54 2015 +0000
Case-of-empty-alts is trivial (Trac #11155)
I'd forgotttnen to modify getIdFromTrivialExpr when I
modified exprIsTrivial. Easy to fix, though.
|
| |
|
|
|
|
|
|
| |
This fixes Trac #15607. The general pattern is well
established (e.g. see the guard_op binding in rnStmt
of BodyStme), but we weren't using it for LastStmt.
|
|
|
|
|
|
|
|
| |
Most out of scope errors get reported by the type checker these
days, but not all. Example, the function on the LHS of a RULE.
Trace #15659 pointed out that this less-heavily-used code path
produce a "wacky" error message. Indeed so. Easily fixed.
|
|
|
|
| |
This failed on Darwin.
|
| |
|
|
|
|
|
|
| |
This inexplicably started with 989dca6cbd93, which appears to be a bump of the
`text` submodule. This is very fishy so I've opened #15663 to ensure we
investigate.
|
|
|
|
| |
Whoops.
|
|
|
|
| |
It looks like Clang's CPP implementation has an off-by-one error here.
|
|
|
|
| |
This breaks if LLVM is not available.
|
|
|
|
| |
OVERWRITE_INFO already does zero slopping by calling OVERWRITING_CLOSURE
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As #15571 reports, eager blackholing breaks sanity checks as we can't
zero the payload when eagerly blackholing (because we'll be using the
payload after blackholing), but by the time we blackhole a previously
eagerly blackholed object (in `threadPaused()`) we don't have the
correct size information for the object (because the object's type
becomes BLACKHOLE when we eagerly blackhole it) so can't properly zero
the slop.
This problem can be solved for AP_STACK eager blackholing (which unlike
eager blackholing in general, is not optional) by zeroing the payload
after entering the stack. This patch implements this idea.
Fixes #15571.
Test Plan:
Previously concprog001 when compiled and run with sanity checks
ghc-stage2 Mult.hs -debug -rtsopts
./Mult +RTS -DS
was failing with
Mult: internal error: checkClosure: stack frame
(GHC version 8.7.20180821 for x86_64_unknown_linux)
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
thic patch fixes this panic. The test still panics, but it runs for a while
before panicking (instead of directly panicking as before), and the new problem
seems unrelated:
Mult: internal error: ASSERTION FAILED: file rts/sm/Sanity.c, line 296
(GHC version 8.7.20180919 for x86_64_unknown_linux)
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
The new problem will be fixed in another diff.
I also tried slow validate (which requires D5164): this does not introduce any
new failures.
Reviewers: simonmar, bgamari, erikd
Reviewed By: simonmar
Subscribers: rwbarton, carter
GHC Trac Issues: #15571
Differential Revision: https://phabricator.haskell.org/D5165
|
|
|
|
|
| |
Apparently the override argument to add_directive_to_domain was added in sphinx
1.8.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Encouter following error when `make`:
```
Extension error:
The 'ghc-flag' directive is already registered to domain std
```
as we register `ghc-flag` to `std` in `add_object_type` first and then
overtride it in `add_directive_to_domain`.
Test Plan:
make -C utils/haddock/doc html SPHINX_BUILD=/usr/bin/sphinx-build
Reviewers: austin, bgamari, patrickdoc
Subscribers: rwbarton, carter
Differential Revision: https://phabricator.haskell.org/D5161
|
|
|
|
|
|
| |
It seems that both add_object_type and add_directive_to_domain both register a
directive. Previously sphinx didn't seem to mind this but as of Sphinx 1.8 it
crashes with an exception.
|
|
|
|
|
|
|
| |
This commit was never properly justified and relies on the existence of
libatomic, which doesn't appear to exist on Darwin.
This reverts commit ec9aacf3eb2975fd302609163aaef429962ecd87.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This causes slow validate build to fail (in Profiling.c:countTickss), and
there's nothing wrong with struct returns.
Reviewers: simonmar, bgamari, erikd
Subscribers: rwbarton, carter
Differential Revision: https://phabricator.haskell.org/D5164
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
For certain entities in 'PrelNames', we were creating new 'Name's
instead of reusing the ones already defined. Easily fixed.
Test Plan: ./validate
Reviewers: dfeuer, RyanGlScott, bgamari, simonpj
Reviewed By: simonpj
Subscribers: simonpj, rwbarton, carter
GHC Trac Issues: #13279
Differential Revision: https://phabricator.haskell.org/D5160
|
|
|
|
| |
PR: https://github.com/ghc/ghc/pull/197/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Shortcutting the SRT for a static function can lead to resurrecting a
static object at runtime, which violates assumptions in the GC. See
comments for details.
Test Plan:
- manual testing (in progress)
- validate
Reviewers: osa1, bgamari, erikd
Reviewed By: bgamari
Subscribers: rwbarton, carter
GHC Trac Issues: #15544
Differential Revision: https://phabricator.haskell.org/D5145
|
|
|
|
| |
(cherry picked from commit c4209ba8a448b501a11d66640d280fe1e194f847)
|
|
|
|
| |
(cherry picked from commit a512f1e32bd4d6079559e3172522591863321fe7)
|