summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Add Foldable1 Solo instanceOleg Grenrus2023-01-281-0/+9
|
* CApiFFI: add ConstPtr for encoding const-qualified pointer return typesnineonine2023-01-2813-8/+118
| | | | | | | | | | | | | Previously, when using `capi` calling convention in foreign declarations, code generator failed to handle const-cualified pointer return types. This resulted in CC toolchain throwing `-Wincompatible-pointer-types-discards-qualifiers` warning. `Foreign.C.Types.ConstPtr` newtype was introduced to handle these cases - special treatment was put in place to generate appropritetly qualified C wrapper that no longer triggers the above mentioned warning. Fixes #22043.
* Revert "CApiFFI: add ConstPtr for encoding const-qualified pointer return ↵Ben Gamari2023-01-289-62/+5
| | | | | | types (#22043)" This reverts commit 99aca26b652603bc62953157a48e419f737d352d.
* rts: Drop long-dead fallback definitions for INFINITY & NANBen Gamari2023-01-271-21/+0
| | | | These are no longer necessary since we now compile as C99.
* rts: Fix typoBen Gamari2023-01-273-3/+3
| | | | "tracingAddCapabilities" was mis-named
* rts: Fix C++ compilation issuesBen Gamari2023-01-274-3/+7
| | | | | Make the RTS compilable with a C++ compiler by inserting necessary casts.
* rts: Fix non-atomic mutation of enabled_capabilitiesBen Gamari2023-01-271-1/+2
|
* testsuite: Make listThreads more robustBen Gamari2023-01-272-6/+10
| | | | | Previously it was sensitive to the labels of threads which it did not create (e.g. the IO manager event loop threads). Fix this.
* testsuite: Fix race in UnliftedTVar2Ben Gamari2023-01-272-2/+7
| | | | | | | | | Previously UnliftedTVar2 would fail when run with multiple capabilities (and possibly even with one capability) as it would assume that `killThread#` would immediately kill the "increment" thread. Also, refactor the the executable to now succeed with no output and fails with an exit code.
* rts: Relax Messages assertionBen Gamari2023-01-271-2/+4
| | | | | | | `doneWithMsgThrowTo` was previously too strict in asserting that the `Message` is locked. Specifically, it failed to consider that the `Message` may not be locked if we are deleting all threads during RTS shutdown.
* testsuite: Introduce threaded2_sanity wayBen Gamari2023-01-271-1/+3
| | | | | Incredibly, we previously did not have a single way which would test the threaded RTS with multiple capabilities and the sanity-checker enabled.
* Put hadrian bootstrap plans through `jq`John Ericson2023-01-279-9/+2080
| | | | | This makes it possible to review changes with conventional diffing tools.
* bindist configure: Fail if find not found (#22691)Zubin Duggal2023-01-271-0/+4
|
* Accept an orphan declaration (sadly)Simon Peyton Jones2023-01-272-0/+8
| | | | | | | | | | This accepts the orphan type family instance type instance DsForeignHook = ... in GHC.HsToCore.Types. See Note [The Decoupling Abstract Data Hack] in GHC.Driver.Hooks
* Avoid orphans in the parserSimon Peyton Jones2023-01-272-5/+6
| | | | | This moves Anno instances for PatBuilder from GHC.Parser.PostProcess to GHC.Parser.Types to avoid orphans.
* Avoid orphans in STGSimon Peyton Jones2023-01-2710-111/+149
| | | | | | | This patch removes some orphan instances in the STG namespace by introducing the GHC.Stg.Lift.Types module, which allows various type family instances to be moved to GHC.Stg.Syntax, avoiding orphan instances.
* Report family instance orphans correctlySimon Peyton Jones2023-01-2728-150/+269
| | | | | | | | | | | | | | | | | This fixes the fact that we were not reporting orphan family instances at all. The fix here is easy, but touches a bit of code. I refactored the code to be much more similar to the way that class instances are done: - Add a fi_orphan field to FamInst, like the is_orphan field in ClsInst - Make newFamInst initialise this field, just like newClsInst - And make newFamInst report a warning for an orphan, just like newClsInst - I moved newFamInst from GHC.Tc.Instance.Family to GHC.Tc.Utils.Instantiate, just like newClsInst. - I added mkLocalFamInst to FamInstEnv, just like mkLocalClsInst in InstEnv - TcRnOrphanInstance and SuggestFixOrphanInstance are now parametrised over class instances vs type/data family instances. Fixes #19773
* Detect family instance orphans correctlySimon Peyton Jones2023-01-2713-22/+67
| | | | | | | | | We were treating a type-family instance as a non-orphan if there was a type constructor on its /right-hand side/ that was local. Boo! Utterly wrong. With this patch, we correctly check the /left-hand side/ instead! Fixes #22717
* Revert "base: NoImplicitPrelude in Data.Void and Data.Kind"Matthew Pickering2023-01-272-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes CI errors of the form. ``` ===> Command failed with error code: 1 ghc: panic! (the 'impossible' happened) GHC version 9.7.20230127: lookupGlobal Failed to load interface for ‘GHC.Num.BigNat’ There are files missing in the ‘ghc-bignum’ package, try running 'ghc-pkg check'. Use -v (or `:set -v` in ghci) to see a list of the files searched for. Call stack: CallStack (from HasCallStack): callStackDoc, called at compiler/GHC/Utils/Panic.hs:189:37 in ghc:GHC.Utils.Panic pprPanic, called at compiler/GHC/Tc/Utils/Env.hs:154:32 in ghc:GHC.Tc.Utils.Env CallStack (from HasCallStack): panic, called at compiler/GHC/Utils/Error.hs:454:29 in ghc:GHC.Utils.Error Please report this as a GHC bug: https://www.haskell.org/ghc/reportabug ``` This reverts commit d0d7ba0fb053ebe7f919a5932066fbc776301ccd. The module now lacks a dependency on GHC.Num.BigNat which it implicitly depends on. It is causing all CI jobs to fail so we revert without haste whilst the patch can be fixed. Fixes #22848
* Replace errors from badOrigBinding with new one (#22839)Andrei Borzenkov2023-01-2710-70/+57
| | | | | | | | | | | | | | | | | | | | Problem: in 02279a9c the type-level [] syntax was changed from a built-in name to an alias for the GHC.Types.List constructor. badOrigBinding assumes that if a name is not built-in then it must have come from TH quotation, but this is not necessarily the case with []. The outdated assumption in badOrigBinding leads to incorrect error messages. This code: data [] Fails with "Cannot redefine a Name retrieved by a Template Haskell quote: []" Unfortunately, there is not enough information in RdrName to directly determine if the name was constructed via TH or by the parser, so this patch changes the error message instead. It unifies TcRnIllegalBindingOfBuiltIn and TcRnNameByTemplateHaskellQuote into a new error TcRnBindingOfExistingName and changes its wording to avoid guessing the origin of the name.
* rts: Use C11-compliant static assertion syntaxBen Gamari2023-01-271-1/+4
| | | | | | | Previously we used `static_assert` which is only available in C23. By contrast, C11 only provides `_Static_assert`. Fixes #22777
* Fix spurious change from !9568Sylvain Henry2023-01-261-1/+1
|
* base: Make changelog proposal references more consistentBen Gamari2023-01-261-29/+31
| | | | Addresses #22773.
* rel-eng: Add missing rocky8 bindistMatthew Pickering2023-01-261-0/+1
| | | | | We intend to release rocky8 bindist so the fetching script needs to know about them.
* ci: Add ubuntu18_04 nightly and release jobsMatthew Pickering2023-01-264-1/+124
| | | | | | | This adds release jobs for ubuntu18_04 which uses glibc 2.27 which is older than the 2.28 which is used by Rocky8 bindists. Ticket #22268
* base: NoImplicitPrelude in Data.Void and Data.KindVladislav Zavialov2023-01-262-1/+3
| | | | | This change removes an unnecessary dependency on Prelude from two modules in the base package.
* tryFillBuffer: strictifydoyougnu2023-01-261-10/+10
| | | | more speculative bangs
* Do newtype unwrapping in the canonicaliser and rewriterRichard Eisenberg2023-01-268-79/+215
| | | | | | See Note [Unwrap newtypes first], which has the details. Close #22519.
* Hadrian: fix doc generationSylvain Henry2023-01-262-3/+18
| | | | | Was missing dependencies on files generated by templates (e.g. ghc.cabal)
* Strict fields in ModNodeKey (otherwise retains HomeModInfo)Matthew Pickering2023-01-261-2/+2
| | | | Towards #22530
* Force OccName in tidyTopNameMatthew Pickering2023-01-261-1/+2
| | | | | | | This occname has just been derived from an `Id`, so need to force it promptly so we can release the Id back to the world. Another symptom of the bug caused by #19619
* Force more in NFData Name instanceMatthew Pickering2023-01-261-1/+1
| | | | | | | | | | | Doesn't force the lazy `OccName` field (#19619) which is already known as a really bad source of leaks. When we slam the hammer storing Names on disk (in interface files or the like), all this should be forced as otherwise a `Name` can easily retain an `Id` and hence the entire world. Fixes #22833
* Store dehydrated data structures in CgModBreaksMatthew Pickering2023-01-265-14/+54
| | | | | | | | | This fixes a tricky leak in GHCi where we were retaining old copies of HscEnvs when reloading. If not all modules were recompiled then these hydrated fields in break points would retain a reference to the old HscEnv which could double memory usage. Fixes #22530
* Factorize hptModulesBelowSylvain Henry2023-01-262-35/+33
| | | | | Create and use moduleGraphModulesBelow in GHC.Unit.Module.Graph that doesn't need anything from the driver to be used.
* ci: Disable HLint job due to excessive runtimeMatthew Pickering2023-01-251-1/+2
| | | | | | | | | | | | | | | | | | | | The HLint jobs takes much longer to run (20 minutes) after "Give the RTS it's own configure script" eb5a6b91 Now the CI job will build the stage0 compiler before it generates the necessary RTS headers. We either need to: * Fix the linting rules so they take much less time * Revert the commit * Remove the linting of base from the hlint job * Remove the hlint job This is highest priority as it is affecting all CI pipelines. For now I am just disabling the job because there are many more pressing matters at hand. Ticket #22830
* Fix in-scope set in specImportsSimon Peyton Jones2023-01-254-36/+87
| | | | | | | | | Nothing deep here; I had failed to bring some floated dictionary binders into scope. Exposed by -fspecialise-aggressively Fixes #22715.
* configure: support "windows" as an OSSylvain Henry2023-01-252-2/+5
|
* Fix RTS build on WindowsSylvain Henry2023-01-251-2/+0
| | | | | This change fixes a cross-compilation issue from ArchLinux to Windows because these symbols weren't found.
* Hadrian: fix Windows cross-compilationSylvain Henry2023-01-251-3/+11
| | | | | Decision to build either unix or Win32 package must be stage specific for cross-compilation to be supported.
* Hadrian: correctly detect AR at-file supportSylvain Henry2023-01-253-3/+11
| | | | | | Stage0's ar may not support at-files. Take it into account. Found while cross-compiling from Darwin to Windows.
* compiler: fix handling of MO_F_Neg in wasm NCGCheng Shao2023-01-253-4/+29
| | | | | | | | In the wasm NCG, we used to compile MO_F_Neg to 0.0-x. It was an oversight, there actually exists f32.neg/f64.neg opcodes in the wasm spec and those should be used instead! The old behavior almost works, expect when GHC compiles the -0.0 literal, which will incorrectly become 0.0.
* docs: Update INSTALL.mdMatthew Pickering2023-01-251-3/+2
| | | | | | Removes references to make. Fixes #22480
* Restore Compose's Read/Show behavior to match Read1/Show1 instancesRyan Scott2023-01-244-7/+54
| | | | Fixes #22816.
* Allow waiting for timerfd to be interrupted during rts shutdownWander Hillen2023-01-242-13/+127
|
* CmmToC: fix CmmRegOff for 64-bit register on a 32-bit targetCheng Shao2023-01-241-2/+2
| | | | | | | | | | | | | | | | | We used to print the offset value to a platform word sized integer. This is incorrect when the offset is negative (e.g. output of cmm constant folding) and the register is 64-bit but on a 32-bit target, and may lead to incorrect runtime result (e.g. #22607). The fix is simple: just treat it as a proper MO_Add, with the correct width info inferred from the register itself. Metric Increase: T12707 T13379 T4801 T5321FD T5321Fun
* Clarify where `f` is definedTom Ellis2023-01-241-4/+7
|
* Add test for T22671Matthew Pickering2023-01-242-0/+9
| | | | | | This was fixed by b13c6ea5 Closes #22671
* Fix Lint check for duplicate external namesKrzysztof Gogolewski2023-01-241-6/+5
| | | | | | | | | | Lint was checking for duplicate external names by calling removeDups, which needs a comparison function that is passed to Data.List.sortBy. But the comparison was not a valid ordering - it returned LT if one of the names was not external. For example, the previous implementation won't find a duplicate in [M.x, y, M.x]. Instead, we filter out non-external names before looking for duplicates.
* Debug: Print full NodeKey when pretty printing ModuleGraphNodeMatthew Pickering2023-01-241-1/+1
| | | | This is helpful when debugging multiple component issues.
* Finder: Look in current unit before looking in any home package dependenciesMatthew Pickering2023-01-249-1/+30
| | | | | | | | | | | | | | In order to preserve existing behaviour it's important to look within the current component before consideirng a module might come from an external component. This already happened by accident in `downsweep`, (because roots are used to repopulated the cache) but in the `Finder` the logic was the wrong way around. Fixes #22680 ------------------------- Metric Decrease: MultiComponentModules MultiComponentModulesRecomp -------------------------p