summaryrefslogtreecommitdiff
path: root/libraries/base
Commit message (Collapse)AuthorAgeFilesLines
* base: fix encoding for JS archSylvain Henry2022-06-151-1/+5
|
* Remove unused seqListSpineSylvain Henry2022-06-131-5/+0
| | | | It isn't used in ghcjs either
* JS Backend: remove misc. warningsdoyougnu2022-06-133-5/+3
|
* JS Backend: ghcjs_HOST_OS --> js_HOST_ARCHdoyougnu2022-06-132-10/+10
|
* JS-Backend: rebased to master 468f919bdoyougnu2022-06-131-1/+0
| | | | | | | | | | | | | | | First rebase of the JS-Backend. This rebase includes the JS backend combined with !7442 (new backend design). Unfortunately we have to short circuit the new backend design because the JS backend takes over after STG and not after StgToCmm. What's working: - hadrian builds JS backend - JS backend outputs .js files and "links" them What still has to be done: - JS backend is missing core js libraries as we add these we discover bugs in the linker and js rts.
* add GHCJS modules to base packageLuite Stegeman2022-06-134-0/+1871
|
* base: disable forkOS and bound thread machinerySylvain Henry2022-06-131-2/+33
|
* Base: don't build C and Cmm sources with ghcjsSylvain Henry2022-06-131-13/+15
|
* Deprecate TypeInType extensionHaskellMouse2022-06-061-1/+1
| | | | | | | | | | | | | | | | This commit fixes #20312 It deprecates "TypeInType" extension according to the following proposal: https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0083-no-type-in-type.rst It has been already implemented. The migration strategy: 1. Disable TypeInType 2. Enable both DataKinds and PolyKinds extensions Metric Decrease: T16875
* Pure Haskell implementation of GHC.UnicodePierre Le Marre2022-06-0133-12288/+24361
| | | | | | | | | | | | | | | | | | | | | | | | Switch to a pure Haskell implementation of base:GHC.Unicode, based on the implementation of the package unicode-data (https://github.com/composewell/unicode-data/). Approved by CLC as per https://github.com/haskell/core-libraries-committee/issues/59#issuecomment-1132106691. - Remove current Unicode cbits. - Add generator for Unicode property files from Unicode Character Database. - Generate internal modules. - Update GHC.Unicode. - Add unicode003 test for general categories and case mappings. - Add Python scripts to check 'base' Unicode tests outputs and characters properties. Fixes #21375 ------------------------- Metric Decrease: T16875 Metric Increase: T4029 T18304 haddock.base -------------------------
* export IsList from GHC.IsListTeo Camarasu2022-05-294-70/+91
| | | | it is still re-exported from GHC.Exts
* Expand documentation of hIsTerminalDeviceBodigrim2022-05-281-1/+8
|
* Use a class to check validity of withDictwip/withdictKrzysztof Gogolewski2022-05-274-10/+10
| | | | | | | | | | | | This moves handling of the magic 'withDict' function from the desugarer to the typechecker. Details in Note [withDict]. I've extracted a part of T16646Fail to a separate file T16646Fail2, because the new error in 'reify' hides the errors from 'f' and 'g'. WithDict now works with casts, this fixes #21328. Part of #19915
* [base] Fix the links in the Data.Data moduleHécate Moonlight2022-05-261-4/+2
| | | | | | fix #21658 fix #21657 fix #21657
* fix executablePath test for NetBSDFraser Tweedale2022-05-261-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | executablePath support for NetBSD was added in a172be07e3dce758a2325104a3a37fc8b1d20c9c, but the test was not updated. Update the test so that it works for NetBSD. This requires handling some quirks: - The result of getExecutablePath could include "./" segments. Therefore use System.FilePath.equalFilePath to compare paths. - The sysctl(2) call returns the original executable name even after it was deleted. Add `canQueryAfterDelete :: [FilePath]` and adjust expectations for the post-delete query accordingly. Also add a note to the `executablePath` haddock to advise that NetBSD behaves differently from other OSes when the file has been deleted. Also accept a decrease in memory usage for T16875. On Windows, the metric is -2.2% of baseline, just outside the allowed ±2%. I don't see how this commit could have influenced this metric, so I suppose it's something in the CI environment. Metric Decrease: T16875
* Replace dead link in Haddock documentation of Control.Monad.Fail (fixes #21602)BinderDavid2022-05-261-1/+1
|
* nonmoving: Fix documentation of GC statistics fieldsBen Gamari2022-05-201-11/+8
| | | | | | These were previously incorrect. Fixes #21553.
* testsuite: Add tests for #21336Ben Gamari2022-05-197-0/+47
|
* base: Throw exceptions raised while closing finalized HandlesBen Gamari2022-05-193-7/+60
| | | | Fixes #21336.
* base: Introduce [sg]etFinalizerExceptionHandlerBen Gamari2022-05-196-25/+93
| | | | | This introduces a global hook which is called when an exception is thrown during finalization.
* Fix bad interaction between withDict and the SpecialiserSimon Peyton Jones2022-05-171-0/+9
| | | | | | | | | | | | This MR fixes a bad bug, where the withDict was inlined too vigorously, which in turn made the type-class Specialiser generate a bogus specialisation, because it saw the same overloaded function applied to two /different/ dictionaries. Solution: inline `withDict` later. See (WD8) of Note [withDict] in GHC.HsToCore.Expr See #21575, which is fixed by this change.
* Re-export augment and build from GHC.ListBen Gamari2022-05-132-0/+5
| | | | Resolves https://gitlab.haskell.org/ghc/ghc/-/issues/19127
* Correct base's changelog for 4.16.1.0Hécate Moonlight2022-05-091-4/+9
| | | | | | | This commit reaffects the new Ix instances of the foreign integral types from base 4.17 to 4.16.1.0 closes #21529
* Start 9.6.1-notessheaf2022-05-051-0/+2
| | | | | Updates the documentation notes to start tracking changes for the 9.6.1 release (instead of 9.4).
* add since annotations for instances of ByteArrayTeo Camarasu2022-05-051-0/+9
|
* Fix broken rules for (^) with known small powersMatthew Craven2022-05-051-12/+11
|
* Explain that 'fail s' should run in the monad itselfTom Ellis2022-05-051-0/+4
|
* Assume at least one evaluation for nested SubDemands (#21081, #21133)wip/T21081Sebastian Graf2022-05-031-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See the new `Note [SubDemand denotes at least one evaluation]`. A demand `n :* sd` on a let binder `x=e` now means > "`x` was evaluated `n` times and in any program trace it is evaluated, `e` is > evaluated deeply in sub-demand `sd`." The "any time it is evaluated" premise is what this patch adds. As a result, we get better nested strictness. For example (T21081) ```hs f :: (Bool, Bool) -> (Bool, Bool) f pr = (case pr of (a,b) -> a /= b, True) -- before: <MP(L,L)> -- after: <MP(SL,SL)> g :: Int -> (Bool, Bool) g x = let y = let z = odd x in (z,z) in f y ``` The change in demand signature "before" to "after" allows us to case-bind `z` here. Similarly good things happen for the `sd` in call sub-demands `Cn(sd)`, which allows for more eta-reduction (which is only sound with `-fno-pedantic-bottoms`, albeit). We also fix #21085, a surprising inconsistency with `Poly` to `Call` sub-demand expansion. In an attempt to fix a regression caused by less inlining due to eta-reduction in T15426, I eta-expanded the definition of `elemIndex` and `elemIndices`, thus fixing #21345 on the go. The main point of this patch is that it fixes #21081 and #21133. Annoyingly, I discovered that more precise demand signatures for join points can transform a program into a lazier program if that join point gets floated to the top-level, see #21392. There is no simple fix at the moment, but !5349 might. Thus, we accept a ~5% regression in `MultiLayerModulesTH_OneShot`, where #21392 bites us in `addListToUniqDSet`. T21392 reliably reproduces the issue. Surprisingly, ghc/alloc perf on Windows improves much more than on other jobs, by 0.4% in the geometric mean and by 2% in T16875. Metric Increase: MultiLayerModulesTH_OneShot Metric Decrease: T16875
* libraries/base: docs: Explain relationshipt between `finalizeForeignPtr` and ↵Niklas Hambüchen2022-05-022-10/+22
| | | | | | `*Conc*` creation Fixes https://gitlab.haskell.org/ghc/ghc/-/issues/21420
* winio: add support to iserv.Tamar Christina2022-04-281-1/+1
|
* add since annotation for GHC.Stack.CCS.whereFromTeo Camarasu2022-04-281-0/+2
|
* Add INLINE pragmas for Enum helper methodsSimon Peyton Jones2022-04-282-15/+63
| | | | | | | | | | | | | | | | | | | | | | | As #21343 showed, we need to be super-certain that the "helper methods" for Enum instances are actually inlined or specialised. I also tripped over this when I discovered that numericEnumFromTo and friends had no pragmas at all, so their performance was very fragile. If they weren't inlined, all bets were off. So I've added INLINE pragmas for them too. See new Note [Inline Enum method helpers] in GHC.Enum. I also expanded Note [Checking for INLINE loop breakers] in GHC.Core.Lint to explain why an INLINE function might temporarily be a loop breaker -- this was the initial bug report in #21343. Strangely we get a 16% runtime allocation decrease in perf/should_run/T15185, but only on i386. Since it moves in the right direction I'm disinclined to investigate, so I'll accept it. Metric Decrease: T15185
* Documentation for setLocaleEncodingBodigrim2022-04-271-2/+27
|
* Fix rendering of liftA haddockLi-yao Xia2022-04-251-2/+1
|
* Mention new MutableByteArray# wrapper in base changelog.Andreas Klebinger2022-04-221-1/+1
|
* Update test baselines to match new error messages from GHC.IO.Encoding.FailureBodigrim2022-04-224-34/+34
|
* Improve error messages from GHC.IO.Encoding.FailureBodigrim2022-04-221-8/+12
|
* Update changelog.Philip Hazelden2022-04-091-0/+3
|
* Add tests for several trace functions.Philip Hazelden2022-04-094-0/+27
|
* Add functions traceWith, traceShowWith, traceEventWith.Philip Hazelden2022-04-091-0/+35
| | | | | As discussed at https://github.com/haskell/core-libraries-committee/issues/36
* Merge remote-tracking branch 'origin/master'Ben Gamari2022-04-083-5/+6
|\
| * Rename [] to List (#21294)Vladislav Zavialov2022-04-072-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch implements a small part of GHC Proposal #475. The key change is in GHC.Types: - data [] a = [] | a : [a] + data List a = [] | a : List a And the rest of the patch makes sure that List is pretty-printed as [] in various contexts. Updates the haddock submodule.
| * Remove Fun pattern from Typeable COMPLETE setsheaf2022-04-071-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | GHC merge request !963 improved warnings in the presence of COMPLETE annotations. This allows the removal of the Fun pattern from the complete set. Doing so expectedly causes some redundant pattern match warnings, in particular in GHC.Utils.Binary.Typeable and Data.Binary.Class from the binary library; this commit addresses that. Updates binary submodule Fixes #20230
| |
| \
*-. \ Merge branches 'wip/windows-high-codegen', 'wip/windows-high-linker', ↵Ben Gamari2022-04-074-6/+25
|\ \ \ | |_|/ |/| | | | | 'wip/windows-clang-2' and 'wip/lint-rts-includes' into wip/windows-clang-join
| | * configure: Make environ decl check more robustBen Gamari2022-04-073-2/+20
| |/ |/| | | | | | | Some platforms (e.g. Windows/clang64) declare `environ` in `<stdlib.h>`, not `<unistd.h>`
| * Move msvcrt dep out of baseBen Gamari2022-04-061-3/+1
| |
| * rts/PEi386: Rework linkerBen Gamari2022-04-061-2/+5
|/ | | | | | | | | | | | | | | | This is a significant rework of the PEi386 linker, making the linker compatible with high image base addresses. Specifically, we now use the m32 allocator instead of `HeapAllocate`. In addition I found a number of latent bugs in our handling of import libraries and relocations. I've added quite a few comments describing what I've learned about Windows import libraries while fixing these. Thanks to Tamar Christina (@Phyx) for providing the address space search logic, countless hours of help while debugging, and his boundless Windows knowledge. Co-Authored-By: Tamar Christina <tamar@zhox.com>
* Implement \cases (Proposal 302)Jakob Bruenker2022-04-011-1/+0
| | | | | | | | | | | | This commit implements proposal 302: \cases - Multi-way lambda expressions. This adds a new expression heralded by \cases, which works exactly like \case, but can match multiple apats instead of a single pat. Updates submodule haddock to support the ITlcases token. Closes #20768
* Change may not to might notMaxHearnden2022-04-011-1/+1
|
* Export MutableByteArray from Data.Array.ByteAndreas Klebinger2022-04-011-2/+22
| | | | This implements CLC proposal #49