- 11 Nov, 2018 3 commits
-
-
Summary: I tend to accumulate these and they are often quite useful to keep around. Reviewers: monoidal Reviewed By: monoidal Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5320
-
Reviewers: bgamari, RyanGlScott Reviewed By: RyanGlScott Subscribers: RyanGlScott, rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5311
-
Summary: In GHCi we don't check anymore, whether a main function is exported. Test Plan: make test TEST=T11647 Reviewers: hvr, osa1, monoidal, mpickering, bgamari Reviewed By: osa1, mpickering Subscribers: rwbarton, carter GHC Trac Issues: #11647 Differential Revision: https://phabricator.haskell.org/D5162
-
- 08 Nov, 2018 1 commit
-
-
Ryan Scott authored
Summary: Both #9692 and #14179 were caused by GHC being careless about using eta-reduced data family instance axioms. Each of those tickets were fixed by manually whipping up some code to eta-expand the axioms. The same sort of issue has now caused #15845, so I figured it was high time to factor out the code that each of these fixes have in common. This patch introduces the `etaExpandFamInstLHS` function, which takes a family instance's type variables, LHS types, and RHS type, and returns type variables and LHS types that have been eta-expanded if necessary, in the case of a data family instance. (If it's a type family instance, `etaExpandFamInstLHS` just returns the supplied type variables and LHS types unchanged). Along the way, I noticed that many references to `Note [Eta reduction for data families]` (in `FamInstEnv`) had slightly bitrotted (they either referred to a somewhat different name, or claimed that the Note lived in a different module), so I took the liberty of cleaning those up. Test Plan: make test TEST="T9692 T15845" Reviewers: goldfire, bgamari Reviewed By: goldfire Subscribers: rwbarton, carter GHC Trac Issues: #15845 Differential Revision: https://phabricator.haskell.org/D5294
-
- 07 Nov, 2018 8 commits
-
-
This patch makes the following improvement: - Automatically records test metrics (per test environment) so that the programmer need not supply nor update expected values in *.T files. - On expected metric changes, the programmer need only indicate the direction of change in the git commit message. - Provides a simple python tool "perf_notes.py" to compare metrics over time. Issues: - Using just the previous commit allows performance to drift with each commit. - Currently we allow drift as we have a preference for minimizing false positives. - Some possible alternatives include: - Use metrics from a fixed commit per test: the last commit that allowed a change in performance (else the oldest metric) - Or use some sort of aggregate since the last commit that allowed a change in performance (else all available metrics) - These alternatives may result in a performance issue (with the test driver) having to heavily search git commits/notes. - Run locally, performance tests will trivially pass unless the tests were run locally on the previous commit. This is often not the case e.g. after pulling recent changes. Previously, *.T files contain statements such as: ``` stats_num_field('peak_megabytes_allocated', (2, 1)) compiler_stats_num_field('bytes allocated', [(wordsize(64), 165890392, 10)]) ``` This required the programmer to give the expected values and a tolerance deviation (percentage). With this patch, the above statements are replaced with: ``` collect_stats('peak_megabytes_allocated', 5) collect_compiler_stats('bytes allocated', 10) ``` So that programmer must only enter which metrics to test and a tolerance deviation. No expected value is required. CircleCI will then run the tests per test environment and record the metrics to a git note for that commit and push them to the git.haskell.org ghc repo. Metrics will be compared to the previous commit. If they are different by the tolerance deviation from the *.T file, then the corresponding test will fail. By adding to the git commit message e.g. ``` # Metric (In|De)crease <metric(s)> <options>: <tests> Metric Increase ['bytes allocated', 'peak_megabytes_allocated'] \ (test_env='linux_x86', way='default'): Test012, Test345 Metric Decrease 'bytes allocated': Test678 Metric Increase: Test711 ``` This will allow the noted changes (letting the test pass). Note that by omitting metrics or options, the change will apply to all possible metrics/options (i.e. in the above, an increase for all metrics in all test environments is allowed for Test711) phabricator will use the message in the description Reviewers: bgamari, hvr Reviewed By: bgamari Subscribers: rwbarton, carter GHC Trac Issues: #12758 Differential Revision: https://phabricator.haskell.org/D5059
-
Ben Gamari authored
This reverts commit 406978c4.
-
Ben Gamari authored
This reverts commit adcb5fb4.
-
Ben Gamari authored
This reverts commit d8495549.
-
This fixes two isssues: - Using bitcast for MO_XX_Conv Arguments to a bitcast must be of the same size. We should be using `trunc` and `zext` instead. - Using unsupported MO_*_QuotRem for LLVM The two primops `MO_*_QuotRem` are not supported by the LLVM backend, so we shouldn't use them for `Int8#`/`Word8#` (just as we do not use them for `Int#`/`Word#`). Signed-off-by:
Michal Terepeta <michal.terepeta@gmail.com> Test Plan: manually run tests with WAY=llvm Reviewers: bgamari, simonmar Reviewed By: bgamari Subscribers: rwbarton, carter GHC Trac Issues: #15864 Differential Revision: https://phabricator.haskell.org/D5304
-
Ben Gamari authored
-
Ben Gamari authored
-
Ben Gamari authored
-
- 06 Nov, 2018 1 commit
-
-
Richard Eisenberg authored
Oops. Forgot to `git add`.
-
- 05 Nov, 2018 1 commit
-
-
Richard Eisenberg authored
We thought that visible dependent quantification was impossible in terms, but Iceland Jack discovered otherwise in #15859. This fixes an ASSERT failure that arose. test case: dependent/should_fail/T15859
-
- 04 Nov, 2018 1 commit
-
-
Summary: For the error message: Not in scope X.Y Module X does not export Y No module named ‘X’ is imported: there are 2 cases, where we don't show the last "no module named is imported" line: 1. If the module X has been imported. 2. If the module X is the current module. There are 2 subcases: 2.1 If the unknown module name is in a input source file, then we can use the getModule function to get the current module name. 2.2 If the unknown module name has been entered by the user in GHCi, then the getModule function returns something like "interactive:Ghci1", and we have to check the current module in the last added entry of the HomePackageTable. Test Plan: make test TESTS="T15611a T15611b" Reviewers: monoidal, hvr, thomie, dfeuer, bgamari, DavidEichmann Reviewed By: monoidal, DavidEichmann Subscribers: rwbarton, carter GHC Trac Issues: #15611 Differential Revision: https://phabricator.haskell.org/D5284
-
- 02 Nov, 2018 8 commits
-
-
This is the first step of implementing: https://github.com/ghc-proposals/ghc-proposals/pull/74 The main highlights/changes: primops.txt.pp gets two new sections for two new primitive types for signed and unsigned 8-bit integers (Int8# and Word8 respectively) along with basic arithmetic and comparison operations. PrimRep/RuntimeRep get two new constructors for them. All of the primops translate into the existing MachOPs. For CmmCalls the codegen will now zero-extend the values at call site (so that they can be moved to the right register) and then truncate them back their original width. x86 native codegen needed some updates, since it wasn't able to deal with the new widths, but all the changes are quite localized. LLVM backend seems to just work. This is the second attempt at merging this, after the first attempt in D4475 had to be backed out due to regressions on i386. Bumps binary submodule. Signed-off-by:
Michal Terepeta <michal.terepeta@gmail.com> Test Plan: ./validate (on both x86-{32,64}) Reviewers: bgamari, hvr, goldfire, simonmar Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5258
-
Instead of using the GCC `/* fallthrough */` syntax we now use the `__attribute__((fallthrough))`, which Phyx says should be more portable than the former. Also adds a missing fallthrough annotation in the MachO linker, fixing #14613. Reviewers: erikd, simonmar Reviewed By: simonmar Subscribers: rwbarton, carter GHC Trac Issues: #14613 Differential Revision: https://phabricator.haskell.org/D5292
-
This introduces the `+RTS -ol` flag, which allows user to specify the destination file for eventlog output. Test Plan: Validate with included test Reviewers: simonmar, erikd Reviewed By: simonmar Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5293
-
-
(cherry picked from commit ee545ff44e0ba9a165de40807548c75bf181dda3)
-
Ben Gamari authored
-
Ben Gamari authored
Fixes #15841.
-
The quirk caused an issue where GHC concluded that 'D' is possibly unifiable with 'D a' (the two types could have the same kind if D is a data family). Test Plan: Ensure T9371 stays fixed. Introduce T15704 Reviewers: goldfire, bgamari Reviewed By: goldfire Subscribers: RyanGlScott, rwbarton, carter GHC Trac Issues: #15704 Differential Revision: https://phabricator.haskell.org/D5206
-
- 01 Nov, 2018 8 commits
-
-
Summary: This change to the valid hole fits adds built-in syntax candidates (like (:) and []), so that they are checked in addition to what is in scope. The rest is merely a refactor and export of the functions used to find the valid hole fits, since there was interest at ICFP to use the valid hole fit machinery for additional uses. By exporting the `tcFilterHoleFits` function, this can now be done without having to rely on parsing the actual error message. Test Plan: Test for built-in syntax included Reviewers: bgamari Reviewed By: bgamari Subscribers: RyanGlScott, rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5227
-
As it is required for 10+ tests. Hadrian didn't give us a chance to build a given executable in vanilla and profiling, simultaneously, under two different names. This patch implements support for this in general and applies it to ghc-iserv[-prof]. Test Plan: scc001 fails without this patch, passes with it. Reviewers: snowleopard, bgamari Reviewed By: bgamari Subscribers: simonpj, ndmitchell, simonmar, rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5255
-
Test Plan: Read it Reviewers: mpickering Reviewed By: mpickering Subscribers: rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5264
-
Per feature request, add `HasCallStack` to `fromJust` in `Data.Maybe` and use `error` instead of `errorWithoutStackTrace`. This allows `fromJust` to print call stacks when throwing the error. Also add a new test case for the behaviour, modify existing test cases for new signature Test Plan: New test cases Reviewers: hvr, bgamari Reviewed By: bgamari Subscribers: ulysses4ever, rwbarton, carter GHC Trac Issues: #15559 Differential Revision: https://phabricator.haskell.org/D5256
-
Test Plan: Validate Reviewers: goldfire, bgamari Subscribers: osa1, mpickering, rwbarton, carter Differential Revision: https://phabricator.haskell.org/D5221
-
Richard Eisenberg authored
newFamInst lints its types. This is good. But it's not so good when there have been errors and thus recovery tycons are about. So we now don't. Fixes #15796. Test case: typecheck/should_fail/T15796
-
Richard Eisenberg authored
The function TcHsType.failIfEmitsConstraints says that it fails. It even does so in its name. But it didn't! It *reported* constraints but didn't fail. Now it does. This is important in tcHsClsInstType; see the comments therein. This was discovered while looking at #15797, but that ticket requires visible kind application to exhibit the bug; the test case will come with the patch for #12045.
-
Richard Eisenberg authored
Previously, I had inexplicably decided that (->)'s roles were all Representational. But, of course, its first two parameters are *dependent* RuntimeReps. All dependent parameters have a Nominal role, because all roles in kinds are Nominal. Fix is easy, but I have no idea how the world hasn't come crashing down before now. This was found while investigating #15801, which requires visible type application in types to observe. Hence, the test case will come with the main patch for #12045.
-
- 31 Oct, 2018 1 commit
-
-
Ben Gamari authored
This reverts commit 5403a863.
-
- 30 Oct, 2018 5 commits
-
-
Ben Gamari authored
This reverts commit e019ec94. This sadly breaks the external interpreter on i386. For instance, see https://circleci.com/gh/ghc/ghc/10925.
-
(cherry picked from commit 7c2bcc00e22ca8cebd9ffb2ee1741a86a5c4ebb9)
-
Ben Gamari authored
-
Ryan Scott authored
This adds a program from https://ghc.haskell.org/trac/ghc/ticket/15592#comment:9 (which briefly refused to typecheck on GHC HEAD) as a test case.
-
Ben Gamari authored
This reverts commit 0bdbbd4a.
-
- 29 Oct, 2018 3 commits
-
-
Ben Gamari authored
-
When we use a git subtree, .git is a file, not a directory. The script was already fixed for the commit ID but not for its date. PR: https://github.com/ghc/ghc/pull/212/
-
Ben Gamari authored
Fixes #15404. (cherry picked from commit 578012be)
-