[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 9 commits: Significant refactor of Lint

Marge Bot gitlab at gitlab.haskell.org
Mon Apr 13 20:34:12 UTC 2020



 Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC


Commits:
cd4f92b5 by Simon Peyton Jones at 2020-04-12T11:20:58-04:00
Significant refactor of Lint

This refactoring of Lint was triggered by #17923, which is
fixed by this patch.

The main change is this.  Instead of
   lintType :: Type -> LintM LintedKind
we now have
   lintType :: Type -> LintM LintedType

Previously, all of typeKind was effectively duplicate in lintType.
Moreover, since we have an ambient substitution, we still had to
apply the substition here and there, sometimes more than once. It
was all very tricky, in the end, and made my head hurt.

Now, lintType returns a fully linted type, with all substitutions
performed on it.  This is much simpler.

The same thing is needed for Coercions.  Instead of
  lintCoercion :: OutCoercion
               -> LintM (LintedKind, LintedKind,
                         LintedType, LintedType, Role)
we now have
  lintCoercion :: Coercion -> LintM LintedCoercion

Much simpler!  The code is shorter and less bug-prone.

There are a lot of knock on effects.  But life is now better.

Metric Decrease:
    T1969

- - - - -
0efaf301 by Josh Meredith at 2020-04-12T11:21:34-04:00
Implement extensible interface files

- - - - -
54ca66a7 by Ryan Scott at 2020-04-12T11:22:10-04:00
Use conLikeUserTyVarBinders to quantify field selector types

This patch:

1. Writes up a specification for how the types of top-level field
   selectors should be determined in a new section of the GHC User's
   Guide, and
2. Makes GHC actually implement that specification by using
   `conLikeUserTyVarBinders` in `mkOneRecordSelector` to preserve the
   order and specificity of type variables written by the user.

Fixes #18023.

- - - - -
35799dda by Ben Gamari at 2020-04-12T11:22:50-04:00
hadrian: Don't --export-dynamic on Darwin

When fixing #17962 I neglected to consider that --export-dynamic is only
supported on ELF platforms.

- - - - -
e8029816 by Alexis King at 2020-04-12T11:23:27-04:00
Add an INLINE pragma to Control.Category.>>>

This fixes #18013 by adding INLINE pragmas to both Control.Category.>>>
and GHC.Desugar.>>>. The functional change in this patch is tiny (just
two lines of pragmas!), but an accompanying Note explains in gory
detail what’s going on.

- - - - -
49ea4c01 by Krzysztof Gogolewski at 2020-04-13T16:33:56-04:00
Change zipWith to zipWithEqual in a few places

- - - - -
73818ece by Andreas Klebinger at 2020-04-13T16:33:57-04:00
Small change to the windows ticker.

We already have a function to go from time to ms so use it.
Also expand on the state of timer resolution.

- - - - -
d27af927 by Alp Mestanogullari at 2020-04-13T16:34:01-04:00
hadrian: get rid of unnecessary levels of nesting in source-dist

- - - - -
16928cb1 by Julien Debon at 2020-04-13T16:34:03-04:00
doc (Foldable): Add examples to Data.Foldable

See #17929

- - - - -


30 changed files:

- compiler/GHC/Core/Coercion/Opt.hs
- compiler/GHC/Core/ConLike.hs
- compiler/GHC/Core/DataCon.hs
- compiler/GHC/Core/Lint.hs
- compiler/GHC/Core/Op/FloatIn.hs
- compiler/GHC/Core/Op/OccurAnal.hs
- compiler/GHC/Core/Op/SpecConstr.hs
- compiler/GHC/Core/Op/WorkWrap/Lib.hs
- compiler/GHC/Core/Type.hs
- compiler/GHC/Driver/Types.hs
- compiler/GHC/HsToCore/Expr.hs
- compiler/GHC/Iface/Binary.hs
- compiler/GHC/Iface/Load.hs
- compiler/GHC/Iface/Make.hs
- compiler/GHC/IfaceToCore.hs
- compiler/GHC/Runtime/Eval.hs
- compiler/GHC/Tc/Deriv/Generate.hs
- compiler/GHC/Tc/Errors.hs
- compiler/GHC/Tc/Gen/Match.hs
- compiler/GHC/Tc/TyCl/Utils.hs
- compiler/GHC/Tc/Utils/Zonk.hs
- compiler/utils/Binary.hs
- docs/users_guide/8.12.1-notes.rst
- docs/users_guide/extending_ghc.rst
- docs/users_guide/exts/existential_quantification.rst
- + docs/users_guide/exts/field_selectors_and_type_applications.rst
- docs/users_guide/exts/gadt.rst
- docs/users_guide/exts/rank_polymorphism.rst
- docs/users_guide/exts/records.rst
- hadrian/src/Builder.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/4e78b76569e2247cfbe00264990268e6d99b1ab5...16928cb1f2933f082aa17a3d9042216b8a5e5726

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/4e78b76569e2247cfbe00264990268e6d99b1ab5...16928cb1f2933f082aa17a3d9042216b8a5e5726
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/20200413/44378a21/attachment.html>


More information about the ghc-commits mailing list