[Git][ghc/ghc][wip/hadrian-librts-symlinks] 54 commits: Add GHCi :instances command
David Eichmann
gitlab at gitlab.haskell.org
Tue Jun 11 13:55:12 UTC 2019
David Eichmann pushed to branch wip/hadrian-librts-symlinks at Glasgow Haskell Compiler / GHC
Commits:
002594b7 by Xavier Denis at 2019-06-04T18:41:29Z
Add GHCi :instances command
This commit adds the `:instances` command to ghci following proosal
number 41.
This makes it possible to query which instances are available to a given
type.
The output of this command is all the possible instances with type
variables and constraints instantiated.
- - - - -
3ecc03df by Ben Gamari at 2019-06-04T18:42:04Z
gitlab-ci: Run bindisttest during CI
- - - - -
c16f3297 by Ben Gamari at 2019-06-04T18:42:04Z
make: Fix bindist installation
This fixes a few vestigial references to `settings` left over from !655.
Fixes #16715.
- - - - -
ba4e3934 by Alp Mestanogullari at 2019-06-04T18:43:17Z
Hadrian: profiling and debug enabled ways support -eventlog too
- - - - -
567894b4 by Matthew Pickering at 2019-06-07T08:36:32Z
gitlab-ci: Disable darwin hadrian job
See #16771
We don't have enough capacity for the two jobs currently.
[skip ci]
- - - - -
d3915b30 by Andrew Martin at 2019-06-07T14:20:42Z
[skip ci] Improve the documentation of the CNF primops. In this context, the term "size" is ambiguous and is now avoided. Additionally, the distinction between a CNF and the blocks that comprise it has been emphasize. The vocabulary has been made more consistent with the vocabulary in the C source for CNF.
- - - - -
e963beb5 by Sebastian Graf at 2019-06-07T14:21:21Z
TmOracle: Replace negative term equalities by refutable PmAltCons
The `PmExprEq` business was a huge hack and was at the same time vastly
too powerful and not powerful enough to encode negative term equalities,
i.e. facts of the form "forall y. x ≁ Just y".
This patch introduces the concept of 'refutable shapes': What matters
for the pattern match checker is being able to encode knowledge of the
kind "x can no longer be the literal 5". We encode this knowledge in a
`PmRefutEnv`, mapping a set of newly introduced `PmAltCon`s (which are
just `PmLit`s at the moment) to each variable denoting above
inequalities.
So, say we have `x ≁ 42 ∈ refuts` in the term oracle context and
try to solve an equality like `x ~ 42`. The entry in the refutable
environment will immediately lead to a contradiction.
This machinery renders the whole `PmExprEq` and `ComplexEq` business
unnecessary, getting rid of a lot of (mostly dead) code.
See the Note [Refutable shapes] in TmOracle for a place to start.
Metric Decrease:
T11195
- - - - -
0b7372f6 by Matthew Pickering at 2019-06-07T14:21:57Z
Add HEAP_PROF_SAMPLE_END event to mark end of samples
This allows a user to observe how long a sampling period lasts so that
the time taken can be removed from the profiling output.
Fixes #16697
- - - - -
d1dc0ed7 by Roland Senn at 2019-06-07T14:22:47Z
Fix #16700: Tiny errors in output of GHCi commands :forward and :info
`:info Coercible` now outputs the correct section number of the GHCi User's guide together with the secion title.
`:forward x` gives the correct syntax hint.
- - - - -
387050d0 by John Ericson at 2019-06-07T14:23:23Z
Factor out 'getLibDir' / 'getBaseDir' into a new GHC.BaseDir ghc-boot module
ghc-pkg and ghc already both needed this. I figure it is better to
deduplicate, especially seeing that changes to one (FreeBSD CPP) didn't
make it to the other.
Additionally in !1090 I make ghc-pkg look up the settings file, which
makes it use the top dir a bit more widely. If that lands, any
difference in the way they find the top dir would be more noticable.
That change also means sharing more code between ghc and ghc-package
(namely the settings file parsing code), so I'd think it better to get
off the slipperly slope of duplicating code now.
- - - - -
da26ffe7 by Simon Peyton Jones at 2019-06-07T14:24:00Z
Preserve ShadowInfo when rewriting evidence
When the canonicaliser rewrites evidence of a Wanted, it
should preserve the ShadowInfo (ctev_nosh) field. That is,
a WDerive should rewrite to WDerive, and WOnly to WOnly.
Previously we were unconditionally making a WDeriv, thereby
rewriting WOnly to WDeriv. This bit Nick Frisby (issue #16735)
in the context of his plugin, but we don't have a compact test
case.
The fix is simple, but does involve a bit more plumbing,
to pass the old ShadowInfo around, to use when building
the new Wanted.
- - - - -
9bb58799 by Ben Gamari at 2019-06-07T14:24:38Z
Hadrian: Delete target symlink in createFileLinkUntracked
Previously createFileLinkUntracked would fail if the symlink already
existed.
- - - - -
be63d299 by Simon Jakobi at 2019-06-07T14:25:16Z
Fix isValidNatural: The BigNat in NatJ# must have at least 2 limbs
Previously the `integer-gmp` variant of `isValidNatural` would fail to
detect values `<= maxBound::Word` that were incorrectly encoded using
the `NatJ#` constructor.
- - - - -
e87b9f87 by Moritz Angermann at 2019-06-07T14:26:04Z
llvm-targets: Add x86_64 android layout
- - - - -
60db142b by code5hot at 2019-06-07T14:26:46Z
Update Traversable.hs with a note about an intuitive law
- - - - -
f11aca52 by code5hot at 2019-06-07T14:26:46Z
Used terminology from a paper. Added it as a reference.
- - - - -
13b3d45d by code5hot at 2019-06-07T14:26:46Z
remove backticks from markup - it doesn't mean what I think it means
- - - - -
cfd3e0f1 by Zejun Wu at 2019-06-07T14:27:34Z
Pass preprocessor options to C compiler when building foreign C files (#16737)
- - - - -
5991d877 by Ben Gamari at 2019-06-07T14:28:09Z
base: Export Finalizers
As requested in #16750.
- - - - -
3d97bad6 by Alp Mestanogullari at 2019-06-07T14:28:47Z
Hadrian: use deb9 Docker images instead of deb8 for CI jobs
This should fix #16739, where we seem to be getting extra carets in
a test's output because of the gcc that ships with the deb8 image,
whule we're not observing those extra carets in the deb9-based (Make)
jobs.
- - - - -
1afb4995 by Ben Gamari at 2019-06-07T14:29:23Z
gitlab-ci: Create index.html in documentation deployment
Otherwise navigating to https://ghc.gitlab.haskell.org/ghc will result
in a 404.
- - - - -
07dc79c3 by Matthew Pickering at 2019-06-08T17:34:18Z
gitlab-ci: Linters, don't allow to fail
Ben disabled them in cd85f8a71bb56cff332560e1d571b3406789fb71 but didn't
say how or why they were broken.
- - - - -
fd840b64 by Matthew Pickering at 2019-06-08T17:34:18Z
gitlab-ci: Don't run two submodule checking jobs on Marge jobs
- - - - -
310d0c4c by Matthew Pickering at 2019-06-08T17:34:18Z
Fix two lint failures in rts/linker/MachO.c
- - - - -
fe965316 by Ben Gamari at 2019-06-08T17:34:18Z
gitlab-ci: Use --unshallow when fetching for linters
GitLab creates a shallow clone. However, this means that we may not have
the base commit of an MR when linting, causing `git merge-base` to fail.
Fix this by passing `--unshallow` to `git fetch`, ensuring that we have
the entire history.
- - - - -
f58234ea by Ben Gamari at 2019-06-08T17:34:18Z
gitlab-ci: Fix submodule linter
The job script didn't even try to compute the base commit to lint with
respect to.
- - - - -
c392f987 by Ben Gamari at 2019-06-08T17:34:18Z
gitlab-ci: A few clarifying comments
- - - - -
709290b0 by Matthew Pickering at 2019-06-08T17:38:15Z
Remove trailing whitespace
[skip ci]
This should really be caught by the linters! (#16711)
- - - - -
b2f106f5 by Ben Gamari at 2019-06-08T18:02:02Z
gitlab-ci: Disable shallow clones
Previously we were passing `--unshallow` to `git fetch` in the linting
rules to ensure that the base commit which we were linting with respect
to was available. However, this breaks due to GitLab's re-use of
working directories since `git fetch --unshallow` fails on a repository
which is not currently shallow.
Given that `git fetch --unshallow` circumvents the efficiencies provided
by shallow clones anyways, let's just disable them entirely.
There is no documented way to do disable shallow clones but on checking
the GitLab implementation it seems that setting `GIT_DEPTH=0` should do
the trick.
- - - - -
4a72259d by Ben Gamari at 2019-06-08T18:40:55Z
gitlab-ci: Fix submodule linting of commits
There is no notion of a base commit when we aren't checking a merge
request. Just check the HEAD commit.
- - - - -
87540029 by Ben Gamari at 2019-06-08T20:44:55Z
gitlab-ci: Ensure that all commits on a branch are submodule-linted
The previous commit reworked things such that the submodule linter would
only run on the head commit. However, the linter only checks the
submodules which are touched by the commits it is asked to lint.
Consequently it would be possible for a bad submodule to sneak through.
Thankfully, we can use the handy CI_COMMIT_BEFORE_SHA attribute to
find the base commit of the push.
- - - - -
0462b0e0 by Alexandre Baldé at 2019-06-09T15:48:34Z
Explain that 'mappend' and '(<>)' should be the same [skip ci]
- - - - -
970e4802 by Matthew Pickering at 2019-06-09T15:49:09Z
hadrian: Properly partition options in sourceArgs
Previously if you build the `ghc` package then it would has the default
opts and the library opts. This is different behaviour to make where the
library opts are only reserved for things in the `libraries`
subdirectory (I believe)
Fixes #16716
- - - - -
a018c3a8 by Ben Gamari at 2019-06-09T15:49:44Z
testsuite: Suppress ticks in T4918 output
As noted in #16741, this test otherwise breaks when `base` is compiled
with `-g`.
- - - - -
f7370333 by chessai at 2019-06-09T22:41:02Z
Introduce log1p and expm1 primops
Previously log and exp were primitives yet log1p and expm1 were FFI
calls. Fix this non-uniformity.
- - - - -
41bf4045 by Ben Gamari at 2019-06-09T22:41:38Z
testsuite: Add test for #16514
- - - - -
b9fe91fc by Simon Jakobi at 2019-06-09T22:42:21Z
Small refactorings in ExtractDocs
- - - - -
9d238791 by Kevin Buhr at 2019-06-09T22:42:57Z
Handle trailing path separator in package DB names (#16360)
Package DB directories with trailing separator (provided via
GHC_PACKAGE_PATH or via -package-db) resulted in incorrect calculation of
${pkgroot} substitution variable. Keep the trailing separator while
resolving as directory or file, but remove it before dropping the last
path component with takeDirectory.
Closes #16360.
- - - - -
a22e51ea by Richard Eisenberg at 2019-06-09T22:43:38Z
Fix #16517 by bumping the TcLevel for method sigs
There were actually two bugs fixed here:
1. candidateQTyVarsOfType needs to be careful that it does not
try to zap metavariables from an outer scope as "naughty"
quantification candidates. This commit adds a simple check
to avoid doing so.
2. We weren't bumping the TcLevel in kcHsKindSig, which was used
only for class method sigs. This mistake led to the acceptance
of
class C a where
meth :: forall k. Proxy (a :: k) -> ()
Note that k is *locally* quantified. This patch fixes the
problem by using tcClassSigType, which correctly bumps the
level. It's a bit inefficient because tcClassSigType does other
work, too, but it would be tedious to repeat much of the code
there with only a few changes. This version works well and is
simple.
And, while updating comments, etc., I noticed that tcRnType was
missing a pushTcLevel, leading to #16767, which this patch also
fixes, by bumping the level. In the refactoring here, I also
use solveEqualities. This initially failed ghci/scripts/T15415,
but that was fixed by teaching solveEqualities to respect
-XPartialTypeSignatures.
This patch also cleans up some Notes around error generation that
came up in conversation.
Test case: typecheck/should_fail/T16517, ghci/scripts/T16767
- - - - -
10452959 by Roland Senn at 2019-06-09T22:44:18Z
Add disable/enable commands to ghci debugger #2215
This patch adds two new commands `:enable` and `:disable` to the GHCi debugger.
Opposite to `:set stop <n> :continue` a breakpoint disabled with `:disable` will
not loose its previously set stop command.
A new field breakEnabled is added to the BreakLocation data structure to
track the enable/disable state. When a breakpoint is disabled with a `:disable`
command, the following happens:
The corresponding BreakLocation data element is searched dictionary of the
`breaks` field of the GHCiStateMonad. If the break point is found and not
already in the disabled state, the breakpoint is removed from bytecode.
The BreakLocation data structure is kept in the breaks list and the new
breakEnabled field is set to false.
The `:enable` command works similar.
The breaks field in the GHCiStateMonad was changed from an association list
to int `IntMap`.
- - - - -
13572480 by Ben Gamari at 2019-06-09T22:44:54Z
rts: Separate population of eventTypes from initial event generation
Previously these two orthogonal concerns were both implemented in
postHeaderEvents which made it difficult to send header events after RTS
initialization.
- - - - -
ed20412a by nineonine at 2019-06-09T22:45:31Z
Do not report error if Name in pragma is unbound
- - - - -
8a48a8a4 by Ben Gamari at 2019-06-09T22:46:08Z
testsuite: Add test for #16509
- - - - -
69c58f8a by David Eichmann at 2019-06-09T22:46:46Z
Hadrian: need CPP preprocessor dependencies #16660
Use the new -include-cpp-deps ghc option (#16521)
when generating .dependencies files in hadrian.
This is version gated as -include-cpp-deps is a
relatively new option.
- - - - -
1c7bb03d by Richard Eisenberg at 2019-06-09T22:47:24Z
Comments only: document tcdDataCusk better.
- - - - -
5023adce by John Ericson at 2019-06-09T22:47:59Z
Remove CPP ensuring word size is 32 or 64 bits around Addr# <-> int# primops
It shouldn't be needed these days, and those primops are "highly
deprecated" anyways.
This fits with my plans because it removes one bit of target-dependence
of the builtin primops, and this is the hardest part of GHC to make
multi-target.
CC @carter
- - - - -
8e60e3f0 by Daniel Gröber at 2019-06-09T22:48:38Z
rts: Fix RetainerProfile early return with TREC_CHUNK
When pop() returns with `*c == NULL` retainerProfile will immediately
return. All other code paths is pop() continue with the next stackElement
when this happens so it seems weird to me that TREC_CHUNK we would suddenly
abort everything even though the stack might still have elements left to
process.
- - - - -
1a3420ca by Ben Gamari at 2019-06-10T11:59:41Z
base: Mark CPUTime001 as fragile
As noted in #16224, CPUTime001 has been quite problematic, reporting
non-monotonic timestamps in CI. Unfortunately I've been unable to
reproduce this locally.
- - - - -
9bc10993 by Vladislav Zavialov at 2019-06-10T12:00:16Z
Print role annotations in TemplateHaskell brackets (#16718)
- - - - -
0345b1b0 by Richard Eisenberg at 2019-06-11T03:52:10Z
Comments only: document newtypes' DataConWrapId
- - - - -
58a5d728 by David Eichmann at 2019-06-11T03:52:50Z
Refactor the rules for .hi and .o into a single rule using `&%>` #16764
Currently the rule for .hi files just triggers (via need) the rule
for the .o file, and .o rule generates both the .o and .hi file.
Likewise for .o-boot and .hi-boot files. This is a bit of an abuse
of Shake, and in fact shake supports rules with multiple output
with the &%> function. This exact use case appears in Neil
Mitchell's paper *Shake Before Building* section 6.3.
- - - - -
2f945086 by Ben Gamari at 2019-06-11T03:53:25Z
testsuite: Fix and extend closure_size test
This was previously broken in several ways. This is fixed and it also
now tests arrays. Unfortunately I was unable to find a way to continue
testing PAP and FUN sizes; these simply depend too much upon the
behavior of the simplifier.
I also tried to extend this to test non-empty arrays as well but
unfortunately this was non-trivial as the array card size constant isn't
readily available from haskell.
Fixes #16531.
- - - - -
e5d275f4 by Ben Gamari at 2019-06-11T03:53:25Z
ghc-heap: Add closure_size_noopt test
This adds a new test, only run in the `normal` way, to verify the size
of FUNs and PAPs.
- - - - -
1cf4dafb by David Eichmann at 2019-06-11T13:49:04Z
Hadrian: Track RTS library symlink targets
This requires creating RTS library symlinks when registering, outside
of the rule for the registered library file.
- - - - -
30 changed files:
- .gitlab-ci.yml
- compiler/basicTypes/MkId.hs
- compiler/basicTypes/NameEnv.hs
- compiler/cmm/CmmMachOp.hs
- compiler/cmm/MkGraph.hs
- compiler/cmm/PprC.hs
- compiler/codeGen/StgCmmForeign.hs
- compiler/codeGen/StgCmmPrim.hs
- compiler/deSugar/Check.hs
- compiler/deSugar/DsMonad.hs
- compiler/deSugar/ExtractDocs.hs
- compiler/deSugar/PmExpr.hs
- + compiler/deSugar/PmPpr.hs
- compiler/deSugar/TmOracle.hs
- compiler/ghc.cabal.in
- compiler/ghci/LinkerTypes.hs
- compiler/hsSyn/HsDecls.hs
- compiler/llvmGen/LlvmCodeGen/CodeGen.hs
- compiler/main/DriverPipeline.hs
- compiler/main/GHC.hs
- compiler/main/HscMain.hs
- compiler/main/HscTypes.hs
- compiler/main/InteractiveEval.hs
- compiler/main/Packages.hs
- compiler/main/SysTools/BaseDir.hs
- compiler/nativeGen/PPC/CodeGen.hs
- compiler/nativeGen/SPARC/CodeGen.hs
- compiler/nativeGen/X86/CodeGen.hs
- compiler/prelude/PrelInfo.hs
- compiler/prelude/primops.txt.pp
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/compare/d9db26c147389164484d90a5ca5a832e67ca1f62...1cf4dafbf60159ae48f8373a0434ae7d9a700484
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/compare/d9db26c147389164484d90a5ca5a832e67ca1f62...1cf4dafbf60159ae48f8373a0434ae7d9a700484
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20190611/a379d01a/attachment-0001.html>
More information about the ghc-commits
mailing list