summaryrefslogtreecommitdiff
path: root/libraries
Commit message (Collapse)AuthorAgeFilesLines
...
* Ensure that wired-in exception closures aren't GC'dBen Gamari2022-04-251-0/+2
| | | | | | | | | | | | | | | As described in Note [Wired-in exceptions are not CAFfy], a small set of built-in exception closures get special treatment in the code generator, being declared as non-CAFfy despite potentially containing CAF references. The original intent of this treatment for the RTS to then add StablePtrs for each of the closures, ensuring that they are not GC'd. However, this logic was not applied consistently and eventually removed entirely in 951c1fb0. This lead to #21141. Here we fix this bug by reintroducing the StablePtrs and document the status quo. Closes #21141.
* hadrian: Clean up handling of libffi dependenciesBen Gamari2022-04-251-2/+0
|
* 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
* Bump deepseq to 1.4.7.0Matthew Pickering2022-04-091-0/+0
| | | | | | Updates deepseq submodule Fixes #20653
* Merge remote-tracking branch 'origin/master'Ben Gamari2022-04-086-13/+13
|\
| * Fixes to 9.4 release notesKrzysztof Gogolewski2022-04-081-1/+1
| | | | | | | | | | | | - Mention -Wforall-identifier - Improve description of withDict - Fix formatting
| * Rename [] to List (#21294)Vladislav Zavialov2022-04-073-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-072-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-079-7/+26
|\ \ \ | |_|/ |/| | | | | 'wip/windows-clang-2' and 'wip/lint-rts-includes' into wip/windows-clang-join
| | * rts: Adjust RTS symbol table on Windows for ucrtBen Gamari2022-04-071-1/+1
| | |
| | * 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>`
| | * Bump text submoduleBen Gamari2022-04-061-0/+0
| | |
| | * Bump bytestring submoduleBen Gamari2022-04-061-0/+0
| | |
| | * Bump process submoduleBen Gamari2022-04-061-0/+0
| | | | | | | | | | | | Fixes missing TEST_CC_OPTS in testsuite tests.
| | * Bump Cabal submoduleBen Gamari2022-04-061-0/+0
| |/ |/| | | | | | | | | - Disable support for library-for-ghci on Windows as described in #21068. - Teach Cabal to use `ar -L` when available
| * 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>
* Bump text submodule to current `master`Ben Gamari2022-04-061-0/+0
| | | | Addresses #21295.
* Implement \cases (Proposal 302)Jakob Bruenker2022-04-015-8/+22
| | | | | | | | | | | | 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
* Remove wrong claim about naturality law.gershomb2022-04-011-4/+1
| | | | | | | | | | This docs change removes a longstanding confusion in the Traversable docs. The docs say "(The naturality law is implied by parametricity and thus so is the purity law [1, p15].)". However if one reads the reference a different "natural" law is implied by parametricity. The naturality law given as a law here is imposed. Further, the reference gives examples which violate both laws -- so they cannot be implied by parametricity. This PR just removes the wrong claim.
* Add instance Lift ByteArrayBodigrim2022-03-252-1/+58
|
* Add the OPAQUE pragmaChristiaan Baaij2022-03-253-0/+6
| | | | | | | | | | | | A new pragma, `OPAQUE`, that ensures that every call of a named function annotated with an `OPAQUE` pragma remains a call of that named function, not some name-mangled variant. Implements GHC proposal 0415: https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0415-opaque-pragma.rst This commit also updates the haddock submodule to handle the newly introduced lexer tokens corresponding to the OPAQUE pragma.
* hi haddock: Lex and store haddock docs in interface filesZubin Duggal2022-03-235-1/+6
| | | | | | | | | | | | | | | | | | Names appearing in Haddock docstrings are lexed and renamed like any other names appearing in the AST. We currently rename names irrespective of the namespace, so both type and constructor names corresponding to an identifier will appear in the docstring. Haddock will select a given name as the link destination based on its own heuristics. This patch also restricts the limitation of `-haddock` being incompatible with `Opt_KeepRawTokenStream`. The export and documenation structure is now computed in GHC and serialised in .hi files. This can be used by haddock to directly generate doc pages without reparsing or renaming the source. At the moment the operation of haddock is not modified, that's left to a future patch. Updates the haddock submodule with the minimum changes needed.
* List GHC.Event.Internal in base.cabal on Windowssheaf2022-03-191-13/+7
| | | | | | | GHC.Event.Internal was not listed in base.cabal on Windows. This caused undefined reference errors. This patch adds it back, by moving it out of the OS-specific logic in base.cabal. Fixes #21245.
* TH: Fix pretty printing of newtypes with operators and GADT syntax (#20868)Zubin Duggal2022-03-191-20/+9
| | | | | | | | The pretty printer for regular data types already accounted for these, and had some duplication with the newtype pretty printer. Factoring the logic out into a common function and using it for both newtypes and data declarations is enough to fix the bug.
* Export (~) from Data.Type.Equality (#18862)wip/eqtycon-rnVladislav Zavialov2022-03-158-6/+12
| | | | | | | | | | * Users can define their own (~) type operator * Haddock can display documentation for the built-in (~) * New transitional warnings implemented: -Wtype-equality-out-of-scope -Wtype-equality-requires-operators Updates the haddock submodule.
* ghc-bignum: Tweak integerOrSimon Jakobi2022-03-111-2/+2
| | | | | | The result of ORing two BigNats is always greater or equal to the larger of the two. Therefore it is safe to skip the magnitude checks of integerFromBigNat#.
* Improve clearBit and complementBit for NaturalSimon Jakobi2022-03-114-8/+46
| | | | | | Also optimize bigNatComplementBit#. Fixes #21175, #21181, #21194.
* gitlab-ci: Use the linters image in hlint jobBen Gamari2022-03-112-4/+3
| | | | | | As the `hlint` executable is only available in the linters image. Fixes #21146.
* Bump submodules: containers, exceptionsVladislav Zavialov2022-03-102-0/+0
| | | | | | GHC Proposal #371 requires TypeOperators to use type equality a~b. This submodule update pulls in the appropriate forward-compatibility changes in 'libraries/containers' and 'libraries/exceptions'
* Improve setBit for NaturalSimon Jakobi2022-03-074-0/+14
| | | | | | | Previously the default definition was used, which involved allocating intermediate Natural values. Fixes #21173.
* Fix gen_contents_index logic for hadrian bindistMatthew Pickering2022-03-071-1/+12
|
* remove MonadFail instances of STArtem Pelenitsyn2022-03-053-9/+5
| | | | | | | | CLC proposal: https://github.com/haskell/core-libraries-committee/issues/33 The instances had `fail` implemented in terms of `error`, whereas the idea of the `MonadFail` class is that the `fail` method should be implemented in terms of the monad itself.
* base: Mark GHC.Bits not-home for haddockSimon Jakobi2022-03-041-0/+2
| | | | | Most (all) of the exports are re-exported from the preferable Data.Bits.
* docs: Add note to unsafeCoerce function that you might want to use coerce ↵Matthew Pickering2022-03-031-0/+4
| | | | | | [skip ci] Fixes #15429
* Use Word64# primops in Word64 Num instanceSylvain Henry2022-03-031-3/+3
| | | | Taken froù!3658
* base: Remove default method from bitraversableMatthew Pickering2022-03-021-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | The default instance leads to an infinite loop. bisequenceA is defined in terms of bisquence which is defined in terms of bitraverse. ``` bitraverse f g = (defn of bitraverse) bisequenceA . bimap f g = (defn of bisequenceA) bitraverse id id . bimap f g = (defn of bitraverse) ... ``` Any instances defined without an explicitly implementation are currently broken, therefore removing it will alert users to an issue in their code. CLC issue: https://github.com/haskell/core-libraries-committee/issues/47 Fixes #20329 #18901
* Improve out-of-order inferred type variablessheaf2022-03-021-10/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't instantiate type variables for :type in `GHC.Tc.Gen.App.tcInstFun`, to avoid inconsistently instantianting `r1` but not `r2` in the type forall {r1} (a :: TYPE r1) {r2} (b :: TYPE r2). ... This fixes #21088. This patch also changes the primop pretty-printer to ensure that we put all the inferred type variables first. For example, the type of reallyUnsafePtrEquality# is now forall {l :: Levity} {k :: Levity} (a :: TYPE (BoxedRep l)) (b :: TYPE (BoxedRep k)). a -> b -> Int# This means we avoid running into issue #21088 entirely with the types of primops. Users can still write a type signature where the inferred type variables don't come first, however. This change to primops had a knock-on consequence, revealing that we were sometimes performing eta reduction on keepAlive#. This patch updates tryEtaReduce to avoid eta reducing functions with no binding, bringing it in line with tryEtaReducePrep, and thus fixing #21090.
* template-haskell: fix docstring for BytesTeo Camarasu2022-02-281-0/+1
| | | | | It seems like a commented out section of code was accidentally included in the docstring for a field.
* template-haskell: fix typo in docstring for OverlapTeo Camarasu2022-02-281-1/+1
|
* Fix some hlint issues in ghc-heapSven Tennie2022-02-282-7/+4
| | | | | This does not fix all hlint issues as the criticised index and length expressions seem to be fine in context.
* Make modules in base stable.Hécate Moonlight2022-02-2863-63/+63
| | | | fix #18963
* Add Monoid a => Monoid (STM a) instanceOleg Grenrus2022-02-281-0/+8
|