[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 19 commits: Modules: Types (#13009)

Marge Bot gitlab at gitlab.haskell.org
Mon Mar 30 14:48:33 UTC 2020



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


Commits:
1941ef4f by Sylvain Henry at 2020-03-29T17:28:51-04:00
Modules: Types (#13009)

Update Haddock submodule

Metric Increase:
   haddock.compiler

- - - - -
1c7c6f1a by Sylvain Henry at 2020-03-29T17:28:51-04:00
Remove GHC.Types.Unique.Map module

This module isn't used anywhere in GHC.

- - - - -
f1a6c73d by Sylvain Henry at 2020-03-29T17:28:51-04:00
Merge GHC.Types.CostCentre.Init into GHC.Driver.CodeOutput

- - - - -
54250f2d by Simon Peyton Jones at 2020-03-29T17:29:30-04:00
Demand analysis: simplify the demand for a RHS

Ticket #17932 showed that we were using a stupid demand for the RHS
of a let-binding, when the result is a product.  This was the result
of a "fix" in 2013, which (happily) turns out to no longer be
necessary.

So I just deleted the code, which simplifies the demand analyser,
and fixes #17932. That in turn uncovered that the anticipation
of worker/wrapper in CPR analysis was inaccurate, hence the logic
that decides whether to unbox an argument in WW was extracted into
a function `wantToUnbox`, now consulted by CPR analysis.

I tried nofib, and got 0.0% perf changes.

All this came up when messing about with !2873 (ticket #17917),
but is idependent of it.

Unfortunately, this patch regresses #4267 and realised that it is now
blocked on #16335.

- - - - -
03060b2f by Ben Gamari at 2020-03-29T17:30:05-04:00
testsuite: Fix T17786 on Windows

Fixes line ending normalization issue.

- - - - -
1f7995ba by Ben Gamari at 2020-03-29T17:30:05-04:00
testsuite: Fix T17786

Fix missing quoting and expected exit code.

- - - - -
ef9c608e by Ben Gamari at 2020-03-29T17:30:05-04:00
testsuite: Mark T12971 as broken on Windows

Due to #17945.

- - - - -
e54500c1 by Sylvain Henry at 2020-03-29T17:30:47-04:00
Store ComponentId details

As far as GHC is concerned, installed package components ("units") are
identified by an opaque ComponentId string provided by Cabal. But we
don't want to display it to users (as it contains a hash) so GHC queries
the database to retrieve some infos about the original source package
(name, version, component name).

This patch caches these infos in the ComponentId itself so that we don't
need to provide DynFlags (which contains installed package informations)
to print a ComponentId.

In the future we want GHC to support several independent package states
(e.g. for plugins and for target code), hence we need to avoid
implicitly querying a single global package state.

- - - - -
7e7cb714 by Marius Bakke at 2020-03-29T17:31:27-04:00
testsuite: Remove test that dlopens a PIE object.

glibc 2.30 disallowed dlopening PIE objects, so just remove the test.
Fixes #17952.

- - - - -
6c8f80d8 by Andreas Klebinger at 2020-03-29T17:32:04-04:00
Correct haddocks for testBit in Data.Bits

It conflated the nth bit with the bit at offset n.

Now we instead give the definition in terms of `bit and `.&.`
on top of clearer phrasing.

- - - - -
c916f190 by Andreas Klebinger at 2020-03-29T17:32:04-04:00
Apply suggestion to libraries/base/Data/Bits.hs
- - - - -
64bf7f51 by Ben Gamari at 2020-03-29T17:32:41-04:00
gitlab-ci: Add FreeBSD release job

- - - - -
a0d8e92e by Ryan Scott at 2020-03-29T17:33:20-04:00
Run checkNewDataCon before constraint-solving newtype constructors

Within `checkValidDataCon`, we used to run `checkValidType` on the
argument types of a newtype constructor before running
`checkNewDataCon`, which ensures that the user does not attempt
non-sensical things such as newtypes with multiple arguments or
constraints. This works out in most situations, but this falls over
on a corner case revealed in #17955:

```hs
newtype T = Coercible () T => T ()
```

`checkValidType`, among other things, peforms an ambiguity check on
the context of a data constructor, and that it turn invokes the
constraint solver. It turns out that there is a special case in the
constraint solver for representational equalities (read: `Coercible`
constraints) that causes newtypes to be unwrapped (see
`Note [Unwrap newtypes first]` in `TcCanonical`). This special case
does not know how to cope with an ill formed newtype like `T`, so
it ends up panicking.

The solution is surprisingly simple: just invoke `checkNewDataCon`
before `checkValidType` to ensure that the illicit newtype
constructor context is detected before the constraint solver can
run amok with it.

Fixes #17955.

- - - - -
45eb9d8c by Krzysztof Gogolewski at 2020-03-29T17:33:59-04:00
Minor cleanup

- Simplify mkBuildExpr, the function newTyVars was called
  only on a one-element list.
- TTG: use noExtCon in more places. This is more future-proof.
- In zonkExpr, panic instead of printing a warning.

- - - - -
909fc2d5 by Ryan Scott at 2020-03-30T10:48:16-04:00
Require GHC 8.8 as the minimum compiler for bootstrapping

This allows us to remove several bits of CPP that are either always
true or no longer reachable. As an added bonus, we no longer need to
worry about importing `Control.Monad.Fail.fail` qualified to avoid
clashing with `Control.Monad.fail`, since the latter is now the same
as the former.

- - - - -
d5a3c1f3 by Ryan Scott at 2020-03-30T10:48:16-04:00
Add regression test for #17963

The panic in #17963 happened to be fixed by commit
e3c374cc5bd7eb49649b9f507f9f7740697e3f70. This patch adds a
regression test to ensure that it remains fixed.

Fixes #17963.

- - - - -
88ccc7b5 by Ömer Sinan Ağacan at 2020-03-30T10:48:22-04:00
Simplify stderrSupportsAnsiColors

The combinator andM is used only once, and the code is shorter and
simpler if you inline it.

- - - - -
7812d98f by Ben Gamari at 2020-03-30T10:48:23-04:00
base: Ensure that encoding global variables aren't inlined

As noted in #17970, these (e.g. `getFileSystemEncoding` and
`setFileSystemEncoding`) previously had unfoldings, which would
break their global-ness.

While not strictly necessary, I also add a NOINLINE on
`initLocaleEncoding` since it is used in `System.IO`, ensuring that we
only system's query the locale encoding once.

Fixes #17970.

- - - - -
58aba3e6 by Andreas Klebinger at 2020-03-30T10:48:24-04:00
Update hadrian index revision.

Required in order to build hadrian using ghc-8.10

- - - - -


30 changed files:

- .gitlab-ci.yml
- compiler/GHC.hs
- compiler/GHC/ByteCode/Asm.hs
- compiler/GHC/ByteCode/InfoTable.hs
- compiler/GHC/ByteCode/Instr.hs
- compiler/GHC/ByteCode/Linker.hs
- compiler/GHC/ByteCode/Types.hs
- compiler/GHC/Cmm.hs
- compiler/GHC/Cmm/BlockId.hs
- compiler/GHC/Cmm/BlockId.hs-boot
- compiler/GHC/Cmm/CLabel.hs
- compiler/GHC/Cmm/CommonBlockElim.hs
- compiler/GHC/Cmm/Dataflow.hs
- compiler/GHC/Cmm/Dataflow/Label.hs
- compiler/GHC/Cmm/DebugBlock.hs
- compiler/GHC/Cmm/Expr.hs
- compiler/GHC/Cmm/Graph.hs
- compiler/GHC/Cmm/Info.hs
- compiler/GHC/Cmm/Info/Build.hs
- compiler/GHC/Cmm/LayoutStack.hs
- compiler/GHC/Cmm/Lexer.x
- compiler/GHC/Cmm/Node.hs
- compiler/GHC/Cmm/Parser.y
- compiler/GHC/Cmm/Pipeline.hs
- compiler/GHC/Cmm/Ppr.hs
- compiler/GHC/Cmm/ProcPoint.hs
- compiler/GHC/Cmm/Sink.hs
- compiler/GHC/Cmm/Switch/Implement.hs
- compiler/GHC/Cmm/Utils.hs
- compiler/GHC/CmmToAsm.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/06ac69128b5872b5ae84e124be0fbea818ec427e...58aba3e6baffe815f17a331eaa77f37c955fa2be

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/06ac69128b5872b5ae84e124be0fbea818ec427e...58aba3e6baffe815f17a331eaa77f37c955fa2be
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/20200330/ad7ed138/attachment-0001.html>


More information about the ghc-commits mailing list