| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit updates several submodules in order to bump
the upper bounds on `base` of most boot packages
Moreover, this updates some of the test-suite cases which have
version numbers hardcoded within.
However, I'm not sure if this commit didn't introduce the following
two test-failures
ghc-api T8628 [bad stdout] (normal)
ghc-api T8639_api [bad stdout] (normal)
This needs investigation
|
|
|
|
|
|
|
|
| |
This reverts commit 0829f4c829a92d1287b820b12102a64dac91d35a.
This fails to build, because I'm dumb and hasty, obviously.
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
| |
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This includes pretty much all the changes needed to make `Applicative`
a superclass of `Monad` finally. There's mostly reshuffling in the
interests of avoid orphans and boot files, but luckily we can resolve
all of them, pretty much. The only catch was that
Alternative/MonadPlus also had to go into Prelude to avoid this.
As a result, we must update the hsc2hs and haddock submodules.
Signed-off-by: Austin Seipp <austin@well-typed.com>
Test Plan: Build things, they might not explode horribly.
Reviewers: hvr, simonmar
Subscribers: simonmar
Differential Revision: https://phabricator.haskell.org/D13
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
to allow GHC to maybe remove the Maybe. See the code comment for more
commentary. This fixes #9369.
Test Plan: see what happens on ghcspeed (once it is merged)
Reviewers: austin
Reviewed By: austin
Subscribers: simonmar, ezyang, carter
Differential Revision: https://phabricator.haskell.org/D198
GHC Trac Issues: #9369
|
|
|
|
|
| |
This is a follow-up commit to
e428b5b8cc1448dcff7d7cdcbeb738eb0bea102f (refs D195 & #9550)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
As discussed in
http://www.haskell.org/pipermail/libraries/2014-July/023314.html and
submitted at #9550.
Test Plan: Submit to phab, see what happens.
Reviewers: austin
Subscribers: simonmar, ezyang, carter
Differential Revision: https://phabricator.haskell.org/D195
GHC Trac Issues: #9550
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The property
countLeadingZeros . negate = const 0
doesn't generally hold and it's not such a useful property to state, as
it simply follows from "sign-bit == most-significant-bit" for FiniteBits
types which use twos-complement representation for negative values, and
even then it breaks down for 0...
TLDR, remove thinko from documentation of `countLeadingZeros`
|
|
|
|
|
|
| |
...some files more or less recently touched by me
[ci skip]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This exposes the newly added CLZ/CTZ primops from
e0c1767d0ea8d12e0a4badf43682a08784e379c6 (re #9340)
via two new methods `countLeadingZeros` and `countTrailingZeros`
in the `Data.Bits.FiniteBits` class.
The original proposal can be found at
http://www.haskell.org/pipermail/libraries/2014-August/023567.html
Test Plan: successful validate
Reviewers: ekmett, tibbe
GHC Trac Issues: #9532
Differential Revision: https://phabricator.haskell.org/D158
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The original proposal text can be found at
http://www.haskell.org/pipermail/libraries/2014-August/023491.html
The proposal passed with a clear majority, and was additionally
confirmed by the core libraries committee.
*Compatibility Note*
Only code that imports `Data.Word` for the sole purpose of using `Word`
*and* requires to be `-Werror`-clean (due to `-fwarn-unused-imports`)
is affected by this change.
In order to write warning-free forward/backward compatible against `base`,
a variant of the following CPP-based snippet can be used:
-- Starting with base>4.7.0 or GHC>7.8 Prelude re-exports 'Word'
-- The following is needed, if 'Word' is the *only* entity needed from Data.Word
#ifdef MIN_VERSION_base
# if !MIN_VERSION_base(4,7,1)
import Data.Word (Word)
# endif
-- no cabal_macros.h -- fallback to __GLASGOW_HASKELL__
#elif __GLASGOW_HASKELL__ < 709
import Data.Word (Word)
#endif
This also updates the haddock submodule in order to avoid a compile warning
|
|
|
|
| |
Patch written by Pali Gabor Janos <pali.gabor@gmail.com>
|
|
|
|
|
|
| |
In particular, Cabal was still in one place using old file-style package
databases. Haddock just needed simple changes to follow the change of
representation of packages in the ghc library.
|
|
|
|
| |
Some others addressed as part of other recent patches.
|
|
|
|
| |
in the previous patches in this series
|
| |
|
|
|
|
|
| |
The ghc-pkg program of course still depends on Cabal, it's just the
bin-package-db library (shared between ghc and ghc-pkg) that does not.
|
|
|
|
|
|
|
|
| |
Also start using the new package db file format properly, by using the
ghc-specific section.
This is the main patch in the series for removing the compiler's dep
on the Cabal lib.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The purpose of the new format is to make it possible for the compiler
to not depend on the Cabal library. The new cache file format contains
more or less the same information duplicated in two different sections
using different representations.
One section is basically the same as what the package db contains now,
a list of packages using the types defined in the Cabal library. This
section is read back by ghc-pkg, and used for things like ghc-pkg dump
which have to produce output using the Cabal InstalledPackageInfo text
representation.
The other section is a ghc-local type which contains a subset of the
information from the Cabal InstalledPackageInfo -- just the bits that
the compiler cares about.
The trick is that the compiler can read this second section without
needing to know the representation (or types) of the first part. The
ghc-pkg tool knows about both representations and writes both.
This patch introduces the new cache file format but does not yet use it
properly. More patches to follow. (As of this patch, the compiler reads
the part intended for ghc-pkg so it still depends on Cabal and the
ghc-local package type is not yet fully defined.)
|
|
|
|
|
|
|
| |
We can serialise directly, without having to convert some fields to
string first.
(Part of preparitory work for removing the compiler's dep on Cabal)
|
|
|
|
|
|
|
|
|
|
| |
This was previously happening by a fluke -- they were called with those types
in GHC.Real itself -- but my recent changes to specialisation mean that auto
specialisations like these are not necessarily exported.
Losing those specialisations made a huge difference to two performance tests
perf/should_run/MethSharing
perf/should_run/T9339
|
|
|
|
| |
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
| |
|
|
|
|
|
| |
Specialise liftM, foldM, etc, and make them specialisable
for new monads at their call sites by using INLINEABLE
|
| |
|
|
|
|
|
| |
This just avoids an unnecessary orphan instance.
All the other instances for "earlier" types are in GHC.Enum already.
|
|
|
|
|
| |
These instances are quite common, so it's good to have
pre-specialised versions available
|
|
|
|
|
|
|
|
|
| |
This should fix the Windows fallout, and hopefully this will be fixed
once that's sorted out.
This reverts commit f9f89b7884ccc8ee5047cf4fffdf2b36df6832df.
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
| |
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Fix #9423.
The problem in #9423 is caused when code invoked by `hs_exit()` waits
on all foreign calls to return, but some IO managers are in `safe` foreign
calls and do not return. The previous design signaled to the timer manager
(via its control pipe) that it should "die" and when the timer manager
returned to Haskell-land, the Haskell code in timer manager then signalled
to the IO manager threads that they should return from foreign calls and
`die`. Unfortunately, in the shutdown sequence the timer manager is unable
to return to Haskell-land fast enough and so the code that signals to the
IO manager threads (via their control pipes) is never executed and the IO
manager threads remain out in the foreign calls.
This patch solves this problem by having the RTS signal to all the IO
manager threads (via their control pipes; and in addition to signalling
to the timer manager thread) that they should shutdown (in `ioManagerDie()`
in `rts/Signals.c`. To do this, we arrange for each IO manager thread to
register its control pipe with the RTS (in `GHC.Thread.startIOManagerThread`).
In addition, `GHC.Thread.startTimerManagerThread` registers its control pipe.
These are registered via C functions `setTimerManagerControlFd` (in
`rts/Signals.c`) and `setIOManagerControlFd` (in `rts/Capability.c`). The IO
manager control pipe file descriptors are stored in a new field of the
`Capability_ struct`.
Test Plan: See the notes on #9423 to recreate the problem and to verify that it no longer occurs with the fix.
Auditors: simonmar
Reviewers: simonmar, edsko, ezyang, austin
Reviewed By: austin
Subscribers: phaskell, simonmar, ezyang, carter, relrod
Differential Revision: https://phabricator.haskell.org/D129
GHC Trac Issues: #9423, #9284
|
|
|
|
|
|
|
| |
This addresses Trac #8712 by simply mentioning row-major indexing,
thereby removing any ambiguity.
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Make the `Float` and `Double` implementations of `signum` handle -0.0
correctly per IEEE-754.
This, together with "Make Prelude.abs handle -0.0 correctly (#7858)",
fixes Trac #7858.
Depends on D145
Signed-off-by: Alexander Berntsen <alexander@plaimi.net>
Test Plan:
signum of (-0.0) should be (-0.0) not 0.0.
Test program:
main =
putStrLn $ p ++ " " ++ n
where
f = show . signum
p = f (-0.0 :: Double)
n = f (0.0 :: Double)
Reviewers: ekmett, hvr, rwbarton, austin
Reviewed By: austin
Subscribers: phaskell, simonmar, relrod, ezyang, carter
Differential Revision: https://phabricator.haskell.org/D148
GHC Trac Issues: #7858
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Make the `Float` and `Double` implementations of `abs` handle -0.0
correctly per IEEE-754.
abs (-0.0::Float) and abs (-0.0::Double) previously returned -0.0, when
they should return 0.0. This patch fixes this.
Signed-off-by: Alexander Berntsen <alexander@plaimi.net>
Test Plan: abs (-0.0::Double) should = 0.0 instead of (-0.0)
Reviewers: ekmett, hvr, austin, rwbarton
Reviewed By: austin, rwbarton
Subscribers: phaskell, trofi, simonmar, relrod, ezyang, carter
Differential Revision: https://phabricator.haskell.org/D145
GHC Trac Issues: #7858
|
|
|
|
|
| |
Ralf Laemmel's page has disappeared, so I made it point to the Haskell
Wiki page instead.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On Linux/i386 the 64bit `__builtin_ctzll()` instrinsic doesn't get
inlined by GCC but rather a short `__ctzdi2` runtime function is
inserted when needed into compiled object files.
This causes failures for the four test-cases
TEST="T8639_api T8628 dynCompileExpr T5313"
with error messages of the kind
dynCompileExpr: .../libraries/ghc-prim/dist-install/build/libHSghcpr_BE58KUgBe9ELCsPXiJ1Q2r.a: unknown symbol `__ctzdi2'
dynCompileExpr: dynCompileExpr: unable to load package `ghc-prim'
This workaround forces GCC on 32bit x86 to to express `hs_ctz64` in
terms of the 32bit `__builtin_ctz()` (this is no loss, as there's no
64bit BSF instruction on i686 anyway) and thus avoid the problematic
out-of-line runtime function.
Note: `__builtin_ctzll()` is used since
e0c1767d0ea8d12e0a4badf43682a08784e379c6 (re #9340)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This implements the new primops
clz#, clz32#, clz64#,
ctz#, ctz32#, ctz64#
which provide efficient implementations of the popular
count-leading-zero and count-trailing-zero respectively
(see testcase for a pure Haskell reference implementation).
On x86, NCG as well as LLVM generates code based on the BSF/BSR
instructions (which need extra logic to make the 0-case well-defined).
Test Plan: validate and succesful tests on i686 and amd64
Reviewers: rwbarton, simonmar, ezyang, austin
Subscribers: simonmar, relrod, ezyang, carter
Differential Revision: https://phabricator.haskell.org/D144
GHC Trac Issues: #9340
|
|
|
|
| |
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: Signed-off-by: Michael Snoyman <michael@snoyman.com>
Test Plan: Review documentation change
Reviewers: simonpj, austin
Reviewed By: austin
Subscribers: phaskell, hvr, simonmar, relrod, ezyang, carter
Differential Revision: https://phabricator.haskell.org/D136
GHC Trac Issues: #9390
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: validate
Reviewers: simonmar, austin
Reviewed By: austin
Subscribers: phaskell, simonmar, relrod, ezyang, carter
Differential Revision: https://phabricator.haskell.org/D127
|
|
|
|
| |
The modules already have the modern version {-# OPTIONS_HADDOCK hide #-}.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The change here is to make INCOHERENT slightly more permissive:
if the selected candidate is incoherent
then ignore all unifying candidates
This allows us to move the {-# INCOHERENT #-} pragma from
from instance Typeable (f a)
to Typeable (n:Nat) and Typable (s:Symbol)
where it belongs, and where Trac #9242 said it should be.
I don't think this will affect anyone.
I've updated the user manual.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Previously, if you ran trace "foo\0bar", the output was truncated so
that everything after the null byte was omitted. This was terrible.
Now we filter out null bytes, and emit an extra trace saying that
null bytes were filtered out.
NB: we CANNOT fix debugBelch, because all printf variants *always*
respect null bytes, even if you're using string precision such as
%.*s. The alternative would have been to introduce a new function
debugRawBelch which did not use format strings and took an explicit
string length, but I decided we generally should avoid putting null
bytes in our trace messages, and warn the user.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: hvr, austin
Subscribers: simonmar, relrod, ezyang, carter
Differential Revision: https://phabricator.haskell.org/D121
GHC Trac Issues: #9395
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch set makes us no longer assume that a package key is a human
readable string, leaving Cabal free to "do whatever it wants" to allocate
keys; we'll look up the PackageId in the database to display to the user.
This also means we have a new level of qualifier decisions to make at the
package level, and rewriting some Safe Haskell error reporting code to DTRT.
Additionally, we adjust the build system to use a new ghc-cabal output
Make variable PACKAGE_KEY to determine library names and other things,
rather than concatenating PACKAGE/VERSION as before.
Adds a new `-this-package-key` flag to subsume the old, erroneously named
`-package-name` flag, and `-package-key` to select packages by package key.
RFC: The md5 hashes are pretty tough on the eye, as far as the file
system is concerned :(
ToDo: safePkg01 test had its output updated, but the fix is not really right:
the rest of the dependencies are truncated due to the fact the we're only
grepping a single line, but ghc-pkg is wrapping its output.
ToDo: In a later commit, update all submodules to stop using -package-name
and use -this-package-key. For now, we don't do it to avoid submodule
explosion.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: simonpj, simonmar, hvr, austin
Subscribers: simonmar, relrod, carter
Differential Revision: https://phabricator.haskell.org/D80
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This patch fixes topHandler03 execution on Solaris where
shell correctly signals SIGTERM as exit status 15.
Test Plan: validate
Reviewers: austin
Reviewed By: austin
Subscribers: phaskell, simonmar, relrod, ezyang, carter
Differential Revision: https://phabricator.haskell.org/D112
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: validate
Reviewers: austin
Reviewed By: austin
Subscribers: phaskell, simonmar, relrod, ezyang, carter
Differential Revision: https://phabricator.haskell.org/D114
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The patch names most of RTS threads
and ghc (the tool) threads.
It makes nicer debug and eventlog output for ghc itself.
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Test Plan: ran debugged ghc under '+RTS -Ds'
Reviewers: simonmar, austin
Reviewed By: austin
Subscribers: phaskell, simonmar, relrod, ezyang, carter
Differential Revision: https://phabricator.haskell.org/D101
|
|
|
|
| |
C.f. Trac #9242
|