-
576987d0
by Simon Jakobi at 2026-06-02T04:53:36-04:00
compiler: use nubOrd from containers
Address #27103 by replacing GHC.Utils.Misc.ordNub[On] with
Data.Containers.ListUtils.nubOrd[On].
Note that nubOrd suffers from a small inefficiency, a fix for which
will be included in the next containers release:
https://github.com/haskell/containers/issues/1202
-
deea53c3
by David Eichmann at 2026-06-02T04:54:22-04:00
Hadrian: disable response files for GHC/Haddock builders on non-Windows
This makes debugging build errors easier on non-windows hosts.
See issue #27230
-
f2f5c6ba
by Nikita Efremov at 2026-06-02T16:04:54+00:00
fix typo : compete with performance, not complete
-
5524ea0e
by Wolfgang Jeltsch at 2026-06-03T08:01:26-04:00
Make the current `base` buildable with GHC 9.14
This comprises the following changes:
* Disable some imports into `GHC.Base` for GHC 9.14
* Disable some imports into `Prelude` for GHC 9.14
* Disable separate `ArrowLoop` import for GHC 9.14
* Disable `GHC.Internal.STM` import for GHC 9.14
* Disable `GHC.Internal.Unicode.Version` import for GHC 9.14
* Disable `GHC.Internal.TH.Monad` import for GHC 9.14
* Add alternative `fixIO` import for GHC 9.14
* Add alternative `unsafeCodeCoerce` import for GHC 9.14
* Disable hiding of imported SIMD operations for GHC 9.14
* Disable use of GHC 9.14’s `printToHandleFinalizerExceptionHandler`
* Enable use of `getFileHash` from `ghc-internal` for GHC 9.14
* Make `thenA` available for GHC 9.14
* Make `thenM` available for GHC 9.14
* Disable translation of `IoManagerFlagPoll` for GHC 9.14
* Add `hGetNewlineMode` for GHC 9.14
-
d3438055
by Enrico Maria De Angelis at 2026-06-03T08:02:17-04:00
Fix #27067 - Clarify haddocks on `minusNaturalMaybe`
-
f9bcfac2
by sheaf at 2026-06-03T14:47:19-04:00
Avoid mkTick in Core Prep breaking ANF
As discovered in #27182, mkTick can break ANF. This patch introduces a
variant of mkTick that skips the single optimisation that could break
ANF. This is preferrable over switching to the raw Tick constructor,
as the latter may introduce spurious cost centres in profiling reports.
This is a temporary measure until we more thoroughly refactor how
mkTick works (see #27141).
See Note [mkTick breaks ANF] in GHC.CoreToStg.Prep.
Fixes #27182
-
cf1fd661
by Artem Pelenitsyn at 2026-06-03T14:48:09-04:00
clarify comment for getSizeofMutableByteArray#: we get the size in bytes, not "elements"
-
a3b431f3
by David Eichmann at 2026-06-04T10:10:19+00:00
Hadrian: convert env variable ACLOCAL_PATH to unix paths.
Convert ACLOCAL_PATH to a unix style path when invoking autoreconf.
Autoreconf doesn't handle windows paths.
See Note [Autoreconf unix paths from ACLOCAL_PATH].
Fixes #27311
-
18f6138a
by Simon Jakobi at 2026-06-04T20:20:31-04:00
testsuite: Deduplicate --only test names
config.only is assumed to be a set, but supplying --only overwrote it
with the (list) argparse result, which can contain duplicates. When a
test ran, config.only.remove(name) dropped only the first occurrence,
so a duplicated name lingered and was later misreported as a
"test not found" framework failure. Store it as a set instead.
Fixes #27322
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
-
2f3cc9ff
by Simon Jakobi at 2026-06-08T07:55:49-04:00
testsuite: detect fast bignum via ghc-internal, not removed ghc-bignum
The ghc-bignum package was merged into ghc-internal, so the BIGNUM_GMP
probe in test.mk ran `ghc-pkg field ghc-bignum exposed-modules`, which
fails with "cannot find package ghc-bignum". That error went to stderr
and leaked into the captured stderr of every makefile_test, causing
spurious [bad stderr] failures across the suite. The probe also silently
returned empty, so config.have_fast_bignum was wrongly False even on GMP
builds.
Probe ghc-internal's extra-libraries for the gmp library instead: the
GMP backend module is an other-module (not exposed), but GMP_LIBS adds
gmp to extra-libraries only on a GMP build, so this distinguishes the
backends. Redirect stderr to keep any future missing-package error off
the harness's stderr.
This also removes a stale comment as per suggestion from hsyl20.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
-
eb3bf6e7
by Alan Zimmerman at 2026-06-08T07:56:32-04:00
EPA: Rename Transform.anchorEof to addModuleCommentOrigDeltas
This now matches what it actually does.
-
f578388e
by Simon Jakobi at 2026-06-09T13:22:39+02:00
Add support for related locations in Diagnostic
Diagnostics can now carry "related locations" -- additional source spans
beyond the primary error span. See the new Note [The source span model for
diagnostics] for the model and its correspondence to the LSP Diagnostic /
relatedInformation interfaces. This prepares the ground for #22637; the
diagnosticRelatedLocations name is inspired by #23414.
Implementation:
* Related spans are carried through the MCDiagnostic message class, the
single source of truth; decorateDiagnostic reads them from there.
* getCaretDiagnostics takes the show-caret flag and returns the real spans
that got no caret (sorted and deduped), splitting each span into
'Either SDoc RealSrcSpan' via partitionEithers; decorateDiagnostic lists
those under the "At:" heading. Spans are deduped by real span, ignoring
the BufSpan, so a duplicate export's related span (which often differs
from the primary only in its BufSpan) is not listed twice. The single-span
getCaretDiagnostic lost its only caller and is removed along with its
exports and .hs-boot declaration.
JSON output:
* Emit related spans as a new "relatedSpans" field and bump the JSON schema
version 1.2 -> 1.3 (additive, backwards compatible).
Diagnostics converted:
* TcRnBindingNameConflict, TcRnDuplicateDecls, TcRnDuplicateExport and
TcRnDuplicateNamedDefaultExport carry related locations. The now-redundant
location prose is removed from TcRnBindingNameConflict ("Bound at:") and
TcRnDuplicateDecls ("Declared at:"), and TcRnDuplicateNamedDefaultExport
is reworded (its two export items are always identical). check_occs threads
LIE GhcPs so export items carry their source spans. TcRnConflictingExports
and TcRnDuplicateFieldExport were tried but reverted: their export items
and name provenance already appear in the message text, so carets only
duplicated the primary span.
Tests:
* Enable -fdiagnostics-show-caret in several tests to show multi-caret
output, and add MultiCaretFallback exercising a diagnostic whose related
locations are split between carets and the "At:" fallback.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
-
b4d9842a
by Simon Jakobi at 2026-06-09T16:04:39+02:00
WIP: Diagnostics: preserve author's order of related locations
The caret/At: renderer used to sort and dedup the diagnostic's source spans
by position, overriding whatever order the message author chose. Make order
the author's responsibility instead:
* decorateDiagnostic no longer nubs; sourceSpans is just primary :| related.
* getCaretDiagnostics deduplicates while preserving the given order, rather
than sorting first. This is now the only dedup.
The construction-site leftmost_smallest sort is thus the sole authority on
order. Note [The source span model for diagnostics] records that authors must
order related spans deterministically themselves.
To keep "Multiple declarations" output in source order under the new rule,
addDupDeclErr now reports at the first declaration (NE.head) rather than the
last, matching TcRnBindingNameConflict; the related spans become NE.tail.
Expected outputs updated accordingly.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>