-
2157db2d
by sterni at 2025-08-08T15:32:39-04:00
hadrian: enable terminfo if --with-curses-* flags are given
The GHC make build system used to support WITH_TERMINFO in ghc.mk which
allowed controlling whether to build GHC with terminfo or not. hadrian
has replaced this with a system where this is effectively controlled by
the cross-compiling setting (the default WITH_TERMINFO value was bassed
on CrossCompiling, iirc).
This behavior is undesireable in some cases and there is not really a
good way to work around it. Especially for downstream packagers,
modifying this via UserSettings is not really feasible since such a
source file has to be kept in sync with Settings/Default.hs manually
since it can't import Settings.Default or any predefined Flavour
definitions.
To avoid having to add a new setting to cfg/system.config and/or a new
configure flag (though I'm happy to implement both if required), I've
chosen to take --with-curses-* being set explicitly as an indication
that the user wants to have terminfo enabled. This would work for
Nixpkgs which sets these flags [1] as well as haskell.nix [2] (which
goes to some extreme measures [3] [4] to force terminfo in all scenarios).
In general, I'm an advocate for making the GHC build be the same for
native and cross insofar it is possible since it makes packaging GHC and
Haskell related things while still supporting cross much less
compilicated. A more minimal GHC with reduced dependencies should
probably be a specific flavor, not the default.
Partially addresses #26288 by forcing terminfo to be built if the user
explicitly passes configure flags related to it. However, it isn't built
by default when cross-compiling yet nor is there an explicit way to
control the package being built.
[1]: https://github.com/NixOS/nixpkgs/blob/3a7266fcefcb9ce353df49ba3f292d06443760bb/pkgs/development/compilers/ghc/common-hadrian.nix#L513-L515
[2]: https://github.com/input-output-hk/haskell.nix/blob/6eaafcdf04bab7be745d1aa4f74d2cc85700042b/compiler/ghc/default.nix#L185
[3]: https://github.com/input-output-hk/haskell.nix/blob/6eaafcdf04bab7be745d1aa4f74d2cc85700042b/compiler/ghc/default.nix#L678-L682
[4]: https://github.com/input-output-hk/haskell.nix/blob/6eaafcdf04bab7be745d1aa4f74d2cc85700042b/compiler/ghc/default.nix#L772-L773
-
b3c31488
by David Feuer at 2025-08-08T15:33:21-04:00
Add default QuasiQuoters
Add `defaultQuasiQuoter` and `namedDefaultQuasiQuoter` to make it easier
to write `QuasiQuoters` that give helpful error messages when they're
used in inappropriate contexts.
Closes #24434.
-
03555ed8
by Sylvain Henry at 2025-08-10T22:20:57-04:00
Handle non-fractional CmmFloats in Cmm's CBE (#26229)
Since f8d9d016305be355f518c141f6c6d4826f2de9a2, toRational for Float and
Double converts float's infinity and NaN into Rational's infinity and
NaN (respectively 1%0 and 0%0).
Cmm CommonBlockEliminator hashing function needs to take these values
into account as they can appear as literals now. See added testcase.
-
6c956af3
by J. Ryan Stinnett at 2025-08-10T22:21:42-04:00
Fix extensions list in `DoAndIfThenElse` docs
-
6dc420b1
by J. Ryan Stinnett at 2025-08-10T22:21:42-04:00
Document status of `RelaxedPolyRec` extension
This adds a brief extension page explaining the status of the
`RelaxedPolyRec` extension. The behaviour of this mode is already
explained elsewhere, so this page is mainly for completeness so that
various lists of extensions have somewhere to point to for this flag.
Fixes #18630
-
18036d52
by Simon Peyton Jones at 2025-08-11T11:31:20-04:00
Take more care in zonkEqTypes on AppTy/AppTy
This patch fixes #26256.
See Note [zonkEqTypes and the PKTI] in GHC.Tc.Solver.Equality
-
c8d76a29
by Zubin Duggal at 2025-08-11T11:32:02-04:00
ci: upgrade bootstrap compiler on windows to 9.10.1
-
34fc50c1
by Ben Gamari at 2025-08-11T13:36:25-04:00
Kill IOPort#
This type is unnecessary, having been superceded by `MVar` and a rework
of WinIO's blocking logic.
See #20947.
See https://github.com/haskell/core-libraries-committee/issues/213.
-
56b32c5a
by sheaf at 2025-08-12T10:00:19-04:00
Improve deep subsumption
This commit improves the DeepSubsumption sub-typing implementation
in GHC.Tc.Utils.Unify.tc_sub_type_deep by being less eager to fall back
to unification.
For example, we now are properly able to prove the subtyping relationship
((∀ a. a->a) -> Int) -> Bool <= β[tau] Bool
for an unfilled metavariable β. In this case (with an AppTy on the right),
we used to fall back to unification. No longer: now, given that the LHS
is a FunTy and that the RHS is a deep rho type (does not need any instantiation),
we try to make the RHS into a FunTy, viz.
β := (->) γ
We can then continue using covariance & contravariance of the function
arrow, which allows us to prove the subtyping relationship, instead of
trying to unify which would cause us to error out with:
Couldn't match expected type ‘β’ with actual type ‘(->) ((∀ a. a -> a) -> Int)
See Note [FunTy vs non-FunTy case in tc_sub_type_deep] in GHC.Tc.Utils.Unify.
The other main improvement in this patch concerns type inference.
The main subsumption logic happens (before & after this patch) in
GHC.Tc.Gen.App.checkResultTy. However, before this patch, all of the
DeepSubsumption logic only kicked in in 'check' mode, not in 'infer' mode.
This patch adds deep instantiation in the 'infer' mode of checkResultTy
when we are doing deep subsumption, which allows us to accept programs
such as:
f :: Int -> (forall a. a->a)
g :: Int -> Bool -> Bool
test1 b =
case b of
True -> f
False -> g
test2 b =
case b of
True -> g
False -> f
See Note [Deeply instantiate in checkResultTy when inferring].
Finally, we add representation-polymorphism checks to ensure that the
lambda abstractions we introduce when doing subsumption obey the
representation polymorphism invariants of Note [Representation polymorphism invariants]
in GHC.Core. See Note [FunTy vs FunTy case in tc_sub_type_deep].
This is accompanied by a courtesy change to `(<.>) :: HsWrapper -> HsWrapper -> HsWrapper`,
adding the equation:
WpCast c1 <.> WpCast c2 = WpCast (c1 `mkTransCo` c2)
This is useful because mkWpFun does not introduce an eta-expansion when
both of the argument & result wrappers are casts; so this change allows
us to avoid introducing lambda abstractions when casts suffice.
Fixes #26225
-
d175aff8
by Sylvain Henry at 2025-08-12T10:01:31-04:00
Add regression test for #18619
-
a3983a26
by Sylvain Henry at 2025-08-12T10:02:20-04:00
RTS: remove some TSAN annotations (#20464)
Use RELAXED_LOAD_ALWAYS macro instead.
-
0434af81
by Ben Gamari at 2025-08-12T10:03:02-04:00
Bump time submodule to 1.15
Also required bumps of Cabal, directory, and hpc.
-
7ab78bc5
by Richard Eisenberg at 2025-08-12T23:44:16+01:00
Move some fundep solving to new spot
-
6a0922ac
by Simon Peyton Jones at 2025-08-12T23:44:16+01:00
Work in progress...[skip ci]
-
6235bb83
by Simon Peyton Jones at 2025-08-12T23:44:16+01:00
This completes moving dict fundeps to the main loop
-
61513005
by Simon Peyton Jones at 2025-08-12T23:44:16+01:00
We need wanted/wanted fundeps too
...and some other refactors
-
eadd3db4
by Simon Peyton Jones at 2025-08-12T23:44:16+01:00
Wibbles
-
2225aa68
by Simon Peyton Jones at 2025-08-12T23:44:16+01:00
Make FunDeps into a new module
-
f326e5b0
by Simon Peyton Jones at 2025-08-12T23:44:16+01:00
Solve new_eqs rather than adding them to WantedConstraints
-
770089f5
by Simon Peyton Jones at 2025-08-12T23:44:16+01:00
Wibble
-
8a9fb2e9
by Simon Peyton Jones at 2025-08-12T23:44:16+01:00
Import wibbles
-
8be63d6c
by Simon Peyton Jones at 2025-08-12T23:44:16+01:00
Comments only [skip ci]
-
366a409f
by Simon Peyton Jones at 2025-08-12T23:44:16+01:00
WIP on FunDeps [skip ci]
-
483e71a9
by Simon Peyton Jones at 2025-08-12T23:44:16+01:00
Work in progress [skip ci]
-
b593390a
by Simon Peyton Jones at 2025-08-12T23:44:16+01:00
More WIP
-
290710bb
by Simon Peyton Jones at 2025-08-12T23:44:16+01:00
Wibbles to fundeps [skip ci]
-
4d4eff0c
by Simon Peyton Jones at 2025-08-12T23:44:16+01:00
Kill off kickOutAfterUnification
-
ad1a4e75
by Simon Peyton Jones at 2025-08-12T23:44:16+01:00
More wibbles
Need to remove the unification-count stuff entirely
and do more tidying up -- this commit is mainly for CI
-
ba0a6ce4
by Simon Peyton Jones at 2025-08-12T23:44:16+01:00
Wibbles solver
Iterate the simples more often than plugins
-
05d6ac36
by Simon Peyton Jones at 2025-08-12T23:44:16+01:00
Improve pretty printer for HsExpr
Given a very deeply-nested application, it just kept printing
deeper and deeper. This small change makes it cut off.
-
a3621dbe
by Simon Peyton Jones at 2025-08-12T23:44:16+01:00
Start to extend to equalities
-
90e85284
by Simon Peyton Jones at 2025-08-12T23:44:16+01:00
Wibble HsExpr pretty printing
-
7f02ca4f
by Simon Peyton Jones at 2025-08-12T23:44:16+01:00
Whitespace only
-
8ccd7eb0
by Simon Peyton Jones at 2025-08-12T23:44:16+01:00
Small improvements
-
2b30dd16
by Simon Peyton Jones at 2025-08-12T23:44:16+01:00
Wibbles
-
6f0bef70
by Simon Peyton Jones at 2025-08-12T23:44:16+01:00
Wibble Outputable