summaryrefslogtreecommitdiff
path: root/libraries/base
Commit message (Collapse)AuthorAgeFilesLines
* JS: fix getpid (fix #23399)Sylvain Henry2023-05-164-1/+12
|
* JS: Implement h$clock_gettime in the JavaScript RTS (#23360)Josh Meredith2023-05-161-1/+1
|
* base: Introduce printToHandleFinalizerExceptionHandlerBen Gamari2023-05-167-3/+31
|
* base: Export {get,set}ExceptionFinalizer from System.Mem.WeakBen Gamari2023-05-162-0/+10
| | | | | | As proposed in CLC Proposal #126 [1]. [1]: https://github.com/haskell/core-libraries-committee/issues/126
* Use unboxed codebuffers in baseJosh Meredith2023-05-159-493/+597
| | | | | Metric Decrease: encodingAllocations
* Replace the implementation of CodeBuffers with unboxed typesJosh Meredith2023-05-151-11/+50
|
* Add more instances for Compose: Enum, Bounded, Num, Real, IntegralBodigrim2023-05-132-0/+12
| | | | See https://github.com/haskell/core-libraries-committee/issues/160 for discussion
* Mention new implementation of GHC.IORef.atomicSwapIORef in the changelogwip/T23333Bodigrim2023-05-121-0/+1
|
* Document unlawfulness of instance Num FixedBodigrim2023-05-112-2/+9
| | | | Fixes #22712
* base: Export GHC.Conc.Sync.fromThreadIdBen Gamari2023-05-112-1/+10
| | | | Closes #22706.
* Make `(&)` representation polymorphic in the return typekonsumlamm2023-05-092-4/+7
|
* compiler: Implement atomicSwapIORef with xchgBen Gamari2023-05-091-6/+1
| | | | As requested by @treeowl in CLC#139.
* testsuite: Add test for atomicSwapIORefBen Gamari2023-05-093-0/+14
|
* Improved documentation for the Data.OldList.nub functionAndrei Borzenkov2023-05-041-3/+9
| | | | | | There was recomentation to use map head . group . sort instead of nub function, but containers library has more suitable and efficient analogue
* base/encoding: add an allocations performance test (#22946)Josh Meredith2023-05-042-0/+39
|
* Fix remaining issues with bound checking (#23123)Sylvain Henry2023-05-041-2/+1
| | | | | | | | | | | | | | | | | | | | While fixing these I've also changed the way we store addresses into ByteArray#. Addr# are composed of two parts: a JavaScript array and an offset (32-bit number). Suppose we want to store an Addr# in a ByteArray# foo at offset i. Before this patch, we were storing both fields as a tuple in the "arr" array field: foo.arr[i] = [addr_arr, addr_offset]; Now we only store the array part in the "arr" field and the offset directly in the array: foo.dv.setInt32(i, addr_offset): foo.arr[i] = addr_arr; It avoids wasting space for the tuple.
* Document instances of DoubleBodigrim2023-05-032-28/+94
|
* Add the Unsatisfiable classsheaf2023-04-292-10/+69
| | | | | | | | | This commit implements GHC proposal #433, adding the Unsatisfiable class to the GHC.TypeError module. This provides an alternative to TypeError for which error reporting is more predictable: we report it when we are reporting unsolved Wanted constraints. Fixes #14983 #16249 #16906 #18310 #20835
* testsuite: wasm32-specific fixesCheng Shao2023-04-273-7/+13
| | | | This patch includes all wasm32-specific testsuite fixes.
* testsuite: add the req_process predicateCheng Shao2023-04-273-7/+9
| | | | | | This patch adds the req_process predicate to the testsuite to assert the platform has a process model, also marking tests that involve spawning processes as req_process. Also bumps hpc & process submodule.
* JS: Fix h$base_access implementation (issue 22576)Josh Meredith2023-04-251-3/+3
|
* JS/base: provide implementation for mkdir (issue 22374)Josh Meredith2023-04-254-1/+30
|
* Add since pragma to Data.Functor.unzipBodigrim2023-04-241-1/+4
|
* Fix doc typos in libraries/basetocic2023-04-237-9/+9
|
* Implement executablePath for Solaris and make getBaseDir less platform-dependentPHO2023-04-232-7/+25
| | | | | | | | | | Use base-4.17 executablePath when possible, and fall back on getExecutablePath when it's not available. The sole reason why getBaseDir had #ifdef's was apparently that getExecutablePath wasn't reliable, and we could reduce the number of CPP conditionals by making use of executablePath instead. Also export executablePath on js_HOST_ARCH.
* Fix doc typos in libraries/base/GHCtocic2023-04-216-8/+8
|
* Fix doc typo in GHC.Read.readListtocic2023-04-201-2/+2
|
* JS: fix thread-related primopsSylvain Henry2023-04-193-1/+9
|
* Misc cleanupKrzysztof Gogolewski2023-04-175-5/+4
| | | | | | - Use dedicated list functions - Make cloneBndrs and cloneRecIdBndrs monadic - Fix invalid haddock comments in libraries/base
* Base/JS: GHC.JS.Foreign.Callback module (issue 23126)Josh Meredith2023-04-133-4/+153
| | | | | | | | | | | | | * Add the Callback module for "exporting" Haskell functions to be available to plain JavaScript code * Fix some primitives defined in GHC.JS.Prim * Add a JavaScript section to the user guide with instructions on how to use the JavaScript FFI, building up to using Callbacks to interact with the browser * Add tests for the JavaScript FFI and Callbacks
* Set base 'maintainer' field to CLCBodigrim2023-04-111-2/+2
|
* Adjust wording wrt representation polymorphism of ($)Sebastian Graf2023-04-071-1/+1
|
* Remove trailing whitespace from ($) commentaryAlex Dixon2023-04-071-3/+3
|
* Improve documentation for ($) (#22963)Alex Dixon2023-04-071-12/+63
|
* Add release note for GHC.Unicode refactor in base-4.18.Pierre Le Marre2023-04-061-3/+4
| | | | | Also merge CLC proposal 130 in base-4.19 with CLC proposal 59 in base-4.18 and add proper release date.
* Add a few more memcpy-ish primopsMatthew Craven2023-04-042-25/+14
| | | | | | | | | | | | | | | | * copyMutableByteArrayNonOverlapping# * copyAddrToAddr# * copyAddrToAddrNonOverlapping# * setAddrRange# The implementations of copyBytes, moveBytes, and fillBytes in base:Foreign.Marshal.Utils now use these new primops, which can cause us to work a bit harder generating code for them, resulting in the metric increase in T21839c observed by CI on some architectures. But in exchange, we get better code! Metric Increase: T21839c
* Fixes around unsafeCoerce#Krzysztof Gogolewski2023-04-031-5/+25
| | | | | | | | | | | | 1. `unsafeCoerce#` was documented in `GHC.Prim`. But since the overhaul in 74ad75e87317, `unsafeCoerce#` is no longer defined there. I've combined the documentation in `GHC.Prim` with the `Unsafe.Coerce` module. 2. The documentation of `unsafeCoerce#` stated that you should not cast a function to an algebraic type, even if you later cast it back before applying it. But ghci was doing that type of cast, as can be seen with 'ghci -ddump-ds' and typing 'x = not'. I've changed it to use Any following the documentation.
* JS: fix issues with FD api supportSylvain Henry2023-04-032-2/+11
| | | | | | | | - Add missing implementations for fcntl_read/write/lock - Fix fdGetMode These were found while implementing TH in !9779. These functions must be used somehow by the external interpreter code.
* [feat] make ($) representation polymorphicmangoiv2023-04-012-4/+13
| | | | | | | | | | | | | | - this change was approved by the CLC in [1] following a CLC proposal [2] - make ($) representation polymorphic (adjust the type signature) - change ($) implementation to allow additional polymorphism - adjust the haddock of ($) to reflect these changes - add additional documentation to document these changes - add changelog entry - adjust tests (move now succeeding tests and adjust stdout of some tests) [1] https://github.com/haskell/core-libraries-committee/issues/132#issuecomment-1487456854 [2] https://github.com/haskell/core-libraries-committee/issues/132
* Fixes to accomodate Data.List.{head,tail} with {-# WARNING #-}Bodigrim2023-03-302-3/+6
|
* Add {-# WARNING #-} to Data.List.{head,tail}Bodigrim2023-03-302-0/+7
|
* Add COMPLETE pragmas to TypeRep, SSymbol, SChar, and SNatRyan Scott2023-03-286-0/+30
| | | | | This implements [CLC proposal #149](https://github.com/haskell/core-libraries-committee/issues/149).
* Document the constructor name for listsDavid Feuer2023-03-261-1/+4
| | | | | | | | | Derived `Data` instances use raw infix constructor names when applicable. The `Data.Data [a]` instance, if derived, would have a constructor name of `":"`. However, it actually uses constructor name `"(:)"`. Document this peculiarity. See https://github.com/haskell/core-libraries-committee/issues/147
* Update and expand atomic modification HaddocksDavid Feuer2023-03-262-14/+67
| | | | | | | | | | * The documentation for `atomicModifyIORef` and `atomicModifyIORef'` were incomplete, and the documentation for `atomicModifyIORef` was out of date. Update and expand. * Remove a useless lazy pattern match in the definition of `atomicModifyIORef`. The pair it claims to match lazily was already forced by `atomicModifyIORef2`.
* Add Eq/Ord instances for SSymbol, SChar, and SNatRyan Scott2023-03-253-1/+27
| | | | This implements [CLC proposal #148](https://github.com/haskell/core-libraries-committee/issues/148).
* Modify ThreadId documentation and commentsDavid Feuer2023-03-251-7/+3
| | | | | | | | | | | | | | | | | | | | | | For a long time, `GHC.Conc.Sync` has said ```haskell -- ToDo: data ThreadId = ThreadId (Weak ThreadId#) -- But since ThreadId# is unlifted, the Weak type must use open -- type variables. ``` We are now actually capable of using `Weak# ThreadId#`, but the world has moved on. To support the `Show` and `Ord` instances, we'd need to store the thread ID number in the `ThreadId`. And it seems very difficult to continue to support `threadStatus` in that regime, since it needs to be able to explain how threads died. In addition, garbage collection of weak references can be quite expensive, and it would be hard to evaluate the cost over he whole ecosystem. As discussed in [this CLC issue](https://github.com/haskell/core-libraries-committee/issues/125), it doesn't seem very likely that we'll actually switch to weak references here.
* base: Document GHC versions associated with past base versions in the changelogLi-yao Xia2023-03-251-1/+8
|
* Update changelog to mention changes to instance Foldable (Compose f g)Bodigrim2023-03-231-0/+2
|
* Simplify minimum/maximum in instance Foldable (Compose f g)Bodigrim2023-03-231-6/+2
|
* Additional optimized versionsArmando Ramirez2023-03-231-3/+18
|