| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
| |
failIO has useful information in its demand signature (specifically that
it bottoms) which is hidden if it is SOURCE imported, as noted
in #16588. Rejigger things such that we don't SOURCE import it.
Metric Increase:
T13701
|
|
|
|
|
|
|
| |
Replace the outer `MVar` in `QSemN` with an `IORef`. This should
probably be lighter, and it removes the need for `uninterruptibleMask`.
Previously Differential Revision https://phabricator.haskell.org/D4896
|
|
|
|
| |
Generic1 instances to Kleisli
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GHC Proposal: 0013-unlifted-newtypes.rst
Discussion: https://github.com/ghc-proposals/ghc-proposals/pull/98
Issues: #15219, #1311, #13595, #15883
Implementation Details:
Note [Implementation of UnliftedNewtypes]
Note [Unifying data family kinds]
Note [Compulsory newtype unfolding]
This patch introduces the -XUnliftedNewtypes extension. When this
extension is enabled, GHC drops the restriction that the field in
a newtype must be of kind (TYPE 'LiftedRep). This allows types
like Int# and ByteArray# to be used in a newtype. Additionally,
coerce is made levity-polymorphic so that it can be used with
newtypes over unlifted types.
The bulk of the changes are in TcTyClsDecls.hs. With -XUnliftedNewtypes,
getInitialKind is more liberal, introducing a unification variable to
return the kind (TYPE r0) rather than just returning (TYPE 'LiftedRep).
When kind-checking a data constructor with kcConDecl, we attempt to
unify the kind of a newtype with the kind of its field's type. When
typechecking a data declaration with tcTyClDecl, we again perform a
unification. See the implementation note for more on this.
Co-authored-by: Richard Eisenberg <rae@richarde.dev>
|
|
|
|
|
|
|
| |
Previously the haddocks for Control.Monad and Data.Functor gave
the impression that `fmap` was the only Functor method.
Fixes #16681.
|
|
|
|
|
|
| |
As per https://prime.haskell.org/wiki/Libraries/Proposals/MonadFail
Coauthored-by: Ben Gamari <ben@well-typed.com>
|
|
|
|
|
| |
This moves all URL references to Trac tickets to their corresponding
GitLab counterparts.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes #14037.
Metric Decrease:
T9872b
T9872d
Reviewers: bgamari, simonpj, hvr
Reviewed By: simonpj
Subscribers: AndreasK, simonpj, osa1, dfeuer, rwbarton, carter
GHC Trac Issues: #14037
Differential Revision: https://phabricator.haskell.org/D5249
|
|
|
|
|
|
| |
Alexandre Balde (rockbmb) points out that the fusion technology
for foldr2, zip, zipWith, etc is undocumented. This patch adds
comments to explain.
|
|
|
|
| |
GHC Trac Issues: #15447
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: RyanGlScott, ekmett, hvr, bgamari
Reviewed By: bgamari
Subscribers: rwbarton, carter
GHC Trac Issues: #15995
Differential Revision: https://phabricator.haskell.org/D5456
|
|
|
|
|
|
| |
* laws are capitalized definition lists, no emphasis on the labels
* adds missing hyperlinks
* fixes other misc. Haddock markup issues.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
FIxes #15189.
Reviewers: hvr, bgamari, simonmar, simonpj
Reviewed By: simonpj
Subscribers: simonpj, rwbarton, thomie, carter
GHC Trac Issues: #15189
Differential Revision: https://phabricator.haskell.org/D5019
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This drastically cuts down on the number of Haddock warnings when making
docs for `base`. Plus this means more actual links end up in the docs!
Also fixed other small mostly markup issues in the documentation along
the way.
This is a docs-only change.
Reviewers: hvr, bgamari, thomie
Reviewed By: thomie
Subscribers: thomie, rwbarton, carter
Differential Revision: https://phabricator.haskell.org/D5055
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Trac #15349 reveals that lazy blackholing can cause trouble for
`fixST` much like it can for `fixIO`. Make `fixST` work just
like `fixIO`.
Reviewers: simonmar, hvr, bgamari
Reviewed By: simonmar
Subscribers: rwbarton, thomie, carter
GHC Trac Issues: #15349
Differential Revision: https://phabricator.haskell.org/D4948
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Specifically:
* MonadFix
* MonadZip
* Data
* Foldable
* Traversable
* Eq1
* Ord1
* Read1
* Show1
* Generic
* Generic1
Fixes #15098.
Reviewers: RyanGlScott, hvr
Reviewed By: RyanGlScott
Subscribers: sjakobi, rwbarton, thomie, ekmett, carter
GHC Trac Issues: #15098
Differential Revision: https://phabricator.haskell.org/D4870
|
|
|
|
|
|
|
|
| |
Reviewers: hvr, bgamari
Subscribers: rwbarton, thomie, carter
Differential Revision: https://phabricator.haskell.org/D4871
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When `readMVar` was implemented using `takeMVar` and `putMVar`,
we needed to use `modifyMVarMasked` in `readChan` just in case
the `readMVar` was interrupted between taking and putting. Now
that `readMVar` uses an atomic primop, this is impossible, so we can
safely unmask `readMVar`.
Reviewers: hvr, bgamari, simonmar
Reviewed By: simonmar
Subscribers: rwbarton, thomie, carter
Differential Revision: https://phabricator.haskell.org/D4738
|
|
|
|
|
| |
This data type witnesses the lifting of a monoid into an applicative
pointwise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We introduce a new Id for unused pointer values in unboxed sums that is
not CAFFY. Because the Id is not CAFFY it doesn't make non-CAFFY
definitions CAFFY, fixing #15038.
To make sure anything referenced by the new id will be retained we get a
stable pointer to in on RTS startup.
Test Plan: Passes validate
Reviewers: simonmar, simonpj, hvr, bgamari, erikd
Reviewed By: simonmar
Subscribers: rwbarton, thomie, carter
GHC Trac Issues: #15038
Differential Revision: https://phabricator.haskell.org/D4680
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: ./validate
Reviewers: hvr, goldfire, bgamari, RyanGlScott
Reviewed By: RyanGlScott
Subscribers: rwbarton, thomie, carter
GHC Trac Issues: #11767
Differential Revision: https://phabricator.haskell.org/D4452
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix missing code example in changelog for 8.4.1
* List 'setEnv' as opposite of 'getEnv'
It seems best to direct users to use 'System.Environment.setEnv'
rather than 'System.Posix.Env.putEnv'. This is due to 'setEnv' being
located in the same module as 'getEnv' and my virtue of working on
Windows platform, whereas 'putEnv' does not have that quality because
it's part of the 'unix' package.
* Reflect in docs the fact that 'readMVar' is not a composition of
'takeMVVar' and 'putMVar' any more
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Distinguishing between "refutable" and "irrefutable" patterns
(as described by the Haskell Report) in incomplete pattern errors
was more confusing than helpful. Remove references to irrefutable
patterns.
Reviewers: hvr, bgamari, simonpj
Reviewed By: simonpj
Subscribers: simonpj, rwbarton, thomie, carter
GHC Trac Issues: #14569
Differential Revision: https://phabricator.haskell.org/D4261
|
|
|
|
|
|
|
| |
When merging D4259 I had to resort to manual merge due to some conflicts that
arc couldn't sort out. Unfortunately in the process I merged the wrong version
of the patch. Fix this. Thanks to @ntc2 for the great documentation and noticing
my mistake.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
* Reformat Control.Monad.mfilter docs
The formatting was bad, with everything running together, and a
paranthesis was missing. Now the examples and relation between
`filter` and `mfilter` are typeset as code blocks instead of inline.
* Add example to Control.Monad.join docs
The example is using `join . atomically` to run IO actions computed by
STM transactions.
I couldn't figure out how to link to the STM docs in
`Control.Monad.STM`, because that module comes from the `stm` package,
not from `base`, even though `stm` is also part of the GHC source
tree. So, instead I linked to the STM docs in `GHC.Conc`, which seems
inferior to linking to `Control.Monad.STM`, but better than having no
links at all.
* Add example to Control.Monad.forever docs
The example is a simple TCP echo server. To make the uses of `forever`
stand out in the example code, I only link to the non-`forever`
functions (e.g. `forkFinally`) in the import lists.
Reviewers: bgamari, hvr
Subscribers: rwbarton, thomie, carter
Differential Revision: https://phabricator.haskell.org/D4259
|
|
|
|
|
|
| |
The formatting was bad, with everything running together, and a
paranthesis was missing. Now the examples and relation between
`filter` and `mfilter` are typeset as code blocks instead of inline.
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: bgamari, Phyx, austin, hvr, simonmar
Reviewed By: bgamari
Subscribers: syd, rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D4041
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes Issue #12372: documentation for Control.Monad.guard not
useful after AMP.
Reviewers: hvr, bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie, carter
Differential Revision: https://phabricator.haskell.org/D4258
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On 64-bit UNIX and Windows, Haskell `Int` has 64 bits
but C `int msecs` has 32 bits, resulting in an overflow.
This commit fixes it by switching fdReady() to take int64_t,
into which a Haskell `Int` will always fit.
(Note we could not switch to `long long` because that is
32 bit on 64-bit Windows machines.)
Further, to be able to actually wait longer than ~49 days,
we put loops around the waiting syscalls (they all accept only
32-bit integers).
Note the timer signal would typically interrupt the syscalls
before the ~49 days are over, but you can run Haskell programs
without the timer signal, an we want it to be correct in all
cases.
Reviewers: bgamari, austin, hvr, NicolasT, Phyx
Reviewed By: bgamari, Phyx
Subscribers: syd, Phyx, rwbarton, thomie
GHC Trac Issues: #14262
Differential Revision: https://phabricator.haskell.org/D4011
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Traditionally, `fixIO f` throws `BlockedIndefinitelyOnMVar` if
`f` is strict. This is not particularly friendly, since the
`MVar` in question is just part of the way `fixIO` happens to be
implemented. Instead, throw a new `FixIOException` with a better
explanation of the problem.
Reviewers: austin, hvr, bgamari
Subscribers: rwbarton, thomie
GHC Trac Issues: #14356
Differential Revision: https://phabricator.haskell.org/D4113
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Removes isEmptyChan and unGetChan, which have been deprecated for a very
long time. See #13561.
Test Plan: Validate
Reviewers: austin, hvr
Subscribers: rwbarton, thomie
GHC Trac Issues: #13561
Differential Revision: https://phabricator.haskell.org/D4060
|
|
|
|
|
|
| |
This is a preparatory refactoring for Semigroup=>Monoid
as it prevents a messy .hs-boot file which would interact
inconveniently with the buildsystem...
|
| |
|
| |
|
|
|
| |
As reported by tabaqui on `#hackage`
|
| |
|
| |
|
| |
|
|
|
|
| |
Our new CPP linter enforces this.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Mention that the read end is an `MVar`, so fairness guarantees are
inherited.
- Mention that it can throw `BlockedIndefinitelyOnMVar` exception.
Reviewers: austin, hvr, bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie
GHC Trac Issues: #5466
Differential Revision: https://phabricator.haskell.org/D3439
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: austin, hvr, bgamari, RyanGlScott
Reviewed By: RyanGlScott
Subscribers: adamse, RyanGlScott, rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3416
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Make `unsafeInterleaveST` use `noDuplicate#` like
`unsafeInterleaveIO` does to prevent the suspended action from
being run in two threads.
* In order to accomplish this without `unsafeCoerce#`, generalize
the type of `noDuplicate#`.
* Add `unsafeDupableInterleaveST` to get the old behavior.
* Document unsafe `ST` functions and clean up some related
documentation.
Fixes #13457
Reviewers: austin, hvr, bgamari, ekmett
Reviewed By: bgamari
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3370
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I was initially confused when I read "zipWithn" in the haddock for
ZipList, went looking for a function named "zipWithn", and found that
it didn't exist. This expands the docs to clarify that we're referring
to the family of functions [zipWith, zipWith3, zipWith4, ...],
capitalizes the letter "n" in "zipWithN" in attempt to make that more
readable, and gives an example.
I also moved this documentation from ZipList itself to the Applicative
instance, so that it will show up in both the Ziplist documentation and
in the list of Applicative instances.
Reviewers: austin, hvr, bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3324
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: austin, hvr, bgamari, dfeuer
Reviewed By: dfeuer
Subscribers: dfeuer, thomie
Differential Revision: https://phabricator.haskell.org/D3284
|