[Git][ghc/ghc][wip/no-coholes] 6 commits: Fix #17021 by checking more return kinds

Ben Gamari gitlab at gitlab.haskell.org
Thu Mar 19 13:23:52 UTC 2020



Ben Gamari pushed to branch wip/no-coholes at Glasgow Haskell Compiler / GHC


Commits:
53ff2cd0 by Richard Eisenberg at 2020-03-17T13:46:57Z
Fix #17021 by checking more return kinds

All the details are in new Note [Datatype return kinds] in
TcTyClsDecls.

Test case: typecheck/should_fail/T17021{,b}
           typecheck/should_compile/T17021a

Updates haddock submodule

- - - - -
528df8ec by Sylvain Henry at 2020-03-18T14:06:43Z
Modules: Core operations (#13009)

- - - - -
4e8a71c1 by Richard Eisenberg at 2020-03-18T14:07:19Z
Add release note about fix to #16502.

We thought we needed to update the manual, but the fix for #16502
actually brings the implementation in line with the manual. So we
just alert users of how to update their code.

- - - - -
5cbf9934 by Andreas Klebinger at 2020-03-19T04:39:27Z
Update "GHC differences to the FFI Chapter" in user guide.

The old entry had a heavy focus on how things had been. Which is
not what I generally look for in a user guide.

I also added a small section on behaviour of nested safe ffi calls.

[skip-ci]

- - - - -
b03fd3bc by Sebastian Graf at 2020-03-19T04:40:06Z
PmCheck: Use ConLikeSet to model negative info

In #17911, Simon recognised many warnings stemming from over-long list
unions while coverage checking Cabal's `LicenseId` module.

This patch introduces a new `PmAltConSet` type which uses a `UniqDSet`
instead of an association list for `ConLike`s. For `PmLit`s, it will
still use an assocation list, though, because a similar map data
structure would entail a lot of busy work.

Fixes #17911.

- - - - -
1cd5a211 by Richard Eisenberg at 2020-03-19T13:23:43Z
Simplify treatment of heterogeneous equality

Previously, if we had a [W] (a :: k1) ~ (rhs :: k2), we would
spit out a [D] k1 ~ k2 and part the W as irreducible, hoping for
a unification. But we needn't do this. Instead, we now spit out
a [W] co :: k2 ~ k1 and then use co to cast the rhs of the original
Wanted. This means that we retain the connection between the
spat-out constraint and the original.

The problem with this new approach is that we cannot use the
casted equality for substitution; it's too like wanteds-rewriting-
wanteds. So, we forbid CTyEqCans that mention coercion holes.

All the details are in Note [Equalities with incompatible kinds]
in TcCanonical.

There are a few knock-on effects, documented where they occur.

While debugging an error in this patch, Simon and I ran into
infelicities in how patterns and matches are printed; we made
small improvements.

This patch includes mitigations for #17828, which causes spurious
pattern-match warnings. When #17828 is fixed, these lines should
be removed.

- - - - -


30 changed files:

- compiler/GHC/Core.hs
- compiler/GHC/Core/Coercion.hs
- compiler/GHC/Core/Coercion/Axiom.hs
- compiler/GHC/Core/FamInstEnv.hs
- compiler/GHC/Core/Lint.hs
- compiler/GHC/Core/Make.hs
- compiler/simplCore/CSE.hs → compiler/GHC/Core/Op/CSE.hs
- compiler/simplCore/CallArity.hs → compiler/GHC/Core/Op/CallArity.hs
- compiler/prelude/PrelRules.hs → compiler/GHC/Core/Op/ConstantFold.hs
- compiler/stranal/CprAnal.hs → compiler/GHC/Core/Op/CprAnal.hs
- compiler/stranal/DmdAnal.hs → compiler/GHC/Core/Op/DmdAnal.hs
- compiler/simplCore/Exitify.hs → compiler/GHC/Core/Op/Exitify.hs
- compiler/simplCore/FloatIn.hs → compiler/GHC/Core/Op/FloatIn.hs
- compiler/simplCore/FloatOut.hs → compiler/GHC/Core/Op/FloatOut.hs
- compiler/simplCore/LiberateCase.hs → compiler/GHC/Core/Op/LiberateCase.hs
- compiler/simplCore/CoreMonad.hs → compiler/GHC/Core/Op/Monad.hs
- compiler/simplCore/CoreMonad.hs-boot → compiler/GHC/Core/Op/Monad.hs-boot
- compiler/simplCore/OccurAnal.hs → compiler/GHC/Core/Op/OccurAnal.hs
- compiler/simplCore/SetLevels.hs → compiler/GHC/Core/Op/SetLevels.hs
- compiler/simplCore/Simplify.hs → compiler/GHC/Core/Op/Simplify.hs
- compiler/simplCore/SimplCore.hs → compiler/GHC/Core/Op/Simplify/Driver.hs
- compiler/simplCore/SimplEnv.hs → compiler/GHC/Core/Op/Simplify/Env.hs
- compiler/simplCore/SimplMonad.hs → compiler/GHC/Core/Op/Simplify/Monad.hs
- compiler/simplCore/SimplUtils.hs → compiler/GHC/Core/Op/Simplify/Utils.hs
- compiler/specialise/SpecConstr.hs → compiler/GHC/Core/Op/SpecConstr.hs
- compiler/specialise/Specialise.hs → compiler/GHC/Core/Op/Specialise.hs
- compiler/simplCore/SAT.hs → compiler/GHC/Core/Op/StaticArgs.hs
- compiler/GHC/Core/Op/Tidy.hs
- compiler/stranal/WorkWrap.hs → compiler/GHC/Core/Op/WorkWrap.hs
- compiler/stranal/WwLib.hs → compiler/GHC/Core/Op/WorkWrap/Lib.hs


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/compare/11ea299ea4f079c5e2ec7eb859dcde6f900902b5...1cd5a2118bed700d42350ef94fb58d7e926e0235

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/compare/11ea299ea4f079c5e2ec7eb859dcde6f900902b5...1cd5a2118bed700d42350ef94fb58d7e926e0235
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/20200319/47d98529/attachment.html>


More information about the ghc-commits mailing list