[Git][ghc/ghc][ghc-8.12] 20 commits: rts: Add --copying-gc flag to reverse effect of --nonmoving-gc

Ben Gamari gitlab at gitlab.haskell.org
Tue Jul 21 19:23:51 UTC 2020



Ben Gamari pushed to branch ghc-8.12 at Glasgow Haskell Compiler / GHC


Commits:
750a1595 by Ben Gamari at 2020-07-18T07:26:41-04:00
rts: Add --copying-gc flag to reverse effect of --nonmoving-gc

Fixes #18281.

- - - - -
6ba6a881 by Hécate at 2020-07-18T07:26:42-04:00
Implement `fullCompilerVersion`

Follow-up of https://gitlab.haskell.org/ghc/ghc/-/issues/18403

This MR adds `fullCompilerVersion`, a function that shares the same
backend as the `--numeric-version` GHC flag, exposing a full,
three-digit version datatype.

- - - - -
e6cf27df by Hécate at 2020-07-18T07:26:43-04:00
Add a Lint hadrian rule and an .hlint.yaml file in base/

- - - - -
bcb177dd by Simon Peyton Jones at 2020-07-18T07:26:43-04:00
Allow multiple case branches to have a higher rank type

As #18412 points out, it should be OK for multiple case alternatives
to have a higher rank type, provided they are all the same.

This patch implements that change.  It sweeps away
GHC.Tc.Gen.Match.tauifyMultipleBranches, and friends, replacing it
with an enhanced version of fillInferResult.

The basic change to fillInferResult is to permit the case in which
another case alternative has already filled in the result; and in
that case simply unify.  It's very simple actually.

See the new Note [fillInferResult] in TcMType

Other refactoring:

- Move all the InferResult code to one place, in GHC.Tc.Utils.TcMType
  (previously some of it was in Unify)

- Move tcInstType and friends from TcMType to Instantiate, where it
  more properly belongs.  (TCMType was getting very long.)

- - - - -
e5525a51 by Simon Peyton Jones at 2020-07-18T07:26:43-04:00
Improve typechecking of NPlusK patterns

This patch (due to Richard Eisenberg) improves
documentation of the wrapper returned by tcSubMult
(see Note [Wrapper returned from tcSubMult] in
 GHC.Tc.Utils.Unify).

And, more substantially, it cleans up the multiplicity
handling in the typechecking of NPlusKPat

- - - - -
12f90352 by Krzysztof Gogolewski at 2020-07-18T07:26:45-04:00
Remove {-# CORE #-} pragma (part of #18048)

This pragma has no effect since 2011.
It was introduced for External Core, which no longer exists.

Updates haddock submodule.

- - - - -
e504c913 by Simon Peyton Jones at 2020-07-18T07:26:45-04:00
Refactor the simplification of join binders

This MR (for #18449) refactors the Simplifier's treatment
of join-point binders.

Specifically, it puts together, into
     GHC.Core.Opt.Simplify.Env.adjustJoinPointType
two currently-separate ways in which we adjust the type of
a join point. As the comment says:

-- (adjustJoinPointType mult new_res_ty join_id) does two things:
--
--   1. Set the return type of the join_id to new_res_ty
--      See Note [Return type for join points]
--
--   2. Adjust the multiplicity of arrows in join_id's type, as
--      directed by 'mult'. See Note [Scaling join point arguments]

I think this actually fixes a latent bug, by ensuring that the
seIdSubst and seInScope have the right multiplicity on the type
of join points.

I did some tidying up while I was at it.  No more
setJoinResTy, or modifyJoinResTy: instead it's done locally in
Simplify.Env.adjustJoinPointType

- - - - -
49b265f0 by Chaitanya Koparkar at 2020-07-18T07:26:46-04:00
Fix minor typos in a Core.hs note

- - - - -
8d59aed6 by Stefan Schulze Frielinghaus at 2020-07-18T07:26:47-04:00
GHCi: Fix isLittleEndian

- - - - -
c26e81d1 by Ben Gamari at 2020-07-18T07:26:47-04:00
testsuite: Mark ghci tests as fragile under unreg compiler

In particular I have seen T16012 fail repeatedly under the
unregisterised compiler.

- - - - -
868e4523 by Moritz Angermann at 2020-07-20T04:30:38-04:00
Revert "AArch32 symbols only on aarch32."

This reverts commit cdfeb3f24f76e8fd30452016676e56fbc827789a.

Signed-off-by: Moritz Angermann <moritz.angermann at gmail.com>

- - - - -
c915ba84 by Moritz Angermann at 2020-07-20T04:30:38-04:00
Revert "Fix (1)"

This reverts commit 7abffced01f5680efafe44f6be2733eab321b039.

Signed-off-by: Moritz Angermann <moritz.angermann at gmail.com>

- - - - -
777c452a by Moritz Angermann at 2020-07-20T04:30:38-04:00
Revert "better if guards."

This reverts commit 3f60b94de1f460ca3f689152860b108a19ce193e.

Signed-off-by: Moritz Angermann <moritz.angermann at gmail.com>

- - - - -
0dd40552 by Moritz Angermann at 2020-07-20T04:30:38-04:00
Revert "[linker/rtsSymbols] More linker symbols"

This reverts commit 686e72253aed3880268dd6858eadd8c320f09e97.

Signed-off-by: Moritz Angermann <moritz.angermann at gmail.com>

- - - - -
30caeee7 by Sylvain Henry at 2020-07-21T06:39:33-04:00
DynFlags: remove use of sdocWithDynFlags from GHC.Stg.* (#17957)

* add StgPprOpts datatype
* remove Outputable instances for types that need `StgPprOpts` to be
  pretty-printed and explicitly call type specific ppr functions
* add default `panicStgPprOpts` for panic messages (when it's not
  convenient to thread StgPprOpts or DynFlags down to the ppr function
  call)

- - - - -
863c544c by Mark at 2020-07-21T06:39:34-04:00
Fix a typo in existential_quantification.rst
- - - - -
05910be1 by Krzysztof Gogolewski at 2020-07-21T14:47:07-04:00
Add release notes entry for #17816

[skip ci]

- - - - -
a6257192 by Matthew Pickering at 2020-07-21T14:47:19-04:00
Use a newtype `Code` for the return type of typed quotations (Proposal #195)

There are three problems with the current API:

1. It is hard to properly write instances for ``Quote m => m (TExp a)`` as the type is the composition
   of two type constructors. Doing so in your program involves making your own newtype and
   doing a lot of wrapping/unwrapping.

   For example, if I want to create a language which I can either run immediately or
   generate code from I could write the following with the new API. ::

      class Lang r where
        _int :: Int -> r Int
        _if  :: r Bool -> r a -> r a -> r a

      instance Lang Identity where
        _int = Identity
        _if (Identity b) (Identity t) (Identity f) = Identity (if b then t else f)

      instance Quote m => Lang (Code m) where
        _int = liftTyped
        _if cb ct cf = [|| if $$cb then $$ct else $$cf ||]

2. When doing code generation it is common to want to store code fragments in
   a map. When doing typed code generation, these code fragments contain a
   type index so it is desirable to store them in one of the parameterised
   map data types such as ``DMap`` from ``dependent-map`` or ``MapF`` from
   ``parameterized-utils``.

   ::

      compiler :: Env -> AST a -> Code Q a

      data AST a where ...
      data Ident a = ...

      type Env = MapF Ident (Code Q)

      newtype Code m a = Code (m (TExp a))

   In this example, the ``MapF`` maps an ``Ident String`` directly to a ``Code Q String``.
   Using one of these map types currently requires creating your own newtype and constantly
   wrapping every quotation and unwrapping it when using a splice. Achievable, but
   it creates even more syntactic noise than normal metaprogramming.

3. ``m (TExp a)`` is ugly to read and write, understanding ``Code m a`` is
   easier. This is a weak reason but one everyone
   can surely agree with.

Updates text submodule.

- - - - -
58235d46 by Ben Gamari at 2020-07-21T14:47:28-04:00
users-guide: Fix :rts-flag:`--copying-gc` documentation

It was missing a newline.

- - - - -
19e80b9a by Vladislav Zavialov at 2020-07-21T14:50:01-04:00
Accumulate Haddock comments in P (#17544, #17561, #8944)

Haddock comments are, first and foremost, comments. It's very annoying
to incorporate them into the grammar. We can take advantage of an
important property: adding a Haddock comment does not change the parse
tree in any way other than wrapping some nodes in HsDocTy and the like
(and if it does, that's a bug).

This patch implements the following:

* Accumulate Haddock comments with their locations in the P monad.
  This is handled in the lexer.

* After parsing, do a pass over the AST to associate Haddock comments
  with AST nodes using location info.

* Report the leftover comments to the user as a warning (-Winvalid-haddock).

- - - - -


24 changed files:

- compiler/GHC/Builtin/Names/TH.hs
- compiler/GHC/Core.hs
- compiler/GHC/Core/Lint.hs
- compiler/GHC/Core/Opt/Simplify.hs
- compiler/GHC/Core/Opt/Simplify/Env.hs
- compiler/GHC/Core/TyCo/Rep.hs
- compiler/GHC/Core/Type.hs
- compiler/GHC/Core/UsageEnv.hs
- compiler/GHC/CoreToStg.hs
- compiler/GHC/Driver/Backpack.hs
- compiler/GHC/Driver/Flags.hs
- compiler/GHC/Driver/Main.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/Hs.hs
- compiler/GHC/Hs/Decls.hs
- compiler/GHC/Hs/Doc.hs
- compiler/GHC/Hs/Expr.hs
- compiler/GHC/Hs/Stats.hs
- compiler/GHC/HsToCore/Binds.hs
- compiler/GHC/HsToCore/Expr.hs
- compiler/GHC/HsToCore/Quote.hs
- compiler/GHC/Parser.y
- compiler/GHC/Parser/Lexer.x
- compiler/GHC/Parser/PostProcess.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/c0979cc53442b3a6202acab9cf164f0a4beea0b7...19e80b9af252eee760dc047765a9930ef00067ec

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/c0979cc53442b3a6202acab9cf164f0a4beea0b7...19e80b9af252eee760dc047765a9930ef00067ec
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/20200721/c185d482/attachment.html>


More information about the ghc-commits mailing list