1. 08 May, 2018 7 commits
2. 06 May, 2018 6 commits
• testsuite: Bump T5631 expected allocations · 7271db46
Ben Gamari authored
`This was failing on Darwin; I believe this is due to 33de71fa.`
• Stable area hyperbolic sine for `Double` and `Float`. · 3ea33411
Justus Sagemüller authored and Ben Gamari committed
```This function was unstable, in particular for negative arguments.

The reason is that the formula `log (x + sqrt (1 + x*x))` is dominated
by the numerical error of the `sqrt` function when x is strongly negative
(and thus the summands in the `log` mostly cancel). However, the area
hyperbolic sine is an odd function, thus the negative side can as well
be calculated by flipping over the positive side, which avoids this instability.

Furthermore, for _very_ big arguments, the `x*x` subexpression overflows. However,
long before that happens, the square root is anyways completely dominated
by that term, so we can neglect the `1 +` and get

sqrt (1 + x*x) ≈ sqrt (x*x) = x

and therefore

asinh x ≈ log (x + x) = log (2*x) = log 2 + log x

which does not overflow for any normal-finite positive argument, but
perfectly matches the exact formula within the floating-point accuracy.```
• Add hyperbolic functions to test of Float-inverses · d814dd38
Justus Sagemüller authored and Ben Gamari committed
```The area hyperbolic sine is currently broken,
• Add test for invertability of `Floating` methods. · be580b42
Justus Sagemüller authored and Ben Gamari committed
```These functions have inverses only on part of the real line, but
there they should be reliably inverted – that's basically the whole
point of the functions like `asin`, `atan` etc..```
3. 05 May, 2018 10 commits
Sebastian Graf authored and Ben Gamari committed
```This is mostly for congruence with 'subWordC#' and '{add,sub}IntC#'.
I found 'plusWord2#' while implementing this, which both lacks
documentation and has a slightly different specification than
'addWordC#', which means the generic implementation is unnecessarily
complex.

While I was at it, I also added lacking meta-information on PrimOps
and refactored 'subWordC#'s generic implementation to be branchless.

Reviewers: bgamari, simonmar, jrtc27, dfeuer

Reviewed By: bgamari, dfeuer

Subscribers: dfeuer, thomie, carter

• Use unsafeInsertNew to create timers in TimerManager · 418881f7
MitchellSalad authored and Ben Gamari committed
• Do not supply `-mcpu` if `-optlc` provides `-mcpu` already. · cb1ee7e1
Moritz Angermann authored and Ben Gamari committed
```Reviewers: bgamari

Subscribers: thomie, carter

GHC Trac Issues: #14982

• testsuite: Add test for #15067 · 0f046aae
Ben Gamari authored and Ben Gamari committed
```Subscribers: thomie, carter, RyanGlScott

GHC Trac Issues: #15067

• Normalize the element type of ListPat, fix #14547 · 361d23a8
Tao He authored and Ben Gamari committed
```The element type of `List` maybe a type family instacen, rather than a
trivial type.  For example in Trac #14547,

```

class Foo f where
type It f
foo :: [It f] -> f

data List a = Empty | a :! List a deriving Show

instance Foo (List a) where
type It (List a) = a
foo [] = Empty
foo (x : xs) = x :! foo xs
```

Here the element type of `[]` is `It (List a)`, we should also normalize
it as `a`.

Test Plan: make test TEST="T14547"

Reviewers: bgamari

Reviewed By: bgamari

Subscribers: thomie, carter

GHC Trac Issues: #14547

• Split TrieMap into a general (TrieMap) and core specific (CoreTrieMap) module. · 426ae988
Andreas Klebinger authored and Ben Gamari committed
```Splitting TrieMap into a general and core specific part allows us to
define instances for TrieMap without creating a transitive dependency on
CoreSyn.

Test Plan: ci

Reviewers: goldfire, bgamari, simonmar, simonpj

Reviewed By: bgamari, simonpj

Subscribers: simonpj, nomeata, thomie, carter

GHC Trac Issues: #15082

• rel-notes: Note that -hT is now allowed · 49f59430
Ben Gamari authored
```See #15086.

[skip-ci]```
• Fix typo in user guide about promoted list · 13e8bc0d
Masahiro Sakai authored and Ben Gamari committed
``:'` in explanation text should be `':` to match code example.`
• Update docker images to use GHC 8.4.2 and cabal-install-2.2 · 56e8c6fc
Mark Karpov authored and Ben Gamari committed
```The ‘haskell’ images are not being updated and there is no image with GHC
8.4.2, so we probably should not use them anymore. I adapted Dockerfiles
used by those images so the end result is almost the same except we get
• testsuite: Bump T9630 allocations as a result of 33de71fa · b750dcc5
Ben Gamari authored
```This patch made the simplifier inline nested function bindings less aggressively
and, while it didn't seem to affect nofib, appears to have regressed T9630
rather considerably.```
4. 04 May, 2018 2 commits
• Simplify callSiteInline a little · 33de71fa
Simon Peyton Jones authored
```This patch has virtually no effect on anything (according to a
nofib run).  But it simplifies the definition of interesting_call
by being a bit less gung-ho about inlining nested function
bindings.  See Note [Nested functions]

-----------------------------------------------------------------------
Program           Size    Allocs   Runtime   Elapsed  TotalMem
-----------------------------------------------------------------------
anna          +0.2%     -0.0%     0.163     0.163      0.0%
binary-trees          +0.1%     +0.0%     -4.5%     -4.5%      0.0%
cacheprof          -0.1%     +0.1%     -4.7%     -4.8%     +2.7%
fasta          +0.2%      0.0%     +2.6%     +3.0%      0.0%
fluid          -0.0%     -0.6%     0.011     0.011      0.0%
gamteb          -0.1%     -0.0%     0.069     0.070      0.0%
hpg          +0.1%     +0.0%     +0.7%     +0.7%      0.0%
infer          +0.3%     +0.2%     0.097     0.098      0.0%
lambda          -0.1%     -0.0%     +2.0%     +2.0%      0.0%
n-body          +0.1%     -0.1%     -0.1%     -0.1%      0.0%
simple          -0.2%     -0.2%     +0.6%     +0.6%      0.0%
spectral-norm          +0.1%     -0.0%     -0.1%     -0.1%      0.0%
tak          -0.0%     -0.1%     0.024     0.024      0.0%
--------------------------------------------------------------------------------
Min          -0.4%     -0.6%     -5.3%     -5.3%      0.0%
Max          +0.3%     +0.2%     +3.3%     +3.3%    +15.0%
Geometric Mean          -0.0%     -0.0%     -0.3%     -0.3%     +0.2%```
• Normalize T14999 test output some more · 56974323
niteria authored
```@osa1 reported that the output on his machine has extra newlines:
newlines.```
5. 03 May, 2018 15 commits
• Enable warning flags to safe-guard against regressions in `base` · 79c4f10e
Herbert Valerio Riedel authored and Ben Gamari committed
```Test Plan: via CI

Reviewers: bgamari

Subscribers: dfeuer, thomie, carter

• rts: Throw better error if --numa is used without libnuma support · 6462d90d
Ben Gamari authored and Ben Gamari committed
```Test Plan: Validate, run program with `+RTS --numa` without libnuma
support compiled in

Reviewers: erikd, simonmar

Subscribers: thomie, carter

GHC Trac Issues: #14956

• GHCi: Improve the error message for hidden packages · 721e8264
Chaitanya Koparkar authored and Ben Gamari committed
```Test Plan: make test TEST=T15055

Reviewers: bgamari, RyanGlScott, osa1, Iceland_jack

Reviewed By: osa1

Subscribers: ulysses4ever, thomie, carter

GHC Trac Issues: #15055

• Move the ResponseFile module from haddock into base · 866525a1
Chaitanya Koparkar authored and Ben Gamari committed
```GHC and the build tools use "response files" to work around the limit
on the length of command line arguments on Windows. Haddock's
implementation of parsing response files (i.e escaping/unescaping the
appropriate characters) seems complete, is well tested, and also
closely matches the GCC version. This patch moves the relevant bits
into `base` so that it's easier for other libraries to reuse it.

Test Plan: make test TEST=T13896

Reviewers: bgamari, RyanGlScott, 23Skidoo, hvr

Reviewed By: RyanGlScott

Subscribers: thomie, carter

GHC Trac Issues: #13896

• Correctly add unwinding info in manifestSp and makeFixupBlocks · 6132d7c5
niteria authored and Ben Gamari committed
```In `manifestSp` the unwind info was before the relevant instruction, not
after.  I added some notes to establish semantics.  Also removes
redundant annotation in stg_catch_frame.

For `makeFixupBlocks` it looks like we were off by `wORD_SIZE dflags`.
I'm not sure why, but it lines up with `manifestSp`.  In fact it lines
up so well so that I can consolidate the Sp unwind logic in
`maybeAddUnwind`.  I detected the problems with `makeFixupBlocks` by
running T14779b after patching D4559.

Test Plan: added a new test

Reviewers: bgamari, scpmw, simonmar, erikd

Reviewed By: bgamari

Subscribers: thomie, carter

GHC Trac Issues: #14999

• Fix NUMA support on Windows (#15049) · 75361b11
kanetw authored and Ben Gamari committed
```* osNumaNodes now returns the right number of nodes
* thread affinity is now correctly set

TODO: no noticeable performance improvement.

Test Plan:
* validate
* local tests on a NUMA machine

Reviewers: bgamari, erikd, simonmar

Reviewed By: bgamari, simonmar

Subscribers: thomie, carter

• CircleCI: Save test results as JUnit XML · 1ad0277e
Matthew Pickering authored and Ben Gamari committed
```Reviewers: mrkkrp, bgamari

Reviewed By: mrkkrp, bgamari

Subscribers: thomie, carter

GHC Trac Issues: #15093

• Don't shadow "result" in JUnit driver · 107d2cb7
Matthew Pickering authored and Ben Gamari committed
```Reviewers: bgamari

Reviewed By: bgamari

Subscribers: thomie, carter

GHC Trac Issues: #15093

• document the plan for removing Data.Semigroup.Option · 90589a94
Andrew Martin authored and Ben Gamari committed
• Warn against using Data.Monoid.First · e34e30e4
Andrew Martin authored and Ben Gamari committed
`Noting that it will be removed in the future.`
• Compute DW_FORM_block length correctly; also fixes #15068 · 358b5080
Bertram Felgenhauer authored and Ömer Sinan Ağacan committed
```Before this patch, the pprUnwindwExpr function computed the length of
by the following assembly fragment:

.uleb128 1f-.-1
<expression data>
1:

That is, to compute the length, it takes the difference of the label 1
and the address of the .uleb128 directive, and subtracts 1.

In #15068 it was reported that `as` from binutils 4.30 has trouble with
evaluating the `.` part of the expression. However, there is actually a
problem with the expression, if the length of the data ever becomes
larger than 128: In that case, the .uleb128 directive will emit more
than 1 byte, and the computed length will be wrong.

The present patch changes the assembly fragment to use two labels,
which fixes both these problems.

.uleb128 2f-1f
1:
<expression data>
2:

Test Plan: validate

Reviewers: bgamari, osa1

Reviewed By: bgamari

Subscribers: thomie, carter

GHC Trac Issues: #15068

• Add regression tests for #14904 · 5de0be8d
Ryan Scott authored
```Trac #14904 was fixed in commit
faec8d35. Let's add some tests to
ensure that it stays fixed.```
• Test Trac #15114 · 6742ce2d
Simon Peyton Jones authored
• Set arity for absentError · 198db048
David Feuer authored and David Feuer committed
```* The note on how to prevent stable unfoldings from leading to
`case` on `absentError` was wrong. Make it reflect reality.

* Reviewing the above change, Simon noticed that we didn't
set an arity for `absentError`, which definitely has arity 1.
It may not matter much, since `absentError` usually vanishes
quickly, but we might as well set it properly, so now we do.

Reviewers: simonpj, bgamari

Reviewed By: simonpj

Subscribers: thomie, carter