| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
These have been moved to the ghc/ci-images project.
|
| |
|
|
|
|
| |
This also builds stage2 with optimisations and -dcore-lint
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In this commit
commit 7833cf407d1f608bebb1d38bb99d3035d8d735e6
Date: Thu Jan 24 17:58:50 2019 +0100
Look through newtype wrappers (Trac #16254)
we made exprIsConApp_maybe quite a bit cleverer. But I had not paid
enough attention to keeping exactly the correct substitution and
in-scope set, which led to Trac #16348.
There were several buglets (like applying the substitution twice in
exprIsConApp_maybe, but the proximate source of the bug was that we were
calling addNewInScopeIds, which deleted things from the substitution as
well as adding them to the in-scope set. That's usually right, but not
here!
This was quite tricky to track down. But it is nicer now.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch disables the binder-swap transformation in the
(relatively rare) case when the scrutinee is a GlobalId.
Reason: we are getting Lint errors so that GHC doesn't
even validate. Trac #16346.
This is NOT the final solution -- it's just a stop-gap
to get us running again.
The final solution is in Trac #16296
|
|
|
|
|
|
| |
The tcTyConUserTyVars field of TcTyCon was entirely unused.
This patch kills it off entirely.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This issue was reproduced with, and the fix confirmed with,
the `hatrace` tool for syscall-based fault injection:
https://github.com/nh2/hatrace
The concrete test case for GHC is at
https://github.com/nh2/hatrace/blob/e23d35a2d2c79e8bf49e9e2266b3ff7094267f29/test/HatraceSpec.hs#L185
A previous, nondeterministic reproducer for the issue was provided by
Alexey Kuleshevich in
https://github.com/lehins/exec-kill-loop
Signed-off-by: Niklas Hambüchen <niklas@fpcomplete.com>
Reviewed-by: Alexey Kuleshevich <alexey@fpcomplete.com>
|
| |
|
| |
|
|
|
|
|
| |
By parsing '~' in 'tyconsym' instead of 'oqtycon', we
get one less shift/reduce conflict.
|
|
|
|
|
|
|
|
| |
The dot type operator was handled in the 'tyvarop' parser production, and the
bang type operator in 'tyapp'. However, export lists and role annotations use
'oqtycon', so these type operators could not be exported or assigned roles.
The fix is to handle them in a lower level production, 'tyconsym'.
|
|
|
|
| |
Respect `inside_git_repo()` when checking performance stats.
|
|
|
|
|
|
| |
The `Final` constructor needed to maintain the invariant that the list
it is provided is always non-empty. Since NonEmpty is in `base` now, I
think it would be better to use it for this purpose.
|
| |
|
|
|
|
|
|
|
|
|
| |
There was a missing case in the very simple optimiser,
CoreOpt.simpleOptExpr, which led to Trac #13208 comment:2.
In particular, in simple_app, if we find a Let, we should
just float it outwards. Otherwise we leave behind some
easy-to-reduce beta-redexes.
|
|
|
|
| |
No change in behaviour, slightly more efficient
|
|
|
|
|
|
| |
Alexandre Balde (rockbmb) points out that the fusion technology
for foldr2, zip, zipWith, etc is undocumented. This patch adds
comments to explain.
|
| |
|
|
|
|
|
|
|
| |
Along the way, I discovered that `template-haskell.cabal` was
hard-coding the GHC version (in the form of its `ghc-boot-th` version
bounds), so I decided to make life a little simpler in the future by
generating `template-haskell.cabal` with autoconf.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a preparation for #16295: https://ghc.haskell.org/trac/ghc/ticket/16295
This commit mostly focuses on getting rid of untracked dependencies,
which prevent Shake's new `--shared` feature from appropriately caching
build rules.
There are three different solutions to untracked dependencies:
* Track them! This is the obvious and the best approach, but in some
situations we cannot use it, for example, because a build rule creates
files whose names are not known statically and hence cannot be
specified as the rule's outputs.
* Use Shake's `produces` to record outputs dynamically, within the rule.
* Use Shake's `historyDisable` to disable caching for a particular build
rule. We currently use this approach only for `ghc-pkg` which mutates
the package database and the file `package.cache`.
These two tickets are fixed as the result:
Ticket #16271: https://ghc.haskell.org/trac/ghc/ticket/16271
Ticket #16272: https://ghc.haskell.org/trac/ghc/ticket/16272 (this one
is fixed only partially: we correctly record the dependency, but we
still copy files into the RTS build tree).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This includes two bug fixes in profiling version of stg_ap_0_fast:
- PAPs allocated by stg_ap_0_fast are now correctly tagged. This
invariant is checked in Sanity.c:checkPAP.
(This was originally implemented in 2693eb11f5, later reverted with
ab55b4ddb7 because it revealed the bug below, but it wasn't clear at
the time whether the bug was the one below or something in the commit)
- The local variable `untaggedfun` is now marked as a pointer so it
survives GC.
With this we finally fix all known bugs caught in #15508. `concprog001`
now works reliably with prof+threaded and prof runtimes (with and
without -debug).
|
| |
|
|
|
| |
Also add an implementation comment for details.
|
|
|
|
|
|
| |
exprIsConApp_maybe could detect that I# 10 is a constructor application,
but not that Size (I# 10) is, because it was an application with a
nontrivial argument.
|
|
|
|
|
|
|
| |
For case-of-known constructor to continue triggering early,
exprIsConApp_maybe is now capable of looking through lets and cases.
See #15840
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move implementation notes for Integer to Haddock named section
Revert documentation named chunk change [skip ci]
Haddock's named chunk feature was not used correctly in this case,
as it cannot export only parts of a Haddock top level comment.
As such, it was removed and replaced by a message informing the end-
user to browse the source code for detailed information.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The AvailTC was not be upheld for explicit export module
export lists when the module contains associated data families.
module A (module A) where
class C a where { data T a }
instance C () where { data T () = D }
Used to (incorrectly) report avails as `[C{C, T;}, T{D;}]`. Note that
although `T` is exported, the avail where it is the parent does _not_
list it as its first element. This avail is now correctly listed as
`[C{C, T;}, T{T, D;}]`.
This was induces a [crash in Haddock][0].
See #16077.
[0]: https://github.com/haskell/haddock/issues/979
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Following a succession of refactorings of the type checker,
culminating in the patch
Make a smart mkAppTyM
we have got rid of mkNakedAppTy etc. And that in turn
meant that the tcm_smart field of the generic TyCoMapper
(in Type.hs) was entirely unused. It was always set to True.
So this patch just gets rid of it completely. Less code,
less complexity, and more efficient because fewer higher-order
function calls. Everyone wins.
No change in behaviour; this does not cure any bugs!
|
| |
|
|
|
|
|
|
|
|
| |
The 4 main testsuites in Haddock don't have many dependencies, but are
regularly broken in small ways by changes to the GHC AST or the GHC API.
The main gotcha is that we'll have to make sure that `haddock-test` and
the test suite don't add modules without modifying this test. Then again,
if that happens, the test will fail and someone will noticed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Smaller than word size integers must be promoted to word size
when passed on the stack. While on little endian systems we can
get away with writing a small integer to a word size stack slot
and read it as a word ignoring the upper bits, on big endian
systems a small integer write ends up in the most significant
bits and a word size read that ignores the upper bits delivers
a random value.
On little endian systems a smaller than word size write to
the stack might be more efficient but that decision is
system specific and should be done as an optimization in the
respective backends.
Fixes #16258
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
`parallel` is used in exactly one place in the GHC tree: the T2317 test.
It seems almost by accident that it is a submodule; libraries needed
only for tests should net be included as submodules (see `QuickCheck`,
`async`, `haskell98`, `regex-compat`, `utf8-string`, `vector` and more
for examples).
T2317 will now get run only when `parallel` is installed instead of
`parallel` being required for the testsuite to run.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
For some reason gitlab is not reporting these as failures in CI. It's
not clear to me why as the junit output looks fine.
Fixes #16112 and #16113
They were fixed by 682783828275cca5fd8bf5be5b52054c75e0e22c
|
|
|
|
| |
and CI results."
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It never really encoded a invariant.
* The linear register allocator just did partial pattern matches
* The graph allocator just set it to (Just mapEmpty) for Nothing
So I changed LiveInfo to directly contain the map.
Further natCmmTopToLive which filled in Nothing is no longer exported.
Instead we know call cmmTopLiveness which changes the type AND fills
in the map.
|
|
|
|
|
|
|
|
| |
Character literals in Haddock should not be written as plain `'\n'` since
single quotes are for linking identifiers. Besides, since we want the
character literal to be monospaced, we really should use `@\'\\n\'@`.
[skip ci]
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch makes us fail fast in TcSimplify.solveLocalEqualities,
and in TcHsType.tc_hs_sig_type, if there are insoluble constraints.
Previously we ploughed on even if there were insoluble constraints,
leading to a cascade of hard-to-understand type errors. Failing
eagerly is much better; hence a lot of testsuite error message
changes. Eg if we have
f :: [Maybe] -> blah
f xs = e
then trying typecheck 'f x = e' with an utterly bogus type
is just asking for trouble.
I can't quite remember what provoked me to make this change,
but I think the error messages are notably improved, by
removing confusing clutter and focusing on the real error.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch finally delivers on Trac #15952. Specifically
* Completely remove Note [The tcType invariant], along with
its complicated consequences (IT1-IT6).
* Replace Note [The well-kinded type invariant] with:
Note [The Purely Kinded Type Invariant (PKTI)]
* Instead, establish the (PKTI) in TcHsType.tcInferApps,
by using a new function mkAppTyM when building a type
application. See Note [mkAppTyM].
* As a result we can remove the delicate mkNakedXX functions
entirely. Specifically, mkNakedCastTy retained lots of
extremly delicate Refl coercions which just cluttered
everything up, and(worse) were very vulnerable to being
silently eliminated by (say) substTy. This led to a
succession of bug reports.
The result is noticeably simpler to explain, simpler
to code, and Richard and I are much more confident that
it is correct.
It does not actually fix any bugs, but it brings us closer.
E.g. I hoped it'd fix #15918 and #15799, but it doesn't quite
do so. However, it makes it much easier to fix.
I also did a raft of other minor refactorings:
* Use tcTypeKind consistently in the type checker
* Rename tcInstTyBinders to tcInvisibleTyBinders,
and refactor it a bit
* Refactor tcEqType, pickyEqType, tcEqTypeVis
Simpler, probably more efficient.
* Make zonkTcType zonk TcTyCons, at least if they have
any free unification variables -- see zonk_tc_tycon
in TcMType.zonkTcTypeMapper.
Not zonking these TcTyCons was actually a bug before.
* Simplify try_to_reduce_no_cache in TcFlatten (a lot)
* Combine checkExpectedKind and checkExpectedKindX.
And then combine the invisible-binder instantation code
Much simpler now.
* Fix a little bug in TcMType.skolemiseQuantifiedTyVar.
I'm not sure how I came across this originally.
* Fix a little bug in TyCoRep.isUnliftedRuntimeRep
(the ASSERT was over-zealous). Again I'm not certain
how I encountered this.
* Add a missing solveLocalEqualities in
TcHsType.tcHsPartialSigType.
I came across this when trying to get level numbers
right.
|
|
|
|
|
|
|
|
|
| |
-Wredundant-record-wildcards warns when a .. pattern binds no variables.
-Wunused-record-wildcards warns when none of the variables bound by a ..
pattern are used.
These flags are enabled by `-Wall`.
|
|
|
|
|
|
|
|
|
|
| |
This patch adds an optimization into the NCG: for large strings
(threshold configurable via -fbinary-blob-threshold=NNN flag), instead
of printing `.asciz "..."` in the generated ASM source, we print
`.incbin "tmpXXX.dat"` and we dump the contents of the string into a
temporary "tmpXXX.dat" file.
See the note for more details.
|