summaryrefslogtreecommitdiff
path: root/libraries/base
Commit message (Collapse)AuthorAgeFilesLines
...
* Export indexError from GHC.Ix (#18579)Krzysztof Gogolewski2020-11-201-1/+1
|
* Export SPEC from GHC.Exts (#13681)Sylvain Henry2020-11-101-1/+1
|
* Merge remote-tracking branch 'origin/wip/tsan/all'Ben Gamari2020-11-081-0/+4
|\
| * Mitigate data races in event manager startup/shutdownwip/tsan/event-mgrBen Gamari2020-10-241-0/+4
| |
* | Naming, value types and tests for Addr# atomicsViktor Dukhovni2020-11-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The atomic Exchange and CAS operations on integral types are updated to take and return more natural `Word#` rather than `Int#` values. These are bit-block not arithmetic operations, and the sign bit plays no special role. Standardises the names to `atomic<OpType><ValType>Addr#`, where `OpType` is one of `Cas` or `Exchange` and `ValType` is presently either `Word` or `Addr`. Eventually, variants for `Word32` and `Word64` can and should be added, once #11953 and related issues (e.g. #13825) are resolved. Adds tests for `Addr#` CAS that mirror existing tests for `MutableByteArray#`.
* | Fix a leak in `transpose`Hécate2020-11-014-6/+75
| | | | | | | | This patch was authored by David Feuer <david.feuer@gmail.com>
* | winio: Fix unused variables warningsTamar Christina2020-10-311-13/+9
| |
* | [skip ci] Fix typo in `callocBytes` haddock.Viktor Dukhovni2020-10-301-1/+1
| |
* | winio: simplify logic remove optimization step.Tamar Christina2020-10-271-42/+65
| |
* | Version bump: base-4.16 (#18712)Vladislav Zavialov2020-10-272-2/+2
| | | | | | | | Also bumps upper bounds on base in boot libraries (incl. submodules).
* | Fix `instance Bounded a => Bounded (Down a)` (#18716)David Beacham2020-10-272-6/+32
|/ | | | | | | * Flip `minBound` and `maxBound` to respect the change in ordering * Remove awkward `Enum` (and hence `Integral`) instances for `Data.Ord.Down` * Update changelog
* Linting correctionsHécate2020-10-171-1/+1
| | | | | * Bring back LANGUAGE pragmas in GHC.IO.Handle.Lock.Windows * Exclude some modules that are wrongfully reported
* base: Reintroduce necessary LANGUAGE pragmasBen Gamari2020-10-161-0/+2
| | | | These were incorrectly removed in a recent cleanup commit.
* Extend mAX_TUPLE_SIZE to 64GHC GitLab CI2020-10-151-1/+1
| | | | As well a ctuples and sums.
* Remove Proxy# argument in Data.Typeable.InternalKrzysztof Gogolewski2020-10-152-5/+5
| | | | | | No longer neccessary - TypeRep is now indexed, there is no ambiguity. Also fix a comment in Evidence.hs, IsLabel no longer takes a Proxy#.
* Unification of Nat and NaturalsHaskellMouse2020-10-136-11/+26
| | | | | | | | | | | | | | | | | | | | | | | This commit removes the separate kind 'Nat' and enables promotion of type 'Natural' for using as type literal. It partially solves #10776 Now the following code will be successfully typechecked: data C = MkC Natural type CC = MkC 1 Before this change we had to create the separate type for promotion data C = MkC Natural data CP = MkCP Nat type CC = MkCP 1 But CP is uninhabited in terms. For backward compatibility type synonym `Nat` has been made: type Nat = Natural The user's documentation and tests have been updated. The haddock submodule also have been updated.
* winio: fixed more data error.Tamar Christina2020-10-091-1/+1
|
* winio: fixed bytestring reading interface.Tamar Christina2020-10-094-3/+43
|
* winio: fix array splatTamar Christina2020-10-091-3/+7
|
* Add linting of `base` to the CIHécate2020-10-099-23/+22
|
* WinIO: Small changes related to atomic request swaps.Andreas Klebinger2020-10-073-18/+22
| | | | | | | | | | | | Move the atomix exchange over the Ptr type to an internal module. Fix a bug caused by us passing ptr-to-ptr instead of ptr to atomic exchange. Renamed interlockedExchange to exchangePtr. I've also added an cas primitive. It turned out we don't need it for WinIO but I'm leaving it in as it's useful for other things.
* Fix typos in commentsKrzysztof Gogolewski2020-10-023-3/+3
| | | | [skip ci]
* Allow fusion with catMaybes (#18574)Sylvain Henry2020-10-012-2/+5
| | | | | Metric Decrease: T18574
* New linear types syntax: a %p -> b (#18459)Vladislav Zavialov2020-09-291-5/+5
| | | | | | Implements GHC Proposal #356 Updates the haddock submodule.
* Update Lock.hs with more documentation to make sure that the Boolean return ↵syd@cs-syd.eu2020-09-241-0/+2
| | | | | | value is clear. [skip ci]
* Remove redundant "do", "return" and language extensions from baseHécate2020-09-2346-188/+191
|
* testsuite: Mark tempfiles as broken on Win32 without WinIOGHC GitLab CI2020-09-201-1/+4
| | | | The old POSIX emulation appears to ignore the user-requested prefix.
* base/testsuite: Add missing LANGUAGE pragma in ThreadDelay001Ben Gamari2020-09-201-0/+1
| | | | Only affected the Windows codepath.
* Export singleton function from Data.ListWander Hillen2020-09-191-0/+1
| | | | | | | | | | | | | | | Data.OldList exports a monomorphized singleton function but it is not re-exported by Data.List. Adding the export to Data.List causes a conflict with a 14-year old function of the same name and type by SPJ in GHC.Utils.Misc. We can't just remove this function because that leads to a problems when building GHC with a stage0 compiler that does not have singleton in Data.List yet. We also can't hide the function in GHC.Utils.Misc since it is not possible to hide a function from a module if the module does not export the function. To work around this, all places where the Utils.Misc singleton was used now use a qualified version like Utils.singleton and in GHC.Utils.Misc we are very specific about which version we export.
* Deprecate Data.Semigroup.OptionSimon Jakobi2020-09-192-6/+6
| | | | | | | | | | | | Libraries email: https://mail.haskell.org/pipermail/libraries/2018-April/028724.html GHC issue: https://gitlab.haskell.org/ghc/ghc/issues/15028 Corresponding PRs for deepseq: * https://github.com/haskell/deepseq/pull/55 * https://github.com/haskell/deepseq/pull/57 Bumps the deepseq submodule.
* Make the 'IsString (Const a b)' instance polykinded on 'b'Cary Robbins2020-09-171-1/+3
|
* Add testsSandy Maguire2020-09-124-0/+45
|
* Add clamp function to Data.OrdSandy Maguire2020-09-121-0/+16
|
* Add clarification regarding poll/kqueue flagsWander Hillen2020-09-071-2/+6
|
* Remove potential space leak from Data.List.transposeDavid Feuer2020-09-021-1/+7
| | | | | | | | | Previously, `transpose` produced a list of heads and a list of tails independently. This meant that a function using only some heads, and only some tails, could potentially leak space. Use `unzip` to work around the problem by producing pairs and selector thunks instead. Time and allocation behavior will be worse, but there should be no more leak potential.
* base: Better error message on invalid getSystemTimerManager callBen Gamari2020-08-311-2/+4
| | | | | | | | | Previously we would produce a rather unhelpful pattern match failure error in the case where the user called `getSystemTimerManager` in a program which isn't built with `-threaded`. This understandably confused the user in #15616. Fixes #15616.
* Re-add BangPatterns to CodePage.hsHécate2020-08-131-0/+2
|
* Remove all the unnecessary LANGUAGE pragmasHécate2020-08-0560-188/+160
|
* Bignum: add backward compat integer-gmp functionsSylvain Henry2020-08-052-5/+13
| | | | Also enhance bigNatCheck# and isValidNatural test
* Fix typoFelix Wiemuth2020-07-291-1/+1
|
* Fix typo in haddockOleg Grenrus2020-07-281-1/+1
| | | | Spotted by `vilpan` on `#haskell`
* Bignum: add support for negative shifts (fix #18499)Sylvain Henry2020-07-281-4/+16
| | | | | | | shiftR/shiftL support negative arguments despite Haskell 2010 report saying otherwise. We explicitly test for negative values which is bad (it gets in the way of constant folding, etc.). Anyway, for consistency we fix Bits instancesof Integer/Natural.
* winio: fix detection of tty terminalsTamar Christina2020-07-261-2/+2
|
* testsuite: Normalise WinIO error message differencesBen Gamari2020-07-261-3/+3
| | | | | Previously the old Windows IO manager threw different errors than WinIO. We now canonicalise these to the WinIO errors.
* winio: change memory allocation strategy and fix double free errors.Tamar Christina2020-07-242-73/+95
|
* Define type Void# = (# #) (#18441)Krzysztof Gogolewski2020-07-222-2/+3
| | | | | There's one backwards compatibility issue: GHC.Prim no longer exports Void#, we now manually re-export it from GHC.Exts.
* Add a Lint hadrian rule and an .hlint.yaml file in base/Hécate2020-07-182-1/+6
|
* Implement `fullCompilerVersion`Hécate2020-07-184-10/+41
| | | | | | | | Follow-up of https://gitlab.haskell.org/ghc/ghc/-/issues/18403 This MR adds `fullCompilerVersion`, a function that shares the same backend as the `--numeric-version` GHC flag, exposing a full, three-digit version datatype.
* winio: clarify comment on cooked mode.Tamar Christina2020-07-151-1/+2
|
* winio: fix tempfiles test on linuxAndreas Klebinger2020-07-151-1/+1
|