| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In looking at Trac #9063 I decided to re-design the default
instances for associated type synonyms. Previously it was all
jolly complicated, to support generality that no one wanted, and
was arguably undesirable.
Specifically
* The default instance for an associated type can have only
type variables on the LHS. (Not type patterns.)
* There can be at most one default instances declaration for
each associated type.
To achieve this I had to do a surprisingly large amount of refactoring
of HsSyn, specifically to parameterise HsDecls.TyFamEqn over the type
of the LHS patterns.
That change in HsDecls has a (trivial) knock-on effect in Haddock, so
this commit does a submodule update too.
The net result is good though. The code is simpler; the language
specification is simpler. Happy days.
Trac #9263 and #9264 are thereby fixed as well.
|
|
|
|
|
|
| |
This reverts the numbers for T9203.
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
|
|
| |
I started monitoring perfomance on a per-commit base. These seem to be
off for a while now. Adjusting them, and from now I hope I can keep
closer tabs on them.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This should fix the Harbormaster builds; the bounds are just a little too narrow.
Signed-off-by: Austin Seipp <austin@well-typed.com>
Test Plan: Harbormaster should build successfully.
Reviewers: simonmar
Subscribers: phaskell, simonmar, relrod, carter
Projects: #ghc
Differential Revision: https://phabricator.haskell.org/D65
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
This is a tricky case exposed by Trac #9254. I'm surprised it hasn't
shown up before, because it's happens when you use unsafePerformIO in
the right way.
Anyway, fixed now. See Note [Analysing with absent demand]
in Demand.lhs
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Check for integer overflow in allocate() (#9172)
Test Plan: validate
Reviewers: austin
Reviewed By: austin
Subscribers: simonmar, relrod, carter
Differential Revision: https://phabricator.haskell.org/D36
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is the second attempt to add this functionality. The first
attempt was reverted in 950fcae46a82569e7cd1fba1637a23b419e00ecd, due
to register allocator failure on x86. Given how the register
allocator currently works, we don't have enough registers on x86 to
support cmpxchg using complicated addressing modes. Instead we fall
back to a simpler addressing mode on x86.
Adds the following primops:
* atomicReadIntArray#
* atomicWriteIntArray#
* fetchSubIntArray#
* fetchOrIntArray#
* fetchXorIntArray#
* fetchAndIntArray#
Makes these pre-existing out-of-line primops inline:
* fetchAddIntArray#
* casIntArray#
|
|
|
|
|
|
|
|
|
| |
I'm wondering whether it's sensible to omit so many typecheck testcases from
the default validate test target. As for instance, TcNullaryTC has been failing
since its introduction in c63a465011b99eeafbb957074e54c2e6bbf751d9 (re #8993) and
it seems to have gone unnoticed so far.
Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some numbers have decreased but the haddock numbers have generally
increased noticeable again (see also last update in 970e5d99fb658b73)
This updates all numbers I noticed in the "fast" test-mode, *except* for
the T9203 test-case on 32bit, which needs more investigation before
bumping due to its significant increase:
bytes allocated value is too high:
Expected bytes allocated: 50000000 +/-5%
Lower bound bytes allocated: 47500000
Upper bound bytes allocated: 52500000
Actual bytes allocated: 85093548
*** unexpected failure for T9203(normal)
|
|
|
|
| |
Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
|
|
|
|
|
|
|
|
|
|
|
| |
In 1c0b5fdc9f2b6ea8166cc565383d4cd20432343c (re #9224) `BinaryLiterals`
was temporarily added to T4437's `expectedGhcOnlyExtensions` list. This
can now reverted as Cabal has been made aware of `BinaryLiterals`
(see haskell/cabal#1970 and haskell/cabal#1972).
updates Cabal submodule
Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
|
|
|
|
|
|
|
|
|
| |
It's a bit confusing to have .gitignore files spread all over the
filesystem. This commit tries to consolidate those into one .gitignore
file per component. Moreover, we try to describe files to be ignored which
happen to have a common identifying pattern by glob patterns.
Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Haskell2010 supports
- base-10 (prefix-less),
- base-8 (via `0[oO]`-prefix), and
- base-16 (via `0[xX]`-prefix) integer literals.
This commit adds syntax support for base-2 integer literals via the new `0[bB]`
prefix. The use of a `0b` prefix for indicating binary literals is known
from popular programming languages such as C++14, Perl, Python, Ruby, and Java.
This syntax extension is disabled by default and can be enabled via the
new `{-# LANGUAGE BinaryLiterals #-}` pragma and/or the new `-XBinaryLiterals`
This new extensions requires to upgrade the `ExtsBitmap` type from
`Word` to `Word64` as this adds a 33th flag which is not guaranteed to
fit into a `Word`.
Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
Differential Revision: https://phabricator.haskell.org/D22
|
|
|
|
| |
This reverts commit 05120ecd95b2ebf9b096a95304793cd78be9506e.
|
|
|
|
| |
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Normally, -fno-code does not generate interface files.
However, if you want to use it to type check over multiple
runs of GHC, you will need the interface files to check
source files further down the dependency chain; -fwrite-interface
does this for you.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: clean validate, and a new test-case
Reviewers: simonpj
Subscribers: simonmar, relrod, carter
Differential Revision: https://phabricator.haskell.org/D27
|
|
|
|
|
|
|
|
| |
This commit caused the register allocator to fail on i386.
This reverts commit d8abf85f8ca176854e9d5d0b12371c4bc402aac3 and
04dd7cb3423f1940242fdfe2ea2e3b8abd68a177 (the second being a fix to
the first).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Add more primops for atomic ops on byte arrays
Adds the following primops:
* atomicReadIntArray#
* atomicWriteIntArray#
* fetchSubIntArray#
* fetchOrIntArray#
* fetchXorIntArray#
* fetchAndIntArray#
Makes these pre-existing out-of-line primops inline:
* fetchAddIntArray#
* casIntArray#
|
| |
|
|
|
|
| |
this seems to be expected, as explained by SPJ in comment 7 of #9208.
|
|
|
|
|
|
| |
This is needed to give meaningful error messages (instead of internal
panics) when a program tries to lift a pattern synonym into a kind.
(fixes T9161)
|
|
|
|
|
|
|
| |
Fixes Trac #9196. Thanks to archblob for an initial stab at this.
In the end I fixed it in the kind checker rather than the subsequent
validity check, (a) so that the error messages look more uniform,
and (b) so that I did not need to meddle with isPredTy.
|
|
|
|
|
|
|
| |
The issue here is avoiding a GHC crash when a program uses
unsafeCoerce is a dangerous (or even outright-wrong) way.
See Trac #9208
|
|
|
|
|
|
|
|
|
|
| |
This covers things like
Eq a => blah and (?x::Int) => blah
where there is just one predicate. Previously we used an ad-hoc
test to decide whether to parenthesise it, but acutally there is
a much simpler solution: just use the existing precedence mechamism.
This applies both to Type and HsType.
|
|
|
|
| |
Not sure if my patch changed this, but it looks reasonable.
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: validate
Reviewers: simonpj, austin
Subscribers: simonmar, relrod
Differential Revision: https://phabricator.haskell.org/D20
|
| |
|
|
|
|
|
| |
I don't know why, and I don't like the steady increase.
But I don't think my changes here are the cause.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was pretty obscure. elemLocalRdrEnv was utterly wrong (replied
False when it should reply True) when given an Exact Name. That
doesn't happen often, but it does happen in the result of a TH splice.
The result was that an associated type didn't get a type variable that
lined up with its parent class (elemLocalRdrEnv is used in
RnTypes.bindHsTyVars), and that messed up the singletons package.
I've made a completely different test case to show up the bug:
indexed_types/should_fail/T9160
I also refactored RdrName.LocalRdrEnv to be a record with named
fields, which makes the code more robust and easy to understand.
|
|
|
|
| |
This bug was causing Trac #9199
|
|
|
|
|
|
|
|
|
| |
In a special case for trivial RHSs (see DmdAnal.unpackTrivial),
I'd forgotten to include a demand for the RHS itself.
See Note [Remember to demand the function itself].
Thanks to David Terei for guiding me to the bug,
at PLDI in Edinburgh.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are three bugs here, one serious
* We were failing to tidy the type arguments in an IfTyConParent
This is what was causing Trac #9190.
* toIfaceTcArgs is careful to suppress kind arguments, but there
was a clone, tidyToIfaceTcArgs in IfaceSyn which didn't.
Now the latter goes via the former.
* When pretty-printing a IfaceDecl for an algebraic data type, and
doing so in Haskell-98 syntax, we were silently assuming that the
universal type variables of the TyCon and the DataCon were the
same. But that has not been true for some time. Result: a very
confusing display.
Solution: during the conversion to IfaceSyn, take the opportunity
to make the universal type variables line up exactly. This is very
easy to do, makes the pretty-printing easy, and leaves open the future
possiblity of not serialising the universal type variables of the
data constructor.
|
|
|
|
|
| |
The improvement is to report the inferred type in the error message,
as suggested in email on ghc-deves (10 Jun 14).
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Removed (pprEqPred (coercionKind co)) in favor of
(pprType (coercionType co)).
Also had to make "~R#" a *symbolic* identifier and BuiltInSyntax
to squelch prefix notation and module prefixes in output. These
changes are both sensible independent of #9062.
|
| |
|
|
|
|
|
| |
This change also updates castFunPtr to make it free at runtime.
This fixes #9163.
|
|
|
|
| |
It seems that the patch in #9178 was not fully validated.
|
|
|
|
| |
Including a test case.
|
|
|
|
|
| |
This was triggered by looking at Trac #9171. See
Note [Suggest -fprint-explicit-kinds] in TcErrors
|
|
|
|
| |
Fixes Trac #9167
|
|
|
|
| |
This closes #9181.
|
| |
|
|
|
|
| |
fixes #9127
|
|
|
|
|
|
|
| |
A previous fix to this was wrong: f5879acd018494b84233f26fba828ce376d0f81d
and left some unreachable code behind. So rather than try to be clever and
do this at the same time as the strongly-connected-component analysis, I'm
doing a separate reachability pass first.
|