summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Windows: Always define _UCRT when compiling C codewip/T22159Ryan Scott2022-09-116-1/+47
| | | | | | | As seen in #22159, this is required to ensure correct behavior when MinGW-w64 headers are in the `C_INCLUDE_PATH`. Fixes #22159.
* CmmToC: enable 64-bit CallishMachOp on 32-bit targetsCheng Shao2022-09-081-31/+29
| | | | | | | | | Normally, the unregisterised builds avoid generating 64-bit CallishMachOp in StgToCmm, so CmmToC doesn't support these. However, there do exist cases where we'd like to invoke cmmToC for other cmm inputs which may contain such CallishMachOps, and it's a rather low effort to add support for these since they only require calling into existing ghc-prim cbits.
* Isolate some Applicative hidings to GHC.PreludeGeorgi Lyubenov2022-09-085-9/+7
| | | | | | | By reexporting the entirety of Applicative from GHC.Prelude, we can save ourselves some `hiding` and importing of `Applicative` in consumers of GHC.Prelude. This also has the benefit of isolating this type of change to GHC.Prelude, so that people in the future don't have to think about it.
* Bump submodule Cabal to one with liftA2 warnings fixedGeorgi Lyubenov2022-09-081-0/+0
|
* Bump submodule containers to one with liftA2 warnings fixedGeorgi Lyubenov2022-09-081-0/+0
|
* Add changelog entry for liftA2 export from PreludeGeorgi Lyubenov2022-09-081-0/+4
|
* Export liftA2 from PreludeGeorgi Lyubenov2022-09-0811-16/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes: In order to be warning free and compatible, we hide Applicative(..) from Prelude in a few places and instead import it directly from Control.Applicative. Please see the migration guide at https://github.com/haskell/core-libraries-committee/blob/main/guides/export-lifta2-prelude.md for more details. This means that Applicative is now exported in its entirety from Prelude. Motivation: This change is motivated by a few things: * liftA2 is an often used function, even more so than (<*>) for some people. * When implementing Applicative, the compiler will prompt you for either an implementation of (<*>) or of liftA2, but trying to use the latter ends with an error, without further imports. This could be confusing for newbies. * For teaching, it is often times easier to introduce liftA2 first, as it is a natural generalisation of fmap. * This change seems to have been unanimously and enthusiastically accepted by the CLC members, possibly indicating a lot of love for it. * This change causes very limited breakage, see the linked issue below for an investigation on this. See https://github.com/haskell/core-libraries-committee/issues/50 for the surrounding discussion and more details.
* Remove Outputable Char instanceKrzysztof Gogolewski2022-09-0713-24/+26
| | | | | Use 'text' instead of 'ppr'. Using 'ppr' on the list "hello" rendered as "h,e,l,l,o".
* Minor SDoc cleanupKrzysztof Gogolewski2022-09-0711-28/+19
| | | | | | | Change calls to renderWithContext with showSDocOneLine; it's more efficient and explanatory. Remove polyPatSig (unused)
* CmmToAsm: remove unused ModLocation from NatM_StateCheng Shao2022-09-073-21/+10
|
* whitespaceEric Lindblad2022-09-071-1/+1
|
* typosEric Lindblad2022-09-076-13/+13
|
* typoEric Lindblad2022-09-071-1/+1
|
* ci: remove unused build_make/test_make in ci scriptCheng Shao2022-09-061-46/+0
|
* Fix :add docs in user guideJan HrĨek2022-09-061-1/+1
|
* Update instances.rst, clarifying InstanceSigssheaf2022-09-061-5/+30
| | | | Fixes #22103
* gitlab-ci: Ensure that ghc derivation is in scopeBen Gamari2022-09-051-1/+1
| | | | | | Previously the lint-ci job attempted to use cabal-install (specifically `cabal update`) without a GHC in PATH. However, cabal-install-3.8 appears to want GHC, even for `cabal update`.
* DmdAnal: Don't panic in addCaseBndrDmd (#22039)Sebastian Graf2022-09-053-18/+117
| | | | | | | | | | Rather conservatively return Top. See Note [Untyped demand on case-alternative binders]. I also factored `addCaseBndrDmd` into two separate functions `scrutSubDmd` and `fieldBndrDmds`. Fixes #22039.
* Fix bootstrap with ghc-9.0Matthew Pickering2022-09-011-0/+9
| | | | | | It turns out Solo is a very recent addition to base, so for older GHC versions we just defined it inline here the one place we use it in the compiler.
* Change Ord defaults per CLC proposalTommy Bidne2022-09-013-3/+11
| | | | Approved by CLC in https://github.com/haskell/core-libraries-committee/issues/24#issuecomment-1233331267
* Minor cleanupKrzysztof Gogolewski2022-09-0112-40/+19
| | | | | | | | | - Remove mkHeteroCoercionType, sdocImpredicativeTypes, isStateType (unused), isCoVar_maybe (duplicated by getCoVar_maybe) - Replace a few occurrences of voidPrimId with (# #). void# is a deprecated synonym for the unboxed tuple. - Use showSDoc in :show linker. This makes it consistent with the other :show commands
* Add regression test for #21550Zubin Duggal2022-09-012-0/+40
| | | | | This was fixed by ca90ffa321a31842a32be1b5b6e26743cd677ec5 "Use local instances with least superclass depth"
* Make ghcDebugAssertions into a Stage predicate (Stage -> Bool)Matthew Pickering2022-08-317-11/+14
| | | | | | | | | | We also care whether we have debug assertions enabled for a stage one compiler, but the way which we turned on the assertions was quite different from the stage2 compiler. This makes the logic for turning on consistent across both and has the advantage of being able to correct determine in in-tree args whether a flavour enables assertions or not. Ticket #22096
* Refine in-tree compiler args for --test-compiler=stage1Matthew Pickering2022-08-311-4/+6
| | | | | | | | | Some of the logic to calculate in-tree arguments was not correct for the stage1 compiler. Namely we were not correctly reporting whether we were building static or dynamic executables and whether debug assertions were enabled. Fixes #22096
* Update submodule Cabal to tag Cabal-v3.8.1.0wip/9.4-foward-fixed-makeDouglas Wilson2022-08-315-8/+4
| | | | closes #21931
* Bump bytestring submodule to 0.11.3.1Ben Gamari2022-08-311-0/+0
|
* Update autoconf scriptsBen Gamari2022-08-312-607/+775
| | | | Scripts taken from autoconf 02ba26b218d3d3db6c56e014655faf463cefa983
* Add dates to base, ghc-prim changelogsBen Gamari2022-08-311-1/+1
|
* Bump deepseq submodule to 1.4.8.0Ben Gamari2022-08-311-0/+0
|
* Bump text submodule to 2.0.1Douglas Wilson2022-08-311-0/+0
|
* Bump directory submodule to 1.3.7.1Ben Gamari2022-08-311-0/+0
|
* Update submodule process to 1.6.15.0Douglas Wilson2022-08-311-0/+0
|
* Update submodule containers to 0.6.6Douglas Wilson2022-08-312-2/+2
|
* users-guide: Document system-cxx-std-libBen Gamari2022-08-311-0/+20
|
* Bump stm submodule to 2.5.1.0Ben Gamari2022-08-311-0/+0
|
* Bump binary submodule to 0.8.9.1Ben Gamari2022-08-311-0/+0
|
* Add a missing trimArityTypeSimon Peyton Jones2022-08-314-146/+184
| | | | | This buglet was exposed by #22114, a consequence of my earlier refactoring of arity for join points.
* Fix typo in Any docs: syntatic -> syntacticPi Delport2022-08-301-1/+1
|
* Fix typo in Any docs: stray "--"Pi Delport2022-08-301-1/+1
|
* ci: Attempt using normal submodule cloning strategyMatthew Pickering2022-08-302-3/+3
| | | | | | | We do not use any recursively cloned submodules, and this protects us from flaky upstream remotes. Fixes #22121
* Various Hadrian bootstrapping fixessheaf2022-08-301-14/+22
| | | | | | | | | | - Don't always produce a distribution archive (#21629) - Use correct executable names for ghc-pkg and hsc2hs on windows (we were missing the .exe file extension) - Fix a bug where we weren't using the right archive format on Windows when unpacking the bootstrap sources. Fixes #21629
* Fix a bug in anyInRnEnvRSimon Peyton Jones2022-08-294-4/+26
| | | | | | | | | | | | | | | This bug was a subtle error in anyInRnEnvR, introduced by commit d4d3fe6e02c0eb2117dbbc9df72ae394edf50f06 Author: Andreas Klebinger <klebinger.andreas@gmx.at> Date: Sat Jul 9 01:19:52 2022 +0200 Rule matching: Don't compute the FVs if we don't look at them. The net result was #22028, where a rewrite rule would wrongly match on a lambda. The fix to that function is easy.
* Use TcRnDiagnostic in GHC.Tc.TyCl.Class (#20117)Giles Anderson2022-08-298-49/+168
| | | | | | | | | | | | The following `TcRnDiagnostic` messages have been introduced: TcRnIllegalHsigDefaultMethods TcRnBadGenericMethod TcRnWarningMinimalDefIncomplete TcRnDefaultMethodForPragmaLacksBinding TcRnIgnoreSpecialisePragmaOnDefMethod TcRnBadMethodErr TcRnNoExplicitAssocTypeOrDefaultDeclaration
* Fix a nasty loop in TidySimon Peyton Jones2022-08-276-71/+124
| | | | | | | | As the remarkably-simple #22112 showed, we were making a black hole in the unfolding of a self-recursive binding. Boo! It's a bit tricky. Documented in GHC.Iface.Tidy, Note [tidyTopUnfolding: avoiding black holes]
* Use Solo to avoid retaining the SCE but to avoid performing the substitutionMatthew Pickering2022-08-271-4/+18
| | | | | | | The use of Solo here allows us to force the selection into the SCE to obtain the Subst but without forcing the substitution to be applied. The resulting thunk is placed into a lazy field which is rarely forced, so forcing it regresses peformance.
* Force imposs_deflt_cons in filterAltsMatthew Pickering2022-08-271-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a pretty serious space leak as the forced thunk would retain `Alt b` values which would then contain reference to a lot of old bindings and other simplifier gunk. The OtherCon unfolding was not forced on subsequent simplifier runs so more and more old stuff would be retained until the end of simplification. Fixing this has a drastic effect on maximum residency for the mmark package which goes from ``` 45,005,401,056 bytes allocated in the heap 17,227,721,856 bytes copied during GC 818,281,720 bytes maximum residency (33 sample(s)) 9,659,144 bytes maximum slop 2245 MiB total memory in use (0 MB lost due to fragmentation) ``` to ``` 45,039,453,304 bytes allocated in the heap 13,128,181,400 bytes copied during GC 331,546,608 bytes maximum residency (40 sample(s)) 7,471,120 bytes maximum slop 916 MiB total memory in use (0 MB lost due to fragmentation) ``` See #21993 for some more discussion.
* Avoid retaining bindings via ModGuts held on the stackMatthew Pickering2022-08-272-19/+24
| | | | | | | | It's better to overwrite the bindings fields of the ModGuts before starting an iteration as then all the old bindings can be collected as soon as the simplifier has processed them. Otherwise we end up with the old bindings being alive until right at the end of the simplifier pass as the mg_binds field is only modified right at the end.
* Revert "Revert "Refactor SpecConstr to use treat bindings uniformly""Matthew Pickering2022-08-271-263/+259
| | | | | | | | This reverts commit 851d8dd89a7955864b66a3da8b25f1dd88a503f8. This commit was originally reverted due to an increase in space usage. This was diagnosed as because the SCE increased in size and that was being retained by another leak. See #22102
* Improve SpecConstr for evalsSimon Peyton Jones2022-08-277-15/+121
| | | | | | | | | | | | | | | | | | As #21763 showed, we were over-specialising in some cases, when the function involved was doing a simple 'eval', but not taking the value apart, or branching on it. This MR fixes the problem. See Note [Do not specialise evals]. Nofib barely budges, except that spectral/cichelli allocates about 3% less. Compiler bytes-allocated improves a bit geo. mean -0.1% minimum -0.5% maximum +0.0% The -0.5% is on T11303b, for what it's worth.
* boot: cleanup legacy argsCheng Shao2022-08-262-9/+1
| | | | | Cleanup legacy boot script args, following removal of the legacy make build system.