[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 4 commits: Re CLC #300 - Specify fmap for NonEmpty as map
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Wed Jan 15 18:26:36 UTC 2025
Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC
Commits:
2d62b970 by Mike Pilgrem at 2025-01-13T12:59:10-05:00
Re CLC #300 - Specify fmap for NonEmpty as map
See:
* https://github.com/haskell/core-libraries-committee/issues/300
Seeks to:
* move existing instances for NonEmpty (except of Eq and Ord) out of GHC.Internal.Base into new GHC.Internal.Data.NonEmpty (to avoid otherwise unavoidable cycles in the module graph);
* move map out of Data.List.NonEmpty (base package) into GHC.Internal.Data.NonEmpty;
* define fmap as map for NonEmpty instance of Functor, avoiding code duplication;
* re-export map from existing GHC.Internal.Data.List.NonEmpty; and
* re-export map from Data.List.NonEmpty (base package);
without breaking anything in the GHC repository.
Various tests *.stdout and *.stderr files are amended also.
- - - - -
ab3ab3e3 by Luite Stegeman at 2025-01-13T12:59:58-05:00
compiler/coreprep: Turn off dictionary speculation by default
Speculative evaluation can cause performance regressions,
therefore we turn it off by default. It can be enabled again
with the -fspec-eval-dictfun flag
See #25284
- - - - -
3d9cacd5 by Patrick at 2025-01-14T02:34:46+08:00
Enhance kind inference for data family instances
This commit improves kind inference for data family instances by kind-checking
the constructors, for H98 and newtype declarations (ONLY), as well as
kind-checking the result kind signature (when using GADT syntax).
This fixes #25611.
Typechecker changes:
In `tcDataFamInstHeader`, we now kind-check the constructors using
`kcConDecls`, for H98-style decls and newtype decls ONLY.
See Note [Kind inference for data family instances].
Testsuite changes:
- The T25611{a,b,c,d} tests test the new kind inference implementation.
- a,b: infer result kind from constructors (H98 case)
- c: renamed version of test UnliftedNewtypesUnassociatedFamilyFail,
which now passes
- d: GADT case, checking that we don't infer overly rigid kinds when
kind-checking the constructors in data family instances.
- DataInstanceKindsDefaults tests defaulting data instance kinds
without UnliftedNewtypes or UnliftedDatatypes, as outlined in
Note [Defaulting result kind of newtype/data family instance].
Also a few notes are updated to reflect the changes.
Co-authored-by: default avatarSimon Peyton Jones <simon.peytonjones at gmail.com>
- - - - -
1f2c72de by amesgen at 2025-01-15T13:26:30-05:00
wasm: prevent bundlers from resolving import("node:timers")
This fixes the following esbuild error:
✘ [ERROR] Could not resolve "node:timers"
www/ghc_wasm_jsffi.js:66:25:
66 │ return (await import("node:timers")).setImmediate;
╵ ~~~~~~~~~~~~~
The package "node:timers" wasn't found on the file system but is built into node. Are you trying
to bundle for node? You can use "--platform=node" to do that, which will remove this error.
Previously (i.e. after !13503), one had to work around this by passing
`--external:node:timers`.
- - - - -
30 changed files:
- compiler/GHC/CoreToStg/Prep.hs
- compiler/GHC/Driver/DynFlags.hs
- compiler/GHC/Tc/Gen/HsType.hs
- compiler/GHC/Tc/TyCl.hs
- compiler/GHC/Tc/TyCl/Instance.hs
- docs/users_guide/using-optimisation.rst
- libraries/base/changelog.md
- libraries/base/src/Data/List/NonEmpty.hs
- libraries/base/src/Data/Semigroup.hs
- libraries/base/src/GHC/Base.hs
- libraries/ghc-internal/ghc-internal.cabal.in
- libraries/ghc-internal/src/GHC/Internal/Base.hs
- libraries/ghc-internal/src/GHC/Internal/Control/Monad/Fix.hs
- libraries/ghc-internal/src/GHC/Internal/Control/Monad/Zip.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Data.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Foldable.hs
- libraries/ghc-internal/src/GHC/Internal/Data/List/NonEmpty.hs
- + libraries/ghc-internal/src/GHC/Internal/Data/NonEmpty.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Traversable.hs
- libraries/ghc-internal/src/GHC/Internal/Generics.hs
- libraries/ghc-internal/src/GHC/Internal/TH/Lib.hs
- libraries/ghc-internal/src/GHC/Internal/TH/Lift.hs
- libraries/ghc-internal/src/GHC/Internal/TH/Syntax.hs
- libraries/ghc-internal/src/GHC/Internal/Text/ParserCombinators/ReadP.hs
- + testsuite/tests/indexed-types/should_compile/DataInstanceKindsDefaults.hs
- + testsuite/tests/indexed-types/should_compile/T25611a.hs
- + testsuite/tests/indexed-types/should_compile/T25611b.hs
- testsuite/tests/typecheck/should_fail/UnliftedNewtypesUnassociatedFamilyFail.hs → testsuite/tests/indexed-types/should_compile/T25611c.hs
- + testsuite/tests/indexed-types/should_compile/T25611d.hs
- testsuite/tests/indexed-types/should_compile/all.T
The diff was not included because it is too large.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/810bb35119a7ae69007e7f0e83810180541f0ce8...1f2c72de016016a10ecd85e8a1df3fa0d84d24cd
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/810bb35119a7ae69007e7f0e83810180541f0ce8...1f2c72de016016a10ecd85e8a1df3fa0d84d24cd
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/20250115/969c8d84/attachment-0001.html>
More information about the ghc-commits
mailing list