[Git][ghc/ghc][wip/backports] 10 commits: Add orderingTyCon to wiredInTyCons (#18185)
Ben Gamari
gitlab at gitlab.haskell.org
Sun May 31 22:03:45 UTC 2020
Ben Gamari pushed to branch wip/backports at Glasgow Haskell Compiler / GHC
Commits:
88fd4829 by Ryan Scott at 2020-05-31T18:03:38-04:00
Add orderingTyCon to wiredInTyCons (#18185)
`Ordering` needs to be wired in for use in the built-in `CmpNat` and
`CmpSymbol` type families, but somehow it was never added to the list
of `wiredInTyCons`, leading to the various oddities observed
in #18185. Easily fixed by moving `orderingTyCon` from
`basicKnownKeyNames` to `wiredInTyCons`.
Fixes #18185.
(cherry picked from commit 6ca3d6a6c19dcd885f3b0beeda192cd90e83e0bd)
- - - - -
a6befeb3 by Ben Gamari at 2020-05-31T18:03:38-04:00
simplCore: Ignore ticks in rule templates
This fixes #17619, where a tick snuck in to the template of a rule,
resulting in a panic during rule matching. The tick in question was
introduced via post-inlining, as discussed in `Note [Simplifying
rules]`. The solution we decided upon was to simply ignore ticks in the
rule template, as discussed in `Note [Tick annotations in RULE
matching]`.
Fixes #18162.
Fixes #17619.
(cherry picked from commit dcd6bdcce57430d08b335014625722c487ea08e4)
- - - - -
fa36474d by Tuan Le at 2020-05-31T18:03:38-04:00
llvmGen: Consider Relocatable read-only data as not constantReferences: #18137
(cherry picked from commit 0004ccb885e534c386ceae21580fc59ec7ad0ede)
- - - - -
4a73e707 by Ben Gamari at 2020-05-31T18:03:38-04:00
rts/CNF: Fix fixup comparison function
Previously we would implicitly convert the difference between two words
to an int, resulting in an integer overflow on 64-bit machines.
Fixes #16992
(cherry picked from commit cf4f1e2f78840d25b132de55bce1e02256334ace)
- - - - -
4219e9c1 by Ryan Scott at 2020-05-31T18:03:38-04:00
Make boxed 1-tuples have known keys
Unlike other tuples, which use special syntax and are "known" by way
of a special `isBuiltInOcc_maybe` code path, boxed 1-tuples do not
use special syntax. Therefore, in order to make sure that the
internals of GHC are aware of the `data Unit a = Unit a` definition
in `GHC.Tuple`, we give `Unit` known keys. For the full details, see
`Note [One-tuples] (Wrinkle: Make boxed one-tuple names have known keys)`
in `GHC.Builtin.Types`.
Fixes #18097.
(cherry picked from commit 518a63d4d7e31e49a81ad66d5e5ccb1f790f6de9)
- - - - -
761909b9 by Ryan Scott at 2020-05-31T18:03:38-04:00
Create di_scoped_tvs for associated data family instances properly
See `Note [Associated data family instances and di_scoped_tvs]` in
`GHC.Tc.TyCl.Instance`, which explains all of the moving parts.
Fixes #18055.
(cherry picked from commit cd8409c26d4370bf2cdcd76801974e99a9adf7b0)
- - - - -
30037e6d by Sebastian Graf at 2020-05-31T18:03:38-04:00
PmCheck: Adjust recursion depth for inhabitation test
In #17977, we ran into the reduction depth limit of the typechecker.
That was only a symptom of a much broader issue: The recursion depth
of the coverage checker for trying to instantiate strict fields in the
`nonVoid` test was far too high (100, the `defaultMaxTcBound`).
As a result, we were performing quite poorly on `T17977`.
Short of a proper termination analysis to prove emptyness of a type,
we just arbitrarily default to a much lower recursion limit of 3.
Fixes #17977.
(cherry picked from commit ed58d4fdcbc7b4fa8fbdf3d638a8d53c444ef4f2)
- - - - -
1666baa6 by Simon Peyton Jones at 2020-05-31T18:03:38-04:00
Improve skolemisation
This patch avoids skolemiseUnboundMetaTyVar making
up a fresh Name when it doesn't need to.
See Note [Skolemising and identity]
Improves error messsages for partial type signatures.
(cherry picked from commit d7002bccd7d131f8ee9b1ddcd83d62262622294d)
- - - - -
84ba6d2c by Simon Peyton Jones at 2020-05-31T18:03:38-04:00
Improve pretty-printing for TyConBinders
In particular, show their kinds.
(cherry picked from commit fa37940cd72f82abc460f5c0a5de64dd75cee6ae)
- - - - -
35277140 by Simon Peyton Jones at 2020-05-31T18:03:38-04:00
Fix scoping of TyCon binders in TcTyClsDecls
This patch fixes #17566 by refactoring the way we decide the final
identity of the tyvars in the TyCons of a possibly-recursive nest
of type and class decls, possibly with associated types.
It's all laid out in
Note [Swizzling the tyvars before generaliseTcTyCon]
Main changes:
* We have to generalise each decl (with its associated types)
all at once: TcTyClsDecls.generaliseTyClDecl
* The main new work is done in TcTyClsDecls.swizzleTcTyConBndrs
* The mysterious TcHsSyn.zonkRecTyVarBndrs dies altogether
Other smaller things:
* A little refactoring, moving bindTyClTyVars from tcTyClDecl1
to tcDataDefn, tcSynRhs, etc. Clearer, reduces the number of
parameters
* Reduce the amount of swizzling required.
Specifically, bindExplicitTKBndrs_Q_Tv doesn't need
to clone a new Name for the TyVarTv, and not
cloning means that in the vasly common case,
swizzleTyConBndrs is a no-op
In detail:
Rename newTyVarTyVar --> cloneTyVarTyVar
Add newTyVarTyTyVar that doesn't clone
Use the non-cloning newTyVarTyVar in
bindExplicitTKBndrs_Q_Tv
Rename newFlexiKindedTyVarTyVar
--> cloneFlexiKindedTyVarTyVar
* Define new utility function and use it
HsDecls.familyDeclName ::
FamilyDecl (GhcPass p) -> IdP (GhcPass p)
Updates haddock submodule.
(cherry picked from commit b9605396f1f1560aea94792646b835cadcb49f45)
- - - - -
30 changed files:
- compiler/GHC/Hs/Decls.hs
- compiler/GHC/HsToCore/PmCheck/Oracle.hs
- compiler/cmm/Cmm.hs
- compiler/cmm/PprC.hs
- compiler/llvmGen/LlvmCodeGen/Data.hs
- compiler/prelude/PrelInfo.hs
- compiler/prelude/PrelNames.hs
- compiler/prelude/TysWiredIn.hs
- compiler/simplCore/SimplUtils.hs
- compiler/specialise/Rules.hs
- compiler/typecheck/TcHsSyn.hs
- compiler/typecheck/TcHsType.hs
- compiler/typecheck/TcInstDcls.hs
- compiler/typecheck/TcMType.hs
- compiler/typecheck/TcTyClsDecls.hs
- compiler/types/TyCon.hs
- + libraries/ghc-compact/tests/T16992.hs
- + libraries/ghc-compact/tests/T16992.stdout
- libraries/ghc-compact/tests/all.T
- rts/sm/CNF.c
- + testsuite/tests/codeGen/should_gen_asm/T18137.asm
- + testsuite/tests/codeGen/should_gen_asm/T18137.hs
- testsuite/tests/codeGen/should_gen_asm/all.T
- + testsuite/tests/deriving/should_compile/T18055.hs
- testsuite/tests/deriving/should_compile/all.T
- testsuite/tests/partial-sigs/should_compile/ExprSigLocal.stderr
- testsuite/tests/partial-sigs/should_compile/SplicesUsed.stderr
- testsuite/tests/partial-sigs/should_compile/T10519.stderr
- testsuite/tests/partial-sigs/should_compile/T12844.stderr
- testsuite/tests/partial-sigs/should_compile/T13482.stderr
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/254e625fcc89c13cf5d8476859acd7c4e2170f80...3527714032fecf4e2cedec3a80b1642dec4224f1
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/254e625fcc89c13cf5d8476859acd7c4e2170f80...3527714032fecf4e2cedec3a80b1642dec4224f1
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/20200531/54cbed9e/attachment.html>
More information about the ghc-commits
mailing list