[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 13 commits: Fix typo

Marge Bot gitlab at gitlab.haskell.org
Wed Jul 29 19:40:25 UTC 2020



 Marge Bot pushed to branch wip/marge_bot_batch_merge_job 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.

- - - - -
f1f94aff by Ryan Scott at 2020-07-29T15:40:20-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.

- - - - -
042efab8 by Ryan Scott at 2020-07-29T15:40:21-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.

- - - - -
00b845bb by Simon Peyton Jones at 2020-07-29T15:40:21-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.

- - - - -
fc451e3b by Simon Peyton Jones at 2020-07-29T15:40:21-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

- - - - -


30 changed files:

- aclocal.m4
- compiler/GHC/Core/Coercion.hs
- compiler/GHC/Core/Opt/Simplify.hs
- compiler/GHC/Core/Opt/Simplify/Utils.hs
- compiler/GHC/Hs/Type.hs
- compiler/GHC/Rename/Bind.hs
- compiler/GHC/Rename/Expr.hs
- compiler/GHC/Rename/HsType.hs
- compiler/GHC/Rename/Module.hs
- compiler/GHC/Rename/Pat.hs
- compiler/GHC/Rename/Utils.hs
- compiler/GHC/Tc/Deriv.hs
- compiler/GHC/Tc/Deriv/Functor.hs
- compiler/GHC/Tc/Deriv/Generate.hs
- compiler/GHC/Tc/Deriv/Infer.hs
- compiler/GHC/Tc/Deriv/Utils.hs
- compiler/GHC/Tc/Instance/Class.hs
- compiler/GHC/Tc/TyCl.hs
- compiler/GHC/Types/Name/Reader.hs
- libraries/base/Data/Maybe.hs
- libraries/ghc-bignum/src/GHC/Num/BigNat.hs
- libraries/ghc-bignum/src/GHC/Num/Natural.hs
- libraries/ghc-bignum/src/GHC/Num/WordArray.hs
- + testsuite/tests/deriving/should_compile/T16341.hs
- testsuite/tests/deriving/should_compile/all.T
- testsuite/tests/driver/T16318/Makefile
- testsuite/tests/driver/T18125/Makefile
- testsuite/tests/haddock/haddock_testsuite/Makefile
- testsuite/tests/hpc/Makefile
- testsuite/tests/indexed-types/should_fail/Overlap5.stderr


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/6600e4c9d866aa11975b6e10fac490c232515aec...fc451e3bf0b1b1dd466fd373e7b4a30dd69ec769

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/6600e4c9d866aa11975b6e10fac490c232515aec...fc451e3bf0b1b1dd466fd373e7b4a30dd69ec769
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/20200729/f40d01c0/attachment.html>


More information about the ghc-commits mailing list