summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Fix T20638 on big-endian architectureswip/T20906Peter Trommler2022-01-162-2/+2
| | | | | | | | | | | The test reads a 16 bit value from an array of 8 bit values. Naturally, that leads to different values read on big-endian architectures than on little-endian. In this case the value read is 0x8081 on big-endian and 0x8180 on little endian. This patch changes the argument of the `and` machop to mask bit 7 which is the only bit different. The test still checks that bit 15 is zero, which was the original issue in #20638. Fixes #20906.
* winio: fix heap corruption and various leaks.Tamar Christina2022-01-1512-20/+46
|
* rts: Consolidate RtsSymbols from libcBen Gamari2022-01-151-2/+6
| | | | | | | | | | | | | | Previously (9ebda74ec5331911881d734b21fbb31c00a0a22f) `environ` was added to `RtsSymbols` to ensure that environment was correctly propagated when statically linking. However, this introduced #20577 since platforms are inconsistent in whether they provide a prototype for `environ`. I fixed this by providing a prototype but while doing so dropped symbol-table entry, presumably thinking that it was redundant due to the entry in the mingw-specific table. Here I reintroduce the symbol table entry for `environ` and move libc symbols shared by Windows and Linux into a new macro, `RTS_LIBC_SYMBOLS`, avoiding this potential confusion.
* Add test for #20938.Andreas Klebinger2022-01-143-1/+11
|
* reinsert targetEric Lindblad2022-01-141-0/+1
|
* update URLsEric Lindblad2022-01-141-16/+16
|
* Revert "add NUMJOBS"Eric Lindblad2022-01-141-3/+1
| | | This reverts commit c0b854e929f82c680530e944e12fad24f9e14f8e
* add NUMJOBSEric Lindblad2022-01-141-1/+3
|
* release notes: Changes to Demand analysisSebastian Graf2022-01-131-0/+11
|
* release notes: Changes to CPR analysisSebastian Graf2022-01-132-3/+69
|
* hadrian: Include bash completion script in bindistBen Gamari2022-01-131-0/+5
| | | | See #20802.
* testsuite: Fix import on python 3.10Zubin Duggal2022-01-121-1/+2
|
* Untangled GHC.Types.Id.Make from the driverSylvain Henry2022-01-127-35/+44
|
* Abstract BangOptsSylvain Henry2022-01-124-45/+67
| | | | | | | | Avoid requiring to pass DynFlags to mkDataConRep/buildDataCon. When we load an interface file, these functions don't use the flags. This is preliminary work to decouple the loader from the type-checker for #14335.
* docs: MonadComprehension desugar using Alternative rather than MonadPlusMatthew Pickering2022-01-111-2/+2
| | | | Fixes #20928
* RTTI: Substitute the [rk] skolems into kindsMatthew Pickering2022-01-118-5/+49
| | | | | | (Fixes #10616 and #10617) Co-authored-by: Roland Senn <rsx@bluewin.ch>
* RTS: Remove unused file xxhash.cPeter Trommler2022-01-111-43/+0
|
* Disable keep-cafs{,-fail} tests on OpenBSDGreg Steuck2022-01-111-2/+2
| | | | | They are likely broken for the same reason as FreeBSD where the tests are already disabled.
* Feed /dev/null into cgrun025Greg Steuck2022-01-111-1/+1
| | | | | | | The test currently times out waiting for end of stdin in getContents. The expected output indicates that nothing should come for the test to pass as written. It is unclear how the test was supposed to pass, but this looks like a sufficient hack to make it work.
* Remove from error the parenthesized amount of memory requestedGreg Steuck2022-01-111-1/+5
| | | | | | | | | Diagnostics for outofmem test on OpenBSD includes the amount of memory that it failed to allocate. This seems like an irrelevant detail that could change over time and isn't required for determining if test passed. Typical elided text is '(requested 2148532224 bytes)'
* Change assertions in Stats.c to warnings (and introduce WARN macro)Matthew Pickering2022-01-113-7/+26
| | | | | | | | | | | | | | | | | | | | | | | | ASSERT should be used in situations where something very bad will happen later on if a certain invariant doesn't hold. The idea is that IF we catch the assertion earlier then it will be easier to work out what's going on at that point rather than at some indeterminate point in the future of the program. The assertions in Stats.c do not obey this philsophy and it is quite annoying if you are running a debug build (or a ticky compiler) and one of these assertions fails right at the end of your program, before the ticky report is printed out so you don't get any profiling information. Given that nothing terrible happens if these assertions are not true, or at least the terrible thing will happen in very close proximity to the assertion failure, these assertions use the new WARN macro which prints the assertion failure to stdout but does not exit the program. Of course, it would be better to fix these metrics to not trigger the assertion in the first place but if they did fail again in the future it is frustrating to be bamboozled in this manner. Fixes #20899
* Enable :seti in a multi component replMatthew Pickering2022-01-113-2/+5
| | | | Part of #20889
* Use interactive flags when printing expressions in GHCiMatthew Pickering2022-01-114-4/+9
| | | | | | | | | The documentation states that the interactive flags should be use for any interactive expressions. The interactive flags are used when typechecking these expressions but not when printing. The session flags (modified by :set) are only used when loading a module. Fixes #20909
* warnPprTrace: pass separately the reasonKrzysztof Gogolewski2022-01-1130-50/+55
| | | | This makes it more similar to pprTrace, pprPanic etc.
* TcPlugins: `newWanted` uses the provided `CtLoc`sheaf2022-01-117-10/+149
| | | | | | | | | | | | | | | | | | The `GHC.Tc.Plugin.newWanted` function takes a `CtLoc` as an argument, but it used to discard the location information, keeping only the `CtOrigin`. It would then retrieve the source location from the `TcM` environment using `getCtLocM`. This patch changes this so that `GHC.Tc.Plugin.newWanted` passes on the full `CtLoc`. This means that authors of type-checking plugins no longer need to manually set the `CtLoc` environment in the `TcM` monad if they want to create a new Wanted constraint with the given `CtLoc` (in particular, for setting the `SrcSpan` of an emitted constraint). This makes the `newWanted` function consistent with `newGiven`, which always used the full `CtLoc` instead of using the environment. Fixes #20895
* Fix parsing & printing of unboxed sumssheaf2022-01-1125-54/+311
| | | | | | | | | | | | | | | | | The pretty-printing of partially applied unboxed sums was incorrect, as we incorrectly dropped the first half of the arguments, even for a partial application such as (# | #) @IntRep @DoubleRep Int# which lead to the nonsensical (# DoubleRep | Int# #). This patch also allows users to write unboxed sum type constructors such as (# | #) :: TYPE r1 -> TYPE r2 -> TYPE (SumRep '[r1,r2]). Fixes #20858 and #20859.
* Kind TyCons: require KindSignatures, not DataKindssheaf2022-01-1110-26/+78
| | | | | | | | | | | | | | | | | | Uses of a TyCon in a kind signature required users to enable DataKinds, which didn't make much sense, e.g. in type U = Type type MyMaybe (a :: U) = MyNothing | MyJust a Now the DataKinds error is restricted to data constructors; the use of kind-level type constructors is instead gated behind -XKindSignatures. This patch also adds a convenience pattern synonym for patching on both a TyCon or a TcTyCon stored in a TcTyThing, used in tcTyVar and tc_infer_id. fixes #20873
* Skip T16180 on OpenBSD due to bug #14012Greg Steuck2022-01-111-0/+3
|
* Skip T18623 on OpenBSDGreg Steuck2022-01-111-1/+1
| | | | | The bug it regresses didn't happen on this OS (no RLIMIT_AS) and the regression doesn't work (ulimit: -v: unknown option)
* rts: Only declare environ when necessaryBen Gamari2022-01-113-1/+25
| | | | | | | | | | Previously we would unconditionally provide a declaration for `environ`, even if `<unistd.h>` already provided one. This would result in `-Werror` builds failing on some platforms. Also `#include <unistd.h>` to ensure that the declaration is visible. Fixes #20861.
* rts: Depend explicitly on libcBen Gamari2022-01-111-0/+6
| | | | | | | | | As noted in #19029, currently `ghc-prim` explicitly lists `libc` in `extra-libraries`, resulting in incorrect link ordering with the `extra-libraries: pthread` in `libHSrts`. Fix this by adding an explicit dependency on `libc` to `libHSrts`. Closes #19029.
* ci: Nightly, run one head.hackage job with core-lint and one withoutMatthew Pickering2022-01-111-5/+18
| | | | | | | This fixes serious skew in the performance numbers because the packages were build with core-lint. Fixes #20826
* ci: test bootstrapping and use hadrian for source distsZubin Duggal2022-01-112-13/+32
|
* hadrian: Fully implement source distributions (#19317)Zubin Duggal2022-01-1111-112/+215
| | | | | | We use `git ls-files` to get the list of files to include in the source distribution. Also implements the `-testsuite` and `-extra-tarballs` distributions.
* hadrian: allow offline bootstrappingZubin Duggal2022-01-115-64/+192
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the ability to fetch and store dependencies needed for boostrapping hadrian. By default the script will download the dependencies from the network but some package managers disallow network access so there are also options to build given a supplied tarball. The -s option allos you to provide the tarball bootstrap.py -d plan-bootstrap-8.10.5.json -w /path/to-ghc -s sources-tarball.tar.gz Which dependencies you need can be queried using the `list-sources` option. bootstrap.py list-sources -d plan-bootstrap-8.10.5.json This produces `fetch_plan.json` which tells you where to get each source from. You can instruct the script to create the tarball using the `fetch` option. bootstrap.py fetch -d plan-bootstrap-8.10.5.json -o sources-tarball.tar.gz Together these commands mean you can build GHC without needing cabal-install. Fixes #17103
* hadrian: Add bootstrap scripts for building without cabal-installMatthew Pickering2022-01-1118-0/+695
| | | | | | | | | | | | | | | | | | | | | | | | | These scripts are originally from the cabal-install repo with a few small tweaks. This utility allows you to build hadrian without cabal-install, which can be useful for packagers. If you are a developer then build hadrian using cabal-install. If you want to bootstrap with ghc-8.10.5 then run the ./bootstrap script with the `plan-bootstrap-8.10.5.json` file. bootstrap.py -d plan-bootstrap-8.10.5.json -w /path/to-ghc The result of the bootstrap script will be a hadrian binary in `_build/bin/hadrian`. There is a script (using nix) which can be used to generate the bootstrap plans for the range of supported GHC versions using nix. generate_bootstrap_plans Otherwise you can run the commands in ./generate_bootstrap_plans directly. Fixes #17103
* Remove dangling references to Note [Type-checking overloaded labels]Joachim Breitner2022-01-072-9/+7
| | | | that note was removed in 4196969c53c55191e644d9eb258c14c2bc8467da
* Thoughtful forcing in CoreUnfoldingMatthew Pickering2022-01-071-5/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We noticed that the structure of CoreUnfolding could leave double the amount of CoreExprs which were retained in the situation where the template but not all the predicates were forced. This observation was then confirmed using ghc-debug: ``` (["ghc:GHC.Core:App","ghc-prim:GHC.Types:True","THUNK_1_0","THUNK_1_0","THUNK_1_0"],Count 237) (["ghc:GHC.Core:App","ghc-prim:GHC.Types:True","THUNK_1_0","THUNK_1_0","ghc-prim:GHC.Types:True"],Count 1) (["ghc:GHC.Core:Case","ghc-prim:GHC.Types:True","THUNK_1_0","THUNK_1_0","THUNK_1_0"],Count 12) (["ghc:GHC.Core:Cast","ghc-prim:GHC.Types:True","THUNK_1_0","THUNK_1_0","BLACKHOLE"],Count 1) (["ghc:GHC.Core:Cast","ghc-prim:GHC.Types:True","THUNK_1_0","THUNK_1_0","THUNK_1_0"],Count 78) (["ghc:GHC.Core:Cast","ghc-prim:GHC.Types:True","THUNK_1_0","ghc-prim:GHC.Types:False","THUNK_1_0"],Count 1) (["ghc:GHC.Core:Cast","ghc-prim:GHC.Types:True","ghc-prim:GHC.Types:False","THUNK_1_0","THUNK_1_0"],Count 3) (["ghc:GHC.Core:Cast","ghc-prim:GHC.Types:True","ghc-prim:GHC.Types:True","THUNK_1_0","THUNK_1_0"],Count 1) (["ghc:GHC.Core:Lam","ghc-prim:GHC.Types:True","THUNK_1_0","THUNK_1_0","BLACKHOLE"],Count 31) (["ghc:GHC.Core:Lam","ghc-prim:GHC.Types:True","THUNK_1_0","THUNK_1_0","THUNK_1_0"],Count 4307) (["ghc:GHC.Core:Lam","ghc-prim:GHC.Types:True","THUNK_1_0","THUNK_1_0","ghc-prim:GHC.Types:True"],Count 6) (["ghc:GHC.Core:Let","ghc-prim:GHC.Types:True","THUNK_1_0","THUNK_1_0","THUNK_1_0"],Count 29) (["ghc:GHC.Core:Lit","ghc-prim:GHC.Types:True","THUNK_1_0","THUNK_1_0","ghc-prim:GHC.Types:True"],Count 1) (["ghc:GHC.Core:Tick","ghc-prim:GHC.Types:True","THUNK_1_0","THUNK_1_0","THUNK_1_0"],Count 36) (["ghc:GHC.Core:Var","ghc-prim:GHC.Types:True","THUNK_1_0","THUNK_1_0","THUNK_1_0"],Count 1) (["ghc:GHC.Core:Var","ghc-prim:GHC.Types:True","ghc-prim:GHC.Types:False","THUNK_1_0","THUNK_1_0"],Count 6) (["ghc:GHC.Core:Var","ghc-prim:GHC.Types:True","ghc-prim:GHC.Types:False","ghc-prim:GHC.Types:True","THUNK_1_0"],Count 2) ``` Where we can see that the first argument is forced but there are still thunks remaining which retain the old expr. For my test case (a very big module, peak of 3 000 000 core terms) this reduced peak memory usage by 1G (12G -> 11G). Fixes #20905
* Change ulimit -n in openFile008 back to 1024Greg Steuck2022-01-061-1/+1
| | | | | | | | | | | | | | The test only wants 1000 descriptors, so changing the limit to double that *in the context of just this test* makes no sense. This is a manual revert of 8f7194fae23bdc6db72fc5784933f50310ce51f9. The justification given in the description doesn't instill confidence. As of HEAD, the test fails on OpenBSD where ulimit -n is hard-limited to 1024. The test suite attempts to change it to 2048, which fails. The test proceeds with the unchanged default of 512 and naturally the test program fails due to the low ulimit. The fixed test now passes.
* Disable T2615 on OpenBSD, close #20869Greg Steuck2022-01-061-0/+2
|
* Use primOpIds cache more often (#20857)Sylvain Henry2022-01-0613-91/+126
| | | | | | | | Use primOpId instead of mkPrimOpId in a few places to benefit from Id caching. I had to mess a little bit with the module hierarchy to fix cycles and to avoid adding too many new dependencies to count-deps tests.
* Perf: use SmallArray for primops' Ids cache (#20857)Sylvain Henry2022-01-064-11/+112
| | | | | | SmallArray doesn't perform bounds check (faster). Make primop tags start at 0 to avoid index arithmetic.
* Add regression test (#13997)nineonine2022-01-053-0/+17
|
* Fix Haddock parse error in GHC.Exts.Heap.FFIClosures.hsGeorge Thomas2022-01-041-2/+2
|
* Check quoted TH names are in the correct namespacesheaf2022-01-0415-44/+132
| | | | | | | | | | | | When quoting (using a TH single or double quote) a built-in name such as the list constructor (:), we didn't always check that the resulting 'Name' was in the correct namespace. This patch adds a check in GHC.Rename.Splice to ensure we get a Name that is in the term-level/type-level namespace, when using a single/double tick, respectively. Fixes #20884.
* Add test for #20894sheaf2022-01-032-0/+25
|
* Add regressiontest for #18045Roland Senn2022-01-034-0/+49
| | | | Issue #18045 got fixed by !6971.
* fix typoEric Lindblad2022-01-031-1/+1
|
* Replace `seq` with POSIX-standard in PmSeriesG testGreg Steuck2022-01-031-1/+3
|
* Replace `seq` with POSIX-standard printf(1) in ManyAlternatives testGreg Steuck2022-01-031-4/+6
| | | | | | | | The test now passes on OpenBSD instead of generating broken source which was rejected by GHC with ManyAlternatives.hs:5:1: error: The type signature for ‘f’ lacks an accompanying binding