summaryrefslogtreecommitdiff
path: root/libraries
Commit message (Collapse)AuthorAgeFilesLines
* fix importsCarter Tazio Schonwald2020-01-041-0/+1
|
* nuclear debuggingCarter Tazio Schonwald2020-01-041-3/+3
|
* testsuite: Skip T17499 when built against integer-simpleBen Gamari2019-12-271-1/+3
| | | | Since it routinely times out in CI.
* fixup! Fix endian handling w.r.t. CPP macro WORDS_BIGENDIANStefan Schulze Frielinghaus2019-12-242-2/+2
|
* Fix endian handling w.r.t. CPP macro WORDS_BIGENDIANStefan Schulze Frielinghaus2019-12-242-0/+6
| | | | | | Include header file `ghcautoconf.h` where the CPP macro `WORDS_BIGENDIAN` is defined. This finally fixes #17337 (in conjunction with commit 6c59cc71dc).
* Avoid race condition in hDuplicateToMoritz Kiefer2019-12-191-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In our codebase we have some code along the lines of ``` newStdout <- hDuplicate stdout stderr `hDuplicateTo` stdout ``` to avoid stray `putStrLn`s from corrupting a protocol (LSP) that is run over stdout. On CI we have seen a bunch of issues where `dup2` returned `EBUSY` so this fails with `ResourceExhausted` in Haskell. I’ve spent some time looking at the docs for `dup2` and the code in `base` and afaict the following race condition is being triggered here: 1. The user calls `hDuplicateTo stderr stdout`. 2. `hDuplicateTo` calls `hClose_help stdout_`, this closes the file handle for stdout. 3. The file handle for stdout is now free, so another thread allocating a file might get stdout. 4. If `dup2` is called while `stdout` (now pointing to something else) is half-open, it returns EBUSY. I think there might actually be an even worse case where `dup2` is run after FD 1 is fully open again. In that case, you will end up not just redirecting the original stdout to stderr but also the whatever resulted in that file handle being allocated. As far as I can tell, `dup2` takes care of closing the file handle itself so there is no reason to do this in `hDuplicateTo`. So this PR replaces the call to `hClose_help` by the only part of `hClose_help` that we actually care about, namely, `flushWriteBuffer`. I tested this on our codebase fairly extensively and haven’t been able to reproduce the issue with this patch.
* rts: Specialize hashing at call site rather than in struct.Crazycolorz52019-12-111-3/+3
| | | | | | | | | | | | | | | | Separate word and string hash tables on the type level, and do not store the hashing function. Thus when a different hash function is desire it is provided upon accessing the table. This is worst case the same as before the change, and in the majority of cases is better. Also mark the functions for aggressive inlining to improve performance. {F1686506} Reviewers: bgamari, erikd, simonmar Subscribers: rwbarton, thomie, carter GHC Trac Issues: #13165 Differential Revision: https://phabricator.haskell.org/D4889
* testsuite: Add (broken) test for #17510Ben Gamari2019-12-103-0/+20
|
* base: Fix incorrect @since in GHC.NaturalBen Gamari2019-12-101-1/+1
| | | | Fixes #17547.
* Fix comment typosGabor Greif2019-12-091-1/+1
| | | | | | | | | | | | | | | | The below is only necessary to fix the CI perf fluke that happened in 9897e8c8ef0b19a9571ef97a1d9bb050c1ee9121: ------------------------- Metric Decrease: T5837 T6048 T9020 T12425 T12234 T13035 T12150 Naperian -------------------------
* Fix typo in documentation of Base.hs.Matthias Braun2019-12-051-1/+1
|
* Parenthesize the * kind in TH.PprVladislav Zavialov2019-12-051-12/+19
|
* Make sameNat and sameSymbol proxy-polymorphicBodigrim2019-12-052-2/+2
|
* Use Int# primops in `Bits Int{8,16,32,64}` instancesSylvain Henry2019-12-031-16/+16
|
* Make BCO# liftedBen Gamari2019-12-033-16/+14
| | | | | | | | | In #17424 Simon PJ noted that there is a potentially unsafe occurrence of unsafeCoerce#, coercing from an unlifted to lifted type. However, nowhere in the compiler do we assume that a BCO# is not a thunk. Moreover, in the case of a CAF the result returned by `createBCO` *will* be a thunk (as noted in [Updatable CAF BCOs]). Consequently it seems better to rather make BCO# a lifted type and rename it to BCO.
* Use the new timesInt2# primop in integer-gmp (#9431)Sylvain Henry2019-12-021-4/+19
|
* Add `timesInt2#` primopSylvain Henry2019-12-021-0/+10
|
* base: Fix <unistd.h> #includeBen Gamari2019-12-021-2/+2
| | | | | | | Previously we were including <sys/unistd.h> which is available on glibc but not musl. (cherry picked from commit e44b695ca7cb5f3f99eecfba05c9672c6a22205e)
* Fix more typosBrian Wignall2019-12-021-1/+1
|
* Improve few Foreign.Marshal.Utils docsÖmer Sinan Ağacan2019-11-291-11/+21
| | | | | | | | In copyBytes and moveBytes mention which argument is source and which is destination. Also fixes some of the crazy indentation in the module and cleans trailing whitespace.
* Fix typos, using Wikipedia list of common typosBrian Wignall2019-11-2810-11/+11
|
* Fix @since annotations for isResourceVanishedError and friends (#17488)Ryan Scott2019-11-271-3/+3
|
* On FreeBSD 12 sys/sysctl.h requires sys/types.hViktor Dukhovni2019-11-241-0/+1
| | | | | | | | | | | | | | Else build fails with: In file included from ExecutablePath.hsc:42: /usr/include/sys/sysctl.h:1062:25: error: unknown type name 'u_int'; did you mean 'int'? int sysctl(const int *, u_int, void *, size_t *, const void *, size_t); ^~~~~ int compiling libraries/base/dist-install/build/System/Environment/ExecutablePath_hsc_make.c failed (exit code 1) Perhaps also also other FreeBSD releases, but additional include will no harm even if not needed.
* Fix typosBrian Wignall2019-11-233-3/+3
|
* Bump exceptions submoduleÖmer Sinan Ağacan2019-11-231-0/+0
| | | | Adds a few files generated by GHC's configure script to .gitignore
* Stricten functions ins GHC.NaturalSebastian Graf2019-11-233-35/+62
| | | | | This brings `Natural` on par with `Integer` and fixes #17499. Also does some manual CSE for 0 and 1 literals.
* Target the IsList instance for ZipList at base-4.14.0.0 (#17489)Ryan Scott2019-11-231-1/+3
| | | | | | | | This moves the changelog entry about the instance from `base-4.15.0.0` to `base-4.14.0.0`. This accomplishes part (1) from #17489. [ci skip]
* hpc: Fix encoding issues. Add test for and fix #17073Alexey Kuleshevich2019-11-191-0/+0
| | | | | | | | | | | | | * Make sure files are being read/written in UTF-8. Set encoding while writing HTML output. Also set encoding while writing and reading .tix files although we don't yet have a ticket complaining that this poses problems. * Set encoding in html header to utf8 * Upgrade to new version of 'hpc' library and reuse `readFileUtf8` and `writeFileUtf8` functions * Update git submodule for `hpc` * Bump up `hpc` executable version Co-authored-by: Ben Gamari <ben@smart-cactus.org>
* Use pointer equality in Eq/Ord for ThreadIdRoland Zumkeller2019-11-191-12/+7
| | | | | | | | | | Changes (==) to use only pointer equality. This is safe because two threads are the same iff they have the same id. Changes `compare` to check pointer equality first and fall back on ids only in case of inequality. See discussion in #16761.
* testsuite: Skip T17414 on LinuxBen Gamari2019-11-171-0/+4
| | | | | | It is typical for $TMP to be a small tmpfson Linux. This test will fail in such cases since we must create a file larger than the filesystem. See #17459.
* Fixed issue #17435, missing Data instancesMario Blažević2019-11-172-0/+16
|
* exceptions: Bump submodule back to masterBen Gamari2019-11-171-0/+0
| | | | The previous commit hasn't made it to master yet.
* Bump version to 8.10.0Ben Gamari2019-11-171-0/+0
| | | | Bumps haddock submodule.
* base: Bump version to 4.14.0.0Ben Gamari2019-11-1418-7/+7
| | | | | Metric Increase: T4801
* Bump Haskeline and add exceptions as boot libraryBen Gamari2019-11-132-0/+0
| | | | Haskeline now depends upon exceptions. See #16752.
* testsuite: Mark tests fragile in threaded2 as fragile in all concurrent waysBen Gamari2019-11-104-2/+2
|
* Fix incorrect pluralsBrian Wignall2019-11-091-1/+1
|
* Incorporate MR review suggestions; add change in changelogBrian Wignall2019-11-092-3/+6
|
* Add IsList instance for ZipList (closes #17433)ghc-8.11-startBrian Wignall2019-11-091-1/+9
|
* testsuite: Mark T17414 as fragile on WindowsBen Gamari2019-11-091-1/+5
| | | | | | This consistently times out on Windows as described in #17453. I have tried increasing the timeout multiplier to two yet it stills fails. Disabling until we have time to investigate.
* template-haskell: Fix italics in changelogRyan Scott2019-11-091-2/+2
| | | | [ci-skip]
* base: Fix TBA in changelogBen Gamari2019-11-091-2/+2
|
* template-haskell: Fix TBAs in changelogBen Gamari2019-11-091-2/+2
|
* template-haskell: Document assembler foreign file supportBen Gamari2019-11-091-0/+2
| | | | See #16180.
* Bump unix submoduleBen Gamari2019-11-081-0/+0
| | | | Marks executeFile001 as broken in all concurrent ways.
* base: Add missing imports in Windows locking implementationBen Gamari2019-11-071-0/+3
|
* Bump the process submoduleBen Gamari2019-11-071-0/+0
| | | | | This should fix the #17108 and #17249 with the fix from https://github.com/haskell/process/pull/159.
* Clean up TH's treatment of unary tuples (or, #16881 part two)Ryan Scott2019-11-071-4/+20
| | | | | | | | | | | | | | !1906 left some loose ends in regards to Template Haskell's treatment of unary tuples. This patch ends to tie up those loose ends: * In addition to having `TupleT 1` produce unary tuples, `TupE [exp]` and `TupP [pat]` also now produce unary tuples. * I have added various special cases in GHC's pretty-printers to ensure that explicit 1-tuples are printed using the `Unit` type. See `testsuite/tests/th/T17380`. * The GHC 8.10.1 release notes entry has been tidied up a little. Fixes #16881. Fixes #17371. Fixes #17380.
* Adding examples to Semigroup/monoidDan Brooks2019-11-062-0/+21
|
* Add +RTS --disable-delayed-os-memory-return. Fixes #17411.Niklas Hambüchen2019-11-011-0/+3
| | | | | | Sets `MiscFlags.disableDelayedOsMemoryReturn`. See the added `Note [MADV_FREE and MADV_DONTNEED]` for details.