[Git][ghc/ghc][wip/T8095-spj] 28 commits: Fix typo
Simon Peyton Jones
gitlab at gitlab.haskell.org
Tue Aug 4 23:43:49 UTC 2020
Simon Peyton Jones pushed to branch wip/T8095-spj at Glasgow Haskell Compiler / GHC
Commits:
b9a880fc by Felix Wiemuth at 2020-07-29T15:06:35-04:00
Fix typo
- - - - -
c59064b0 by Brandon Chinn at 2020-07-29T15:07:11-04:00
Add regression test for #16341
- - - - -
a61411ca by Brandon Chinn at 2020-07-29T15:07:11-04:00
Pass dit_rep_tc_args to dsm_stock_gen_fn
- - - - -
a26498da by Brandon Chinn at 2020-07-29T15:07:11-04:00
Pass tc_args to gen_fn
- - - - -
44b11bad by Brandon Chinn at 2020-07-29T15:07:11-04:00
Filter out unreachable constructors when deriving stock instances (#16431)
- - - - -
bbc51916 by Simon Peyton Jones at 2020-07-29T15:07:47-04:00
Kill off sc_mult and as_mult fields
They are readily derivable from other fields, so this is more
efficient, and less error prone.
Fixes #18494
- - - - -
e3db4b4c by Peter Trommler at 2020-07-29T15:08:22-04:00
configure: Fix build system on ARM
- - - - -
96c31ea1 by Sylvain Henry at 2020-07-29T15:09:02-04:00
Fix bug in Natural multiplication (fix #18509)
A bug was lingering in Natural multiplication (inverting two limbs)
despite QuickCheck tests used during the development leading to wrong
results (independently of the selected backend).
- - - - -
e1dc3d7b by Krzysztof Gogolewski at 2020-07-29T15:09:39-04:00
Fix validation errors (#18510)
Test T2632 is a stage1 test that failed because of the Q => Quote change.
The remaining tests did not use quotation and failed when the path
contained a space.
- - - - -
6c68a842 by John Ericson at 2020-07-30T07:11:02-04:00
For `-fkeep-going` do not duplicate dependency edge code
We now compute the deps for `-fkeep-going` the same way that the
original graph calculates them, so the edges are correct. Upsweep really
ought to take the graph rather than a topological sort so we are never
recalculating anything, but at least things are recaluclated
consistently now.
- - - - -
502de556 by cgibbard at 2020-07-30T07:11:02-04:00
Add haddock comment for unfilteredEdges
and move the note about drop_hs_boot_nodes into it.
- - - - -
01c948eb by Ryan Scott at 2020-07-30T07:11:37-04:00
Clean up the inferred type variable restriction
This patch primarily:
* Documents `checkInferredVars` (previously called
`check_inferred_vars`) more carefully. This is the
function which throws an error message if a user quantifies an
inferred type variable in a place where specificity cannot be
observed. See `Note [Unobservably inferred type variables]` in
`GHC.Rename.HsType`.
Note that I now invoke `checkInferredVars` _alongside_
`rnHsSigType`, `rnHsWcSigType`, etc. rather than doing so _inside_
of these functions. This results in slightly more call sites for
`checkInferredVars`, but it makes it much easier to enumerate the
spots where the inferred type variable restriction comes into
effect.
* Removes the inferred type variable restriction for default method
type signatures, per the discussion in #18432. As a result, this
patch fixes #18432.
Along the way, I performed some various cleanup:
* I moved `no_nested_foralls_contexts_err` into `GHC.Rename.Utils`
(under the new name `noNestedForallsContextsErr`), since it now
needs to be invoked from multiple modules. I also added a helper
function `addNoNestedForallsContextsErr` that throws the error
message after producing it, as this is a common idiom.
* In order to ensure that users cannot sneak inferred type variables
into `SPECIALISE instance` pragmas by way of nested `forall`s, I
now invoke `addNoNestedForallsContextsErr` when renaming
`SPECIALISE instance` pragmas, much like when we rename normal
instance declarations. (This probably should have originally been
done as a part of the fix for #18240, but this task was somehow
overlooked.) As a result, this patch fixes #18455 as a side effect.
- - - - -
d47324ce by Ryan Scott at 2020-07-30T07:12:16-04:00
Don't mark closed type family equations as occurrences
Previously, `rnFamInstEqn` would mark the name of the type/data
family used in an equation as an occurrence, regardless of what sort
of family it is. Most of the time, this is the correct thing to do.
The exception is closed type families, whose equations constitute its
definition and therefore should not be marked as occurrences.
Overzealously counting the equations of a closed type family as
occurrences can cause certain warnings to not be emitted, as observed
in #18470. See `Note [Type family equations and occurrences]` in
`GHC.Rename.Module` for the full story.
This fixes #18470 with a little bit of extra-casing in
`rnFamInstEqn`. To accomplish this, I added an extra
`ClosedTyFamInfo` field to the `NonAssocTyFamEqn` constructor of
`AssocTyFamInfo` and refactored the relevant call sites accordingly
so that this information is propagated to `rnFamInstEqn`.
While I was in town, I moved `wrongTyFamName`, which checks that the
name of a closed type family matches the name in an equation for that
family, from the renamer to the typechecker to avoid the need for an
`ASSERT`. As an added bonus, this lets us simplify the details of
`ClosedTyFamInfo` a bit.
- - - - -
ebe2cf45 by Simon Peyton Jones at 2020-07-30T07:12:52-04:00
Remove an incorrect WARN in extendLocalRdrEnv
I noticed this warning going off, and discovered that it's
really fine. This small patch removes the warning, and docments
what is going on.
- - - - -
9f71f697 by Simon Peyton Jones at 2020-07-30T07:13:27-04:00
Add two bangs to improve perf of flattening
This tiny patch improves the compile time of flatten-heavy
programs by 1-2%, by adding two bangs.
Addresses (somewhat) #18502
This reduces allocation by
T9872b -1.1%
T9872d -3.3%
T5321Fun -0.2%
T5631 -0.2%
T5837 +0.1%
T6048 +0.1%
Metric Decrease:
T9872b
T9872d
- - - - -
7c274cd5 by Sylvain Henry at 2020-07-30T22:54:48-04:00
Fix minimal imports dump for boot files (fix #18497)
- - - - -
175cb5b4 by Sylvain Henry at 2020-07-30T22:55:25-04:00
DynFlags: don't use sdocWithDynFlags in datacon ppr
We don't need to use `sdocWithDynFlags` to know whether we should
display linear types for datacon types, we already have
`sdocLinearTypes` field in `SDocContext`. Moreover we want to remove
`sdocWithDynFlags` (#10143, #17957)).
- - - - -
380638a3 by Sylvain Henry at 2020-07-30T22:56:03-04:00
Bignum: fix powMod for gmp backend (#18515)
Also reenable integerPowMod test which had never been reenabled by
mistake.
- - - - -
56a7c193 by Sylvain Henry at 2020-07-31T19:32:09+02:00
Refactor CLabel pretty-printing
Pretty-printing CLabel relies on sdocWithDynFlags that we want to remove
(#10143, #17957). It uses it to query the backend and the platform.
This patch exposes Clabel ppr functions specialised for each backend so
that backend code can directly use them.
- - - - -
3b15dc3c by Sylvain Henry at 2020-07-31T19:32:09+02:00
DynFlags: don't use sdocWithDynFlags in GHC.CmmToAsm.Dwarf.Types
- - - - -
e30fed6c by Vladislav Zavialov at 2020-08-01T04:23:04-04:00
Test case for #17652
The issue was fixed by 19e80b9af252eee760dc047765a9930ef00067ec
- - - - -
22641742 by Ryan Scott at 2020-08-02T16:44:11-04:00
Remove ConDeclGADTPrefixPs
This removes the `ConDeclGADTPrefixPs` per the discussion in #18517.
Most of this patch simply removes code, although the code in the
`rnConDecl` case for `ConDeclGADTPrefixPs` had to be moved around a
bit:
* The nested `forall`s check now lives in the `rnConDecl` case for
`ConDeclGADT`.
* The `LinearTypes`-specific code that used to live in the
`rnConDecl` case for `ConDeclGADTPrefixPs` now lives in
`GHC.Parser.PostProcess.mkGadtDecl`, which is now monadic so that
it can check if `-XLinearTypes` is enabled.
Fixes #18157.
- - - - -
f2d1accf by Leon Schoorl at 2020-08-02T16:44:47-04:00
Fix GHC_STAGE definition generated by make
Fixes #18070
GHC_STAGE is the stage of the compiler we're building, it should be 1,2(,3?).
But make was generating 0 and 1.
Hadrian does this correctly using a similar `+ 1`:
https://gitlab.haskell.org/ghc/ghc/-/blob/eb8115a8c4cbc842b66798480fefc7ab64d31931/hadrian/src/Rules/Generate.hs#L245
- - - - -
2d6d21ef by Simon Peyton Jones at 2020-08-05T00:15:27+01:00
Zap coercions (take 2)
This is Simon's take on coercion zapping.
The basic approach remains the same: add a UnivProv for a zapped
coercion, controlled by -ddrop-coercions. Particular features:
* A zapped coercion is born in one place only: in GHC.Tc.Utils.Zonk,
when zonking a coercion. By that time all coercion holes are
filled in, so there is no issue about looking for free holes.
* Flattening and solving are unaffected. They'll allocate
coercions -- but my plan (not yet brought to fruition)
is that they are never traversed when we have -ddrop-coercions
* There will, therefore, be no perf gain in the type checker;
but the entire rest of the compiler will benefit.
- - - - -
b5cc9c60 by Simon Peyton Jones at 2020-08-05T00:15:27+01:00
CI adjustments
This patch temporarily
* Marks -ddump-coercions as undocumented (so that CI doesn't stumble)
* Adds -ddump-coercions to TEST_HC so that all tests run with it on
- - - - -
98365e7d by Simon Peyton Jones at 2020-08-05T00:15:27+01:00
Free-var fixes
This should stop the perf regressions
- - - - -
60cc37ad by Simon Peyton Jones at 2020-08-05T00:15:28+01:00
Simplify TyCoFolder
This commit removes the 'env' part of TyCoFolder. A nice
simplification!
- - - - -
c5deeade by Simon Peyton Jones at 2020-08-05T00:15:28+01:00
Tidy up and documentation Notes
- - - - -
30 changed files:
- aclocal.m4
- compiler/GHC/Cmm/CLabel.hs
- compiler/GHC/Cmm/Info.hs
- compiler/GHC/Cmm/Info/Build.hs
- compiler/GHC/Cmm/Pipeline.hs
- compiler/GHC/Cmm/ProcPoint.hs
- compiler/GHC/CmmToAsm.hs
- compiler/GHC/CmmToAsm/Dwarf/Types.hs
- compiler/GHC/CmmToAsm/PIC.hs
- compiler/GHC/CmmToLlvm/Base.hs
- compiler/GHC/Core/Coercion.hs
- compiler/GHC/Core/Coercion/Opt.hs
- compiler/GHC/Core/DataCon.hs
- compiler/GHC/Core/FVs.hs
- compiler/GHC/Core/Lint.hs
- compiler/GHC/Core/Opt/Simplify.hs
- compiler/GHC/Core/Opt/Simplify/Utils.hs
- compiler/GHC/Core/Ppr/TyThing.hs
- compiler/GHC/Core/TyCo/FVs.hs
- compiler/GHC/Core/TyCo/Rep.hs
- compiler/GHC/Core/TyCo/Subst.hs
- compiler/GHC/Core/TyCo/Tidy.hs
- compiler/GHC/Core/Type.hs
- compiler/GHC/Core/Unify.hs
- compiler/GHC/CoreToIface.hs
- compiler/GHC/Driver/Flags.hs
- compiler/GHC/Driver/Make.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/Hs/Decls.hs
- compiler/GHC/Hs/Instances.hs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/16ef62d4e72205a79fcdf33726f920e27ed490e2...c5deeadeb1f90b47beab9d91dcb5095b22581efd
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/16ef62d4e72205a79fcdf33726f920e27ed490e2...c5deeadeb1f90b47beab9d91dcb5095b22581efd
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/20200804/1b851d67/attachment-0001.html>
More information about the ghc-commits
mailing list