[Git][ghc/ghc][wip/romes/9557] 11 commits: Refactored BooleanFormula to be in line with TTG (#21592)
Rodrigo Mesquita (@alt-romes)
gitlab at gitlab.haskell.org
Thu Nov 7 11:06:59 UTC 2024
Rodrigo Mesquita pushed to branch wip/romes/9557 at Glasgow Haskell Compiler / GHC
Commits:
97f600c6 by Hassan Al-Awwadi at 2024-11-04T15:52:12+00:00
Refactored BooleanFormula to be in line with TTG (#21592)
There are two parts to this commit.
* We moved the definition of BooleanFormula over to L.H.S.BooleanFormula
* We parameterized the BooleanFormula over the pass
The GHC specific details of BooleanFormula remain in Ghc.Data.BooleanFormula.
Because its parameterized over the pass its no longer a functor or
traversable, but we defined bfMap and bfTraverse for the cases where we
needed fmap and traverse originally. Most other changes are just churn.
-------------------------
Metric Decrease:
MultiLayerModulesTH_OneShot
-------------------------
- - - - -
d4fd3580 by Andreas Klebinger at 2024-11-05T07:36:16-05:00
ghc-heap: Fix incomplete selector warnings.
Use utility functions instead of selectors to read partial attributes.
Part of fixing #25380.
- - - - -
fdd9f62a by Peter Trommler at 2024-11-05T07:36:51-05:00
PPC NCG: Implement fmin and fmax
- - - - -
8e217256 by Mike Pilgrem at 2024-11-07T04:34:20-05:00
Re CLC #293 - Don't specify Data.List.NonEmpty in terms of partial
See https://github.com/haskell/core-libraries-committee/issues/293
`List.init` had already been driven out of `tails1` by 21fc180bec93d964a7f4ffdf2429ef6f74b49ab6 but this specification also avoided partial `fromList`, so I preferred it.
The `changelog.md` for `base` is updated, with an entry added under `base-4.22.0.0`.
- - - - -
346e4cd1 by Zubin Duggal at 2024-11-07T04:34:57-05:00
release: copy zip files into the correct directory
Fixes #25446
- - - - -
bbdbe225 by Zubin Duggal at 2024-11-07T04:34:57-05:00
release: Sign .gz bindists too
Fixes #25447
- - - - -
0c722e14 by Hécate Kleidukos at 2024-11-07T04:35:37-05:00
hadrian: Enforce the usage of GHC >=9.8.1 for ghci-multi
GHC 9.6 no good when it comes to multi-repl stuff, despite being well
within the range of n-2 releases for bootstrapping, when the script was
adapted to load haddock, in !12851
- - - - -
c19d2999 by Rodrigo Mesquita at 2024-11-07T11:06:35+00:00
Improve performance of deriving Show
Significantly improves performance of deriving Show instances by
avoiding using the very polymorphic `.` operator in favour of inlining
its definition. We were generating tons of applications of it, each
which had 3 type arguments!
Improves on #9557
-------------------------
Metric Decrease:
InstanceMatching
T12707
T3294
------------------------
- - - - -
8935fbc0 by Rodrigo Mesquita at 2024-11-07T11:06:36+00:00
Deriving Ord: compare and <= only
Since the implementation of CLC proposal #24, the default
implementations of Ord's `<`, `>`, and `>=` are given in terms of `<=`.
This means we no longer need to generate implementations for these
methods when stock deriving `Ord`. Rather, just derive the
implementation of `compare` and `<=`, and rely on the default
implementations for the others.
- - - - -
00861f5f by Rodrigo Mesquita at 2024-11-07T11:06:36+00:00
Don't eta expand cons when deriving Data
This eta expansion was introduced with the initial commit for Linear
types.
I believe this isn't needed any longer. My guess is it is an artifact
from the initial linear types implementation: data constructors are
linear, but they shouldn't need to be eta expanded to be used as higher
order functions. I suppose in the early days this wasn't true.
For instance, this works now:
data T x = T x
f = \(x :: forall y. y -> T y) -> x True
f T -- ok!
T is linear, but can be passed where an unrestricted higher order
function is expected. I recall there being some magic around to make
this work for data constructors...
Since this works, there's no need to eta_expand the data constructors in
the derived Data instances.
- - - - -
37b40db8 by Rodrigo Mesquita at 2024-11-07T11:06:36+00:00
deriving Traversable: Eta reduce more constructor
We were generating unnecessarily eta-expanded lambdas in derived
Traversable instances (via mkSimpleConMatch2).
We can generate smaller code by eta-reducing all trailing arguments
which do mention the last type variable
- - - - -
30 changed files:
- .gitlab/rel_eng/recompress-all
- .gitlab/rel_eng/upload.sh
- compiler/GHC/CmmToAsm/PPC/CodeGen.hs
- compiler/GHC/CmmToAsm/PPC/Instr.hs
- compiler/GHC/CmmToAsm/PPC/Ppr.hs
- compiler/GHC/Core/Class.hs
- compiler/GHC/CoreToIface.hs
- compiler/GHC/Data/BooleanFormula.hs
- compiler/GHC/Hs/Binds.hs
- compiler/GHC/Hs/Decls.hs
- compiler/GHC/Hs/Instances.hs
- compiler/GHC/Hs/Utils.hs
- compiler/GHC/Iface/Decl.hs
- compiler/GHC/Iface/Ext/Ast.hs
- compiler/GHC/Iface/Syntax.hs
- compiler/GHC/IfaceToCore.hs
- compiler/GHC/Parser.y
- compiler/GHC/Rename/Bind.hs
- compiler/GHC/Runtime/Heap/Inspect.hs
- compiler/GHC/Tc/Deriv/Functor.hs
- compiler/GHC/Tc/Deriv/Generate.hs
- compiler/GHC/Tc/TyCl/Class.hs
- compiler/GHC/Tc/TyCl/Instance.hs
- compiler/Language/Haskell/Syntax/Binds.hs
- + compiler/Language/Haskell/Syntax/BooleanFormula.hs
- compiler/ghc.cabal.in
- docs/users_guide/9.14.1-notes.rst
- hadrian/ghci-multi-cabal.in
- libraries/base/changelog.md
- libraries/base/src/Data/List/NonEmpty.hs
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/5f730439d106b18f35ee7b1949b3a1498b2fc1ee...37b40db8ec8b362ee8bd5e1da9eba025648ae2cc
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/5f730439d106b18f35ee7b1949b3a1498b2fc1ee...37b40db8ec8b362ee8bd5e1da9eba025648ae2cc
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/20241107/a0dfc857/attachment.html>
More information about the ghc-commits
mailing list