[Git][ghc/ghc][wip/T18249] 24 commits: docs: correct haddock reference

Sebastian Graf gitlab at gitlab.haskell.org
Mon Sep 21 10:29:29 UTC 2020



Sebastian Graf pushed to branch wip/T18249 at Glasgow Haskell Compiler / GHC


Commits:
6baa67f5 by Adam Sandberg Eriksson at 2020-09-16T07:45:47-04:00
docs: correct haddock reference

[skip ci]
- - - - -
7cf09ab0 by Simon Peyton Jones at 2020-09-17T01:27:25-04:00
Do absence analysis on stable unfoldings

Ticket #18638 showed that Very Bad Things happen if we fail
to do absence analysis on stable unfoldings.  It's all described
in Note [Absence analysis for stable unfoldings and RULES].

I'm a bit surprised this hasn't bitten us before. Fortunately
the fix is pretty simple.

- - - - -
76d3bcbc by Leif Metcalf at 2020-09-17T01:28:01-04:00
Replace deprecated git --recursive

The --recursive flag of git-clone has been replaced by the
--recurse-submodules flag since git 1.7.4, released in 2011.
- - - - -
da8f4ddd by Richard Eisenberg at 2020-09-17T01:28:38-04:00
Document IfaceTupleTy

- - - - -
3c94c816 by HaskellMouse at 2020-09-17T08:49:51-04:00
Added explicit fixity to (~).

Solves #18252

- - - - -
b612e396 by Cary Robbins at 2020-09-17T08:50:30-04:00
Make the 'IsString (Const a b)' instance polykinded on 'b'

- - - - -
8d0c26c4 by Ben Gamari at 2020-09-17T08:51:08-04:00
rts/win32: Fix missing #include's

These slipped through CI.

- - - - -
76009ec8 by Ben Gamari at 2020-09-17T08:51:08-04:00
Bump Win32 submodule to 2.9.0.0

Also bumps Cabal, directory

- - - - -
147bb598 by Ben Gamari at 2020-09-17T08:51:08-04:00
Bump version to 9.0

Bumps haskeline and haddock submodules.

(cherry picked from commit f218cfc92f7b1a1e01190851972bb9a0e0f3c682)

- - - - -
5c7387f6 by Leif Metcalf at 2020-09-17T08:51:43-04:00
Make Z-encoding comment into a note

- - - - -
c12b3041 by Leif Metcalf at 2020-09-17T08:51:43-04:00
Cosmetic

- - - - -
4f461e1a by Vladislav Zavialov at 2020-09-17T08:52:19-04:00
Parser.y: clarify treatment of @{-# UNPACK #-}

Before this patch, we had this parser production:

	ftype : ...
	      | ftype PREFIX_AT tyarg  { ... }

And 'tyarg' is defined as follows:

	tyarg : atype              { ... }
	      | unpackedness atype { ... }

So one might get the (false) impression that that parser production is
intended to parse things like:

	F @{-# UNPACK #-} X

However, the lexer wouldn't produce PREFIX_AT followed by 'unpackedness',
as the '@' operator followed by '{-' is not considered prefix.

Thus there's no point using 'tyarg' after PREFIX_AT,
and a simple 'atype' will suffice:

	ftype : ...
	      | ftype PREFIX_AT atype  { ... }

This change has no user-facing consequences. It just makes the grammar a
bit more clear.

- - - - -
9dec8600 by Benjamin Maurer at 2020-09-17T08:52:56-04:00
Documented '-m' flags for machine specific instruction extensions.
See #18641 'Documenting the Expected Undocumented Flags'

- - - - -
ca48076a by Sylvain Henry at 2020-09-17T20:04:08-04:00
Introduce OutputableP

Some types need a Platform value to be pretty-printed: CLabel, Cmm
types, instructions, etc.

Before this patch they had an Outputable instance and the Platform value
was obtained via sdocWithDynFlags. It meant that the *renderer* of the
SDoc was responsible of passing the appropriate Platform value (e.g. via
the DynFlags given to showSDoc).  It put the burden of passing the
Platform value on the renderer while the generator of the SDoc knows the
Platform it is generating the SDoc for and there is no point passing a
different Platform at rendering time.

With this patch, we introduce a new OutputableP class:

   class OutputableP a where
      pdoc :: Platform -> a -> SDoc

With this class we still have some polymorphism as we have with `ppr`
(i.e. we can use `pdoc` on a variety of types instead of having a
dedicated `pprXXX` function for each XXX type).

One step closer removing `sdocWithDynFlags` (#10143) and supporting
several platforms (#14335).

- - - - -
e45c8544 by Sylvain Henry at 2020-09-17T20:04:08-04:00
Generalize OutputableP

Add a type parameter for the environment required by OutputableP. It
avoids tying Platform with OutputableP.

- - - - -
37aa224a by Sylvain Henry at 2020-09-17T20:04:08-04:00
Add note about OutputableP

- - - - -
7f2785f2 by Sylvain Henry at 2020-09-17T20:04:08-04:00
Remove pprPrec from Outputable (unused)

- - - - -
b689f3db by Sylvain Henry at 2020-09-17T20:04:46-04:00
Bignum: add clamping naturalToWord (fix #18697)

- - - - -
0799b3de by Ben Gamari at 2020-09-18T15:55:50-04:00
rts/nonmoving: Add missing STM write barrier

When updating a TRec for a TVar already part of a transaction we
previously neglected to add the old value to the update remembered set.
I suspect this was the cause of #18587.

- - - - -
c4921349 by Ben Gamari at 2020-09-18T15:56:25-04:00
rts: Refactor foreign export tracking

This avoids calling `libc` in the initializers which are responsible for
registering foreign exports. We believe this should avoid the corruption
observed in #18548.

See Note [Tracking foreign exports] in rts/ForeignExports.c for an
overview of the new scheme.

- - - - -
40dc9106 by Ben Gamari at 2020-09-18T15:56:25-04:00
rts: Refactor unloading of foreign export StablePtrs

Previously we would allocate a linked list cell for each foreign export.
Now we can avoid this by taking advantage of the fact that they are
already broken into groups.

- - - - -
45fa8218 by Simon Jakobi at 2020-09-19T06:57:36-04:00
Deprecate Data.Semigroup.Option

Libraries email: https://mail.haskell.org/pipermail/libraries/2018-April/028724.html

GHC issue: https://gitlab.haskell.org/ghc/ghc/issues/15028

Corresponding PRs for deepseq:
* https://github.com/haskell/deepseq/pull/55
* https://github.com/haskell/deepseq/pull/57

Bumps the deepseq submodule.

- - - - -
c79f1477 by Sebastian Graf at 2020-09-21T12:27:40+02:00
PmCheck - Comments only: Replace /~ by ≁

- - - - -
c18b6f3d by Sebastian Graf at 2020-09-21T12:27:40+02:00
PmCheck: Rewrite inhabitation test

We used to produce inhabitants of a pattern-match refinement type Nabla
in the checker in at least two different and mostly redundant ways:

  1. There was `provideEvidence` (now called
     `generateInhabitingPatterns`) which is used by
     `GHC.HsToCore.PmCheck` to produce non-exhaustive patterns, which
     produces inhabitants of a Nabla as a sub-refinement type where all
     match variables are instantiated.
  2. There also was `ensure{,All}Inhabited` (now called
     `inhabitationTest`) which worked slightly different, but was
     whenever new type constraints or negative term constraints were
     added. See below why `provideEvidence` and `ensureAllInhabited`
     can't be the same function, the main reason being performance.
  3. And last but not least there was the `nonVoid` test, which tested
     that a given type was inhabited. We did use this for strict fields
     and -XEmptyCase in the past.

The overlap of (3) with (2) was always a major pet peeve of mine. The
latter was quite efficient and proven to work for recursive data types,
etc, but could not handle negative constraints well (e.g. we often want
to know if a *refined* type is empty, such as `{ x:[a] | x /= [] }`).

Lower Your Guards suggested that we could get by with just one, by
replacing both functions with `inhabitationTest` in this patch.
That was only possible by implementing the structure of φ constraints
as in the paper, namely the semantics of φ constructor constraints.

This has a number of benefits:

  a. Proper handling of unlifted types and strict fields, fixing #18249,
     without any code duplication between
     `GHC.HsToCore.PmCheck.Oracle.instCon` (was `mkOneConFull`) and
     `GHC.HsToCore.PmCheck.checkGrd`.
  b. `instCon` can perform the `nonVoid` test (3) simply by emitting
     unliftedness constraints for strict fields.
  c. `nonVoid` (3) is thus simply expressed by a call to
     `inhabitationTest`.
  d. Similarly, `ensureAllInhabited` (2), which we called after adding
     type info, now can similarly be expressed as the fuel-based
     `inhabitationTest`.

See the new `Note [Why inhabitationTest doesn't call generateInhabitingPatterns]`
why we still have tests (1) and (2).

Fixes #18249 and brings nice metric decreases for `T17836` (-76%) and
`T17836b` (-46%), as well as `T18478` (-8%) at the cost of a few very
minor regressions (< +2%), potentially due to the fact that
`generateInhabitingPatterns` does more work to suggest the minimal
COMPLETE set.

Metric Decrease:
    T17836
    T17836b

- - - - -


30 changed files:

- README.md
- compiler/GHC/Cmm.hs
- compiler/GHC/Cmm/CLabel.hs
- compiler/GHC/Cmm/Dataflow/Label.hs
- compiler/GHC/Cmm/DebugBlock.hs
- compiler/GHC/Cmm/Info/Build.hs
- compiler/GHC/Cmm/LayoutStack.hs
- compiler/GHC/Cmm/Lint.hs
- compiler/GHC/Cmm/Parser.y
- compiler/GHC/Cmm/Pipeline.hs
- compiler/GHC/Cmm/Ppr.hs
- compiler/GHC/Cmm/Ppr/Decl.hs
- compiler/GHC/Cmm/Ppr/Expr.hs
- compiler/GHC/Cmm/ProcPoint.hs
- compiler/GHC/CmmToAsm.hs
- compiler/GHC/CmmToAsm/CFG.hs
- compiler/GHC/CmmToAsm/Dwarf.hs
- compiler/GHC/CmmToAsm/Dwarf/Types.hs
- compiler/GHC/CmmToAsm/PPC/Ppr.hs
- compiler/GHC/CmmToAsm/Ppr.hs
- compiler/GHC/CmmToAsm/Reg/Graph.hs
- compiler/GHC/CmmToAsm/Reg/Graph/Stats.hs
- compiler/GHC/CmmToAsm/Reg/Liveness.hs
- compiler/GHC/CmmToAsm/SPARC.hs
- compiler/GHC/CmmToAsm/SPARC/CodeGen.hs
- compiler/GHC/CmmToAsm/SPARC/CodeGen/CondCode.hs
- compiler/GHC/CmmToAsm/SPARC/CodeGen/Gen64.hs
- compiler/GHC/CmmToAsm/SPARC/CodeGen/Sanity.hs
- compiler/GHC/CmmToAsm/SPARC/Ppr.hs
- compiler/GHC/CmmToAsm/X86/CodeGen.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/5ccf47bb2a4191579ad633837a3dcd3ca1d1c5da...c18b6f3d181c390f3f86f066f07d150ea31b9152

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/5ccf47bb2a4191579ad633837a3dcd3ca1d1c5da...c18b6f3d181c390f3f86f066f07d150ea31b9152
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/20200921/8b757baa/attachment-0001.html>


More information about the ghc-commits mailing list