[Git][ghc/ghc][wip/az/unicode-hsscaled] 11 commits: gitlab-ci: Allow doc-tarball job to fail

Alan Zimmerman gitlab at gitlab.haskell.org
Sun Oct 18 09:31:27 UTC 2020



Alan Zimmerman pushed to branch wip/az/unicode-hsscaled at Glasgow Haskell Compiler / GHC


Commits:
aca0e63b by Ben Gamari at 2020-10-17T10:20:31-04:00
gitlab-ci: Allow doc-tarball job to fail

Currently the Hadrian build appears not to package documentation correctly,
causing doc-tarball to fail due to the Windows build.
- - - - -
b02a9ea7 by Ben Gamari at 2020-10-17T13:26:24-04:00
gitlab-ci: s/allow_newer/allow_failure

Silly mistake on my part.
- - - - -
59d7c9f4 by John Ericson at 2020-10-17T22:01:38-04:00
Skip type family defaults with hs-boot and hsig files

Works around #17190, possible resolution for #17224. New design is is
according to accepted [GHC Propoal 320].

Instances in signatures currently unconditionally opt into associated
family defaults if no explicit instance is given. This is bad for two
reasons:

  1. It constrains possible instantiations to use the default, rather
  than possibly define the associated family differently.

  2. It breaks compilation as type families are unsupported in
  signatures.

This PR simply turns off the filling in of defaults in those cases.
Additionally, it squelches a missing definition warning for hs-boot too
that was only squelched for hsig before.

The downsides are:

  1. There is no way to opt into the default, other than copying its
  definition.

  2. If we fixed type classes in signatures, and wanted instances to
  have to explicitly *out of* rather than into the default, that would
  now be a breaking change.

The change that is most unambiguously goood is harmonizing the warning
squelching between hs-boot or hsig. Maybe they should have the warning
(opt out of default) maybe they shouldn't (opt in to default), but
surely it should be the same for both.

Add hs-boot version of a backpack test regarding class-specified
defaults in instances that appear in an hs-boot file.

The metrics increase is very slight and makes no sense --- at least no
one has figured anything out after this languishing for a while, so I'm
just going to accept it.

Metric Increase:
  T10421a

[GHC proposal 320]: https://github.com/ghc-proposals/ghc-proposals/pull/320

- - - - -
7eb46a09 by Sebastian Graf at 2020-10-17T22:02:13-04:00
Arity: Refactor fixed-point iteration in GHC.Core.Opt.Arity

Arity analysis used to propagate optimistic arity types during
fixed-point interation through the `ArityEnv`'s `ae_cheap_fun` field,
which is like `GHC.Core.Utils.exprIsCheap`, but also considers the
current iteration's optimistic arity, for the binder in question only.

In #18793, we have seen that this is a problematic design, because it
doesn't allow us to look through PAP bindings of that binder.

Hence this patch refactors to a more traditional form with an explicit
signature environment, in which we record the optimistic `ArityType` of
the binder in question (and at the moment is the *only* binder that is
recorded in the arity environment).

- - - - -
6b3eb06a by Sebastian Graf at 2020-10-17T22:02:13-04:00
Arity: Record arity types for non-recursive lets

In #18793, we saw a compelling example which requires us to look at
non-recursive let-bindings during arity analysis and unleash their arity
types at use sites.

After the refactoring in the previous patch, the needed change is quite
simple and very local to `arityType`'s defn for non-recurisve `Let`.

Apart from that, we had to get rid of the second item of
`Note [Dealing with bottoms]`, which was entirely a safety measure and
hindered optimistic fixed-point iteration.

Fixes #18793.

The following metric increases are all caused by this commit and a
result of the fact that we just do more work now:

Metric Increase:
    T3294
    T12545
    T12707

- - - - -
451455fd by Sebastian Graf at 2020-10-17T22:02:13-04:00
Testsuite: Add dead arity analysis tests

We didn't seem to test these old tests at all, judging from their
expected output.

- - - - -
50e9df49 by Dylan Yudaken at 2020-10-17T22:02:50-04:00
When using rts_setInCallCapability, lock incall threads

This diff makes sure that incall threads, when using `rts_setInCallCapability`, will be created as locked.
If the thread is not locked, the thread might end up being scheduled to a different capability.
While this is mentioned in the docs for `rts_setInCallCapability,`, it makes the method significantly less useful as there is no guarantees on the capability being used.

This commit also adds a test to make sure things stay on the correct capability.

- - - - -
0b995759 by DylanZA at 2020-10-17T22:02:50-04:00
Apply suggestion to testsuite/tests/ffi/should_run/all.T
- - - - -
a91dcb66 by Sylvain Henry at 2020-10-17T22:04:02-04:00
Don't get host RTS ways via settings (#18651)

To correctly perform a linking hack for Windows we need to link with the
RTS GHC is currently using. We used to query the RTS ways via the
"settings" file but it is fragile (#18651). The hack hasn't been fixed
to take into account all the ways (Tracing) and it makes linking of GHC
with another RTS more difficult (we need to link with another RTS and to
regenerate the settings file).

So this patch uses the ways reported by the RTS itself
(GHC.Platform.Ways.hostWays) instead of the "settings" file.

- - - - -
d858a3ae by Hécate at 2020-10-17T22:04:38-04:00
Linting corrections

* Bring back LANGUAGE pragmas in GHC.IO.Handle.Lock.Windows
* Exclude some modules that are wrongfully reported

- - - - -
73b54b85 by Alan Zimmerman at 2020-10-18T10:28:57+01:00
API Annotations: Keep track of unicode for linear arrow notation

The linear arrow can be parsed as `%1 ->` or a direct single token unicode
equivalent.

Make sure that this distinction is captured in the parsed AST by using
IsUnicodeSyntax where it appears, and introduce a new API Annotation,
AnnMult to represent its location when unicode is not used.

Updated haddock submodule

- - - - -


30 changed files:

- .gitlab-ci.yml
- compiler/GHC/Core/Opt/Arity.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/Hs/Type.hs
- compiler/GHC/Hs/Utils.hs
- compiler/GHC/HsToCore/Foreign/Decl.hs
- compiler/GHC/Parser.y
- compiler/GHC/Parser/Annotation.hs
- compiler/GHC/Parser/PostProcess.hs
- compiler/GHC/Parser/PostProcess/Haddock.hs
- compiler/GHC/Platform.hs
- compiler/GHC/Rename/HsType.hs
- compiler/GHC/Settings.hs
- compiler/GHC/Settings/IO.hs
- compiler/GHC/SysTools.hs
- compiler/GHC/Tc/Gen/HsType.hs
- compiler/GHC/Tc/Module.hs
- compiler/GHC/Tc/TyCl.hs
- compiler/GHC/Tc/TyCl/Class.hs
- compiler/GHC/Tc/TyCl/Instance.hs
- compiler/GHC/ThToHs.hs
- ghc/GHCi/UI.hs
- hadrian/src/Rules/Generate.hs
- includes/RtsAPI.h
- includes/ghc.mk
- libraries/base/.hlint.yaml
- rts/RtsAPI.c
- rts/RtsSymbols.c
- − testsuite/tests/arityanal/Main.hs
- − testsuite/tests/arityanal/Main.stderr


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/2c0c88f14d653ce0a607b42911759761cd695fe8...73b54b856f6b97f88424f59795abd2b3eba16e2d

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/2c0c88f14d653ce0a607b42911759761cd695fe8...73b54b856f6b97f88424f59795abd2b3eba16e2d
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/20201018/7af2be81/attachment-0001.html>


More information about the ghc-commits mailing list