ghc.git
3 hours agousers-guide: Update -Wsafe description for #16689 master
Ben Gamari [Tue, 18 Jun 2019 19:56:52 +0000 (15:56 -0400)] 
users-guide: Update -Wsafe description for #16689

We no longer emit a warning when a safe module is explicitly declared as
such.

3 hours agousers-guide: Fix a variety of broken links and syntax
Ben Gamari [Tue, 18 Jun 2019 19:56:33 +0000 (15:56 -0400)] 
users-guide: Fix a variety of broken links and syntax

3 hours agoghc-pkg needs settings file to un-hardcode target platform
John Ericson [Fri, 31 May 2019 23:33:33 +0000 (19:33 -0400)] 
ghc-pkg needs settings file to un-hardcode target platform

This matches GHC itself getting the target platform from there.

3 hours agoAdd 'stringEncodeArch' and 'stringEncodeOS' to GHC.Platform
John Ericson [Sat, 1 Jun 2019 19:54:56 +0000 (15:54 -0400)] 
Add 'stringEncodeArch' and 'stringEncodeOS' to GHC.Platform

3 hours agoMove 'Platform' to ghc-boot
John Ericson [Fri, 31 May 2019 00:06:24 +0000 (20:06 -0400)] 
Move 'Platform' to ghc-boot

ghc-pkg needs to be aware of platforms so it can figure out which
subdire within the user package db to use. This is admittedly
roundabout, but maybe Cabal could use the same notion of a platform as
GHC to good affect too.

3 hours agoComments and tiny refactor
Simon Peyton Jones [Fri, 7 Jun 2019 12:41:18 +0000 (13:41 +0100)] 
Comments and tiny refactor

* Added Note [Quantified varaibles in partial type signatures]
  in TcRnTypes

* Kill dVarSetElemsWellScoped; it was only called in
  one function, quantifyTyVars.  I inlined it because it
  was only scopedSort . dVarSetElems

* Kill Type.tyCoVarsOfBindersWellScoped, never called.

3 hours agoFix typechecking of partial type signatures
Simon Peyton Jones [Wed, 5 Jun 2019 07:55:17 +0000 (08:55 +0100)] 
Fix typechecking of partial type signatures

Partial type sigs had grown hair.  tcHsParialSigType was
doing lots of unnecessary work, and tcInstSig was cloning it
unnecessarily -- and the result didn't even work: #16728.

This patch cleans it all up, described by TcHsType
  Note [Checking parital type signatures]

I basically just deleted code... but very carefully!

Some refactoring along the way

* Distinguish more explicintly between "anonymous" wildcards "_"
  and "named" wildcards "_a".  I changed the names of a number
  of functions to make this distinction much more apparent.

The patch also revealed that the code in `TcExpr`
that implements the special typing rule for `($)` was wrong.
It called `getRuntimeRep` in a situation where where was no
particular reason to suppose that the thing had kind `TYPE r`.

This caused a crash in typecheck/should_run/T10846.

The fix was easy, and actually simplifies the code in `TcExpr`
quite a bit.  Hooray.

3 hours agoFix two places that failed the substitution invariant
Simon Peyton Jones [Wed, 5 Jun 2019 07:23:03 +0000 (08:23 +0100)] 
Fix two places that failed the substitution invariant

The substition invariant relies on keeping the in-scope
set in sync, and we weren't always doing so, which means that
a DEBUG compiler crashes sometimes with an assertion failure

This patch fixes a couple more cases.  Still not validate
clean (with -DEEBUG) but closer!

3 hours agoFix #1620: ModBreaks.modBreaks_array not initialised
Roland Senn [Wed, 15 May 2019 18:55:16 +0000 (20:55 +0200)] 
Fix #1620: ModBreaks.modBreaks_array not initialised

After a :cd command and after setting some package flags,
GHCi unloads all loaded modules by resetting the list of targets.

This patch deletes eventually defined debugger breakpoints, before GHCi resets the target list.

The common code is factored out into the new function clearAllTargets.

3 hours agoProperly trim IdInfos of DFunIds and PatSyns in TidyPgm
Ömer Sinan Ağacan [Fri, 3 May 2019 08:45:33 +0000 (11:45 +0300)] 
Properly trim IdInfos of DFunIds and PatSyns in TidyPgm

Not doing this right caused #16608. We now properly trim IdInfos of
DFunIds and PatSyns.

Some further refactoring done by SPJ.

Two regression tests T16608_1 and T16608_2 added.

Fixes #16608

17 hours agoFix a Note name in CmmNode
Ömer Sinan Ağacan [Wed, 19 Jun 2019 11:59:43 +0000 (14:59 +0300)] 
Fix a Note name in CmmNode

("Continuation BlockIds" is referenced in CmmProcPoint)

[skip ci]

33 hours agoMake sure mkSplitUniqSupply stores the precomputed mask only.
Andreas Klebinger [Mon, 17 Jun 2019 13:40:14 +0000 (15:40 +0200)] 
Make sure mkSplitUniqSupply stores the precomputed mask only.

mkSplitUniqSupply was lazy on the boxed char.

This caused a bunch of issues:
* The closure captured the boxed Char
* The mask was recomputed on every split of the supply.
* It also caused the allocation of MkSplitSupply to happen in it's own
(allocated) closure. The reason of which I did not further investigate.

We know force the computation of the mask inside mkSplitUniqSupply.
* This way the mask is computed at most once per UniqSupply creation.
* It allows ww to kick in, causing the closure to retain the unboxed
value.

Requesting Uniques in a loop is now faster by about 20%.

I did not check the impact on the overall compiler, but I added a test
to avoid regressions.

33 hours agogitlab-ci: Run alpine builds during nightly job
Ben Gamari [Mon, 17 Jun 2019 14:15:01 +0000 (10:15 -0400)] 
gitlab-ci: Run alpine builds during nightly job

33 hours agotestsuite: Add test for #16832
Ben Gamari [Sun, 16 Jun 2019 13:59:17 +0000 (09:59 -0400)] 
testsuite: Add test for #16832

33 hours agohadrian: Compile UserSettings with -O0
Ben Gamari [Fri, 14 Jun 2019 18:58:15 +0000 (14:58 -0400)] 
hadrian: Compile UserSettings with -O0

This guarantees that the interface file for `UserSettings` doesn't
contain any unfoldings, ensuring that a change in it requires minimal
rebuilds.

33 hours agoSafeHaskell: Don't throw -Wsafe warning if module is declared Safe
Ben Gamari [Fri, 14 Jun 2019 03:51:24 +0000 (23:51 -0400)] 
SafeHaskell: Don't throw -Wsafe warning if module is declared Safe

Fixes #16689.

33 hours agotestsuite: Add testcase for #16689
Ben Gamari [Fri, 14 Jun 2019 03:47:31 +0000 (23:47 -0400)] 
testsuite: Add testcase for #16689

33 hours agoAdd more newtype-derived instances to Data.Ord.Down
Fumiaki Kinoshita [Sun, 5 May 2019 04:26:36 +0000 (13:26 +0900)] 
Add more newtype-derived instances to Data.Ord.Down

Metric Increase:
    haddock.base

33 hours agoData.Ord: give a field name getDown to Down
Fumiaki Kinoshita [Sun, 5 May 2019 04:25:15 +0000 (13:25 +0900)] 
Data.Ord: give a field name getDown to Down

2 days agogitlab-ci: Run nofib on binary distributions wip/run-nofib
Ben Gamari [Thu, 21 Mar 2019 05:42:27 +0000 (01:42 -0400)] 
gitlab-ci: Run nofib on binary distributions

Updates docker images to ensure that the `time` utility is available.

3 days agoAdd link to mfix.github.io/ghc in HACKING.md wip/gc/base wip/gc/factor-out-bitmap-walking wip/gc/printer-improvements wip/gc/unglobalize-gc-state
Siddharth Bhat [Sun, 16 Jun 2019 12:36:24 +0000 (14:36 +0200)] 
Add link to mfix.github.io/ghc in HACKING.md

3 days agomake: Clean includes/settings file
Ben Gamari [Fri, 14 Jun 2019 21:23:20 +0000 (17:23 -0400)] 
make: Clean includes/settings file

Now since this is generated by the build system we should ensure that it
is properly cleaned.

[skip ci]

3 days agoUse TupleSections in CmmParse.y, simplify a few exprs
Ömer Sinan Ağacan [Sun, 16 Jun 2019 07:09:49 +0000 (10:09 +0300)] 
Use TupleSections in CmmParse.y, simplify a few exprs

3 days agogitlab-ci: Don't allow failure of deb9-dwarf job
Ben Gamari [Fri, 14 Jun 2019 02:53:37 +0000 (22:53 -0400)] 
gitlab-ci: Don't allow failure of deb9-dwarf job

This #16741 out of the way this should now pass.

3 days agotestsuite: Really fix #16741
Ben Gamari [Fri, 14 Jun 2019 02:51:53 +0000 (22:51 -0400)] 
testsuite: Really fix #16741

The previous fix, !1095, didn't work as `--show-iface` ignores
`-dsuppress-ticks`. Rework the test instead.

3 days agofix runghc's GHC detection logic to cover the "in-tree Hadrian build" scenario
Alp Mestanogullari [Fri, 14 Jun 2019 19:28:31 +0000 (21:28 +0200)] 
fix runghc's GHC detection logic to cover the "in-tree Hadrian build" scenario

Before this patch, runghc would only run the GHC detection logic on Windows and
assume that it was invoked through a wrapper script on all other platforms.
This patch lifts this limitation and makes that logic work for the scenario
where someone is calling the runghc executable directly, without passing an
explicit path to GHC.

3 days agogitlab-ci: Build alpine release bindists
Ben Gamari [Tue, 11 Jun 2019 01:00:57 +0000 (21:00 -0400)] 
gitlab-ci: Build alpine release bindists

3 days agotestsuite: Ensure that ffi005 output order is predictable
Ben Gamari [Tue, 11 Jun 2019 17:09:55 +0000 (13:09 -0400)] 
testsuite: Ensure that ffi005 output order is predictable

The libc output buffer wasn't being flushed, making the order
system-depedent.

3 days agotestsuite: Flush conc059's printf buffer
Ben Gamari [Tue, 11 Jun 2019 17:04:05 +0000 (13:04 -0400)] 
testsuite: Flush conc059's printf buffer

Otherwise it the order out the Haskell and C output will be
system-dependent.

3 days agotestsuite: Ensure T5423 flushes C output buffer
Ben Gamari [Tue, 11 Jun 2019 16:48:32 +0000 (12:48 -0400)] 
testsuite: Ensure T5423 flushes C output buffer

Previously T5423 would fail to flush the printf output buffer.
Consequently it was platform-dependent whether the C or Haskell print
output would be emitted first.

3 days agotestsuite: Fix T8602 on musl
Ben Gamari [Tue, 11 Jun 2019 16:45:24 +0000 (12:45 -0400)] 
testsuite: Fix T8602 on musl

Musl wants hash-bangs on all executables.

3 days agobase/Event/Poll: Drop POLLRDHUP enum item
Ben Gamari [Tue, 11 Jun 2019 04:51:53 +0000 (00:51 -0400)] 
base/Event/Poll: Drop POLLRDHUP enum item

Previously the Event enumeration produced by hsc2hs would sometimes
include a currently-unused POLLRDHUP item. This unused binding would
result in a build failure. Drop it.

4 days agoRemove dead code
Krzysztof Gogolewski [Wed, 26 Dec 2018 11:28:43 +0000 (12:28 +0100)] 
Remove dead code

4 days agoSynchronize ClsInst.doTyConApp with TcTypeable validity checks (#15862)
Ryan Scott [Fri, 14 Jun 2019 15:07:46 +0000 (11:07 -0400)] 
Synchronize ClsInst.doTyConApp with TcTypeable validity checks (#15862)

Issue #15862 demonstrated examples of type constructors on which
`TcTypeable.tyConIsTypeable` would return `False`, but the `Typeable`
constraint solver in `ClsInst` (in particular, `doTyConApp`) would
try to generate `Typeable` evidence for anyway, resulting in
disaster. This incongruity was caused by the fact that `doTyConApp`
was using a weaker validity check than `tyConIsTypeable` to determine
if a type constructor warrants `Typeable` evidence or not. The
solution, perhaps unsurprisingly, is to use `tyConIsTypeable` in
`doTyConApp` instead.

To avoid import cycles between `ClsInst` and `TcTypeable`, I factored
out `tyConIsTypeable` into its own module, `TcTypeableValidity`.

Fixes #15862.

4 days agotestsuite: Add assertions that way lists are in fact lists
Ben Gamari [Fri, 14 Jun 2019 00:21:03 +0000 (20:21 -0400)] 
testsuite: Add assertions that way lists are in fact lists

Previously there were a few cases where operations like `omit_ways`
were incorrectly passed a single way (e.g. `omit_ways('threaded2')`).
This won't work as the author expected.

4 days agoFix typo in error message
Aiken Cairncross [Fri, 14 Jun 2019 13:21:37 +0000 (14:21 +0100)] 
Fix typo in error message

4 days agotestsuite: Skip hDuplicateTo001 in concurrent ways
Ben Gamari [Fri, 14 Jun 2019 00:20:09 +0000 (20:20 -0400)] 
testsuite: Skip hDuplicateTo001 in concurrent ways

As noted in #16819, this operation is racy under concurrent execution.

4 days agotestsuite: Introduce concurrent_ways set
Ben Gamari [Fri, 14 Jun 2019 00:17:20 +0000 (20:17 -0400)] 
testsuite: Introduce concurrent_ways set

Previously we just tested for the threaded2 when determining whether to
skip tests which are fragile under concurrent execution. However, this
isn't the only way which is concurrent.

4 days agoDisable optimisation when building Cabal in development flavours
Ben Gamari [Thu, 13 Jun 2019 20:24:10 +0000 (16:24 -0400)] 
Disable optimisation when building Cabal in development flavours

This updates the make and Hadrian build flavours targetting developers
to disable optimisation when building the Cabal library. Cabal tends to
tickle some very bad compiler performance cases (e.g. #16577) so
disabling optimisation here makes a sizeable impact on overall build
time.

See #16817.

4 days agoDisable optimisation when building Cabal lib for stage0
Ben Gamari [Thu, 13 Jun 2019 20:22:31 +0000 (16:22 -0400)] 
Disable optimisation when building Cabal lib for stage0

This disables optimisation when building Cabal for Hadrian and
stage0 `ghc-cabal`. Cabal is performance critical in neither case nor
will any performance difference here be visible to the end-user.

See #16817.

4 days agoBump unix submodule
Ben Gamari [Fri, 14 Jun 2019 20:04:13 +0000 (16:04 -0400)] 
Bump unix submodule

Skips `executeFile001` test in `threaded2` way. Fixes #16814.

5 days agoRemove duplicates from 'ghc --info' output
Alp Mestanogullari [Fri, 14 Jun 2019 09:57:38 +0000 (11:57 +0200)] 
Remove duplicates from 'ghc --info' output

5 days agogitlab-ci: Lint the linters
Ben Gamari [Wed, 12 Jun 2019 15:11:31 +0000 (11:11 -0400)] 
gitlab-ci: Lint the linters

5 days agolint: Only apply --interactive lint to testsuite .T files
Ben Gamari [Wed, 12 Jun 2019 14:54:48 +0000 (10:54 -0400)] 
lint: Only apply --interactive lint to testsuite .T files

5 days agogitlab-ci: Lint testsuite for framework failures
Ben Gamari [Wed, 12 Jun 2019 13:37:13 +0000 (09:37 -0400)] 
gitlab-ci: Lint testsuite for framework failures

This introduces a new lint job checking for framework failures and
listing broken tests.

5 days agoPrelRules: Don't break let/app invariant in shiftRule
Ben Gamari [Mon, 10 Jun 2019 13:25:57 +0000 (09:25 -0400)] 
PrelRules: Don't break let/app invariant in shiftRule

Previously shiftRule would rewrite as invalid shift like
```
let x = I# (uncheckedIShiftL# n 80)
in ...
```
to
```
let x = I# (error "invalid shift")
in ...
```
However, this breaks the let/app invariant as `error` is not
okay-for-speculation. There isn't an easy way to avoid this so let's not
try. Instead we just take advantage of the undefined nature of invalid
shifts and return zero.

Fixes #16742.

5 days agoImplement the -XUnliftedNewtypes extension.
Andrew Martin [Sun, 12 May 2019 13:23:25 +0000 (09:23 -0400)] 
Implement the -XUnliftedNewtypes extension.

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>
6 days agoAdd Outputable instances for Float, Double.
Andreas Klebinger [Thu, 13 Jun 2019 15:07:45 +0000 (17:07 +0200)] 
Add Outputable instances for Float, Double.

6 days agoHadrian: remove superfluous dependencies in Rules.Compile
Alp Mestanogullari [Tue, 11 Jun 2019 12:27:17 +0000 (14:27 +0200)] 
Hadrian: remove superfluous dependencies in Rules.Compile

Each package's object files were 'need'ing the library files of all transitive
dependencies of the current package, whichi is pointless since the said
libraries are not needed until we link those object files together.

This fixes #16759.

6 days agoRemove unused Unique field from StgFCallOp
Ömer Sinan Ağacan [Mon, 10 Jun 2019 09:40:37 +0000 (12:40 +0300)] 
Remove unused Unique field from StgFCallOp

Fixes #16696

6 days agoMaintain separate flags for C++ compiler invocations
Ben Gamari [Mon, 3 Jun 2019 22:51:17 +0000 (18:51 -0400)] 
Maintain separate flags for C++ compiler invocations

Previously we would pass flags intended for the C compiler to the C++
compiler (see #16738). This would cause, for instance, `-std=gnu99` to
be passed to the C++ compiler, causing spurious test failures. Fix this
by maintaining a separate set of flags for C++ compilation invocations.

6 days agogitlab-ci: Disable validate-x86_64-linux-deb9 job to reduce load
Ben Gamari [Wed, 12 Jun 2019 05:36:33 +0000 (01:36 -0400)] 
gitlab-ci: Disable validate-x86_64-linux-deb9 job to reduce load

Enable artifacts on to ensure we have bindist coverage.

6 days agogitlab-ci: Disable deb9-llvm job, introduce nightly LLVM job
Ben Gamari [Wed, 12 Jun 2019 05:14:32 +0000 (01:14 -0400)] 
gitlab-ci: Disable deb9-llvm job, introduce nightly LLVM job

This should help alleviate queue times as the LLVM job is one of the
longest that we have.

6 days agotestsuite: A more portable solution to #9399
Ben Gamari [Tue, 11 Jun 2019 13:54:55 +0000 (09:54 -0400)] 
testsuite: A more portable solution to #9399

Previously we used an awful hybrid batch script/Bourne shell script to
allow this test to run both on Windows and Linux (fixing #9399).
However, this breaks on some libc implementations (e.g. musl). Fix this.

Fixes #16798.

6 days agoClean up .circleci
Ben Gamari [Tue, 11 Jun 2019 03:47:47 +0000 (23:47 -0400)] 
Clean up .circleci

Move prepare-system.sh to .gitlab and remove everything else.

6 days agogitlab-ci: Don't build PDF user's guide on AArch64
Ben Gamari [Tue, 11 Jun 2019 23:48:56 +0000 (19:48 -0400)] 
gitlab-ci: Don't build PDF user's guide on AArch64

For reasons I don't understand sphinx seems to fail to produce a .idx
file for makeindex.

6 days agousers-guide: Fix a few markup issues
Ben Gamari [Tue, 11 Jun 2019 02:51:58 +0000 (22:51 -0400)] 
users-guide: Fix a few markup issues

Strangely these were only causing the build to fail in the aarch64-linux
job, despite Sphinx throwing errors in all jobs I checked.

Also changes some `#ifdef`s to `#if defined` to satisfy the linter.

6 days agoHadrian: Do not allow the Linux jobs to fail anymore
Alp Mestanogullari [Mon, 10 Jun 2019 18:55:12 +0000 (20:55 +0200)] 
Hadrian: Do not allow the Linux jobs to fail anymore

MR !1151 makes the Hadrian/Linux job pass by fixing the last two test failures,
so we can now be stricter and not allow those jobs to fail anymore, easily
letting us see when patches introduce test failures.

6 days agoHadrian: Track RTS library symlink targets
David Eichmann [Tue, 4 Jun 2019 18:01:19 +0000 (19:01 +0100)] 
Hadrian: Track RTS library symlink targets

This requires creating RTS library symlinks when registering, outside
of the rule for the registered library file.

6 days agoPrelRules: Ensure that string unpack/append rule fires with source notes
Ben Gamari [Tue, 4 Jun 2019 04:42:10 +0000 (00:42 -0400)] 
PrelRules: Ensure that string unpack/append rule fires with source notes

Previously the presence of source notes could hide nested applications
of `unpackFoldrCString#` from our constant folding logic. For instance,
consider the expression:

```haskell
unpackFoldrCString# "foo" c (unpackFoldrCString# "baz" c n)
```

Specifically, ticks appearing in two places can defeat the rule:

  a. Surrounding the inner application of `unpackFoldrCString#`
  b. Surrounding the fold function, `c`

The latter caused the `str_rules` testcase to fail when `base` was built
with `-g3`.

Fixes #16740.

6 days agoFix #16525: ObjectCode freed wrongly because of lack of info header check
Phuong Trinh [Thu, 25 Apr 2019 17:44:02 +0000 (18:44 +0100)] 
Fix #16525: ObjectCode freed wrongly because of lack of info header check

`checkUnload` currently doesn't check the info header of static objects.
Thus, it may free an `ObjectCode` struct wrongly even if there's still a
live static object whose info header lies in a mapped section of that
`ObjectCode`. This fixes the issue by adding an appropriate check.

6 days agoAdd a few missing llvm-targets
Ben Gamari [Wed, 12 Jun 2019 18:24:23 +0000 (14:24 -0400)] 
Add a few missing llvm-targets

This should finally fix #14261.

[skip ci]

7 days agogitlab-ci: Bump Docker image
Ben Gamari [Wed, 12 Jun 2019 21:52:35 +0000 (17:52 -0400)] 
gitlab-ci: Bump Docker image

Fixes linters.

7 days agotestsuite: Don't run tests requiring TH in profasm way when GhcDynamic
Ben Gamari [Tue, 11 Jun 2019 19:56:07 +0000 (15:56 -0400)] 
testsuite: Don't run tests requiring TH in profasm way when GhcDynamic

Since we can't load profiled objects when GhcDynamic==YES. Affects:

* T16737
* T16384
* T16718
* T16619
* T16190

7 days agotestsuite: Unbreak galois_raytrace on i386
Ben Gamari [Tue, 11 Jun 2019 17:24:35 +0000 (13:24 -0400)] 
testsuite: Unbreak galois_raytrace on i386

galois_raytrace was previously broken on i386 due to use of x87
arithmethic on that platform. However,
42504f4a575395a35eec5c3fd7c9ef6e2b54e68e removes x87 support; this
resulted in an unexpected pass. Unmark this test as broken.

7 days agotestsuite: Skip cgrun078 in ghci way
Ben Gamari [Tue, 11 Jun 2019 05:09:17 +0000 (01:09 -0400)] 
testsuite: Skip cgrun078 in ghci way

This test requires FFI usage.

7 days agoprocess: Bump submodule
Ben Gamari [Mon, 10 Jun 2019 13:52:08 +0000 (09:52 -0400)] 
process: Bump submodule

 * Skip process005 in ghci way
 * Mark process002 as fragile in threaded2

7 days agoBump unix submodule
Ben Gamari [Sat, 6 Apr 2019 18:45:52 +0000 (14:45 -0400)] 
Bump unix submodule

Marks posix002 as fragile in threaded2 way due to #16550.

7 days agoFix uses of #ifdef/#ifndef
Ben Gamari [Sun, 9 Jun 2019 13:50:41 +0000 (09:50 -0400)] 
Fix uses of #ifdef/#ifndef

The linter now enforces our preference for `#if defined()` and
`#if !defined()`.

7 days agogitlab-ci: Fetch submodules before running submodule linter
Ben Gamari [Sun, 9 Jun 2019 16:31:32 +0000 (12:31 -0400)] 
gitlab-ci: Fetch submodules before running submodule linter

7 days agolinters/check-makefiles: Limit lint to Makefiles
Ben Gamari [Sun, 9 Jun 2019 14:36:58 +0000 (10:36 -0400)] 
linters/check-makefiles: Limit lint to Makefiles

Previously we would apply this rule, which is only intended for
testsuite Makefiles, to all files. This lead to a number of
false-positives in all.T files.

7 days agotestsuite: Note intentional typo in T7130
Ben Gamari [Tue, 11 Jun 2019 05:11:58 +0000 (01:11 -0400)] 
testsuite: Note intentional typo in T7130

I earlier accidentally corrected it breaking the test.

7 days agotestsuite: Mark T16737 as broken in ghci way due to #16541
Ben Gamari [Sun, 9 Jun 2019 13:32:55 +0000 (09:32 -0400)] 
testsuite: Mark T16737 as broken in ghci way due to #16541

7 days agotestsuite: Mark T16449_2 as broken due to #16742
Ben Gamari [Tue, 4 Jun 2019 04:56:47 +0000 (00:56 -0400)] 
testsuite: Mark T16449_2 as broken due to #16742

7 days agotestsuite: Skip T493 in ghci way.
Ben Gamari [Tue, 4 Jun 2019 04:53:09 +0000 (00:53 -0400)] 
testsuite: Skip T493 in ghci way.

T493 tests #493, which is an FFI test. FFI tests should be skipped
in ghci way.

7 days agotestsuite: Omit profasm way for cc017
Ben Gamari [Tue, 4 Jun 2019 00:59:13 +0000 (20:59 -0400)] 
testsuite: Omit profasm way for cc017

cc017 requires TH but we can't load dynamic profiled objects.

7 days agotestsuite: Mark threadstatus-T9333 as fragile in ghci way
Ben Gamari [Mon, 8 Apr 2019 14:35:51 +0000 (10:35 -0400)] 
testsuite: Mark threadstatus-T9333 as fragile in ghci way

As noted in #16555.

7 days agotestsuite: Fix omit_ways usage
Ben Gamari [Sun, 7 Apr 2019 01:50:24 +0000 (21:50 -0400)] 
testsuite: Fix omit_ways usage

omit_ways expects a list but this was broken in several cases.

7 days agotestsuite: Fix fragile_for test modifier
Ben Gamari [Sat, 6 Apr 2019 13:37:52 +0000 (09:37 -0400)] 
testsuite: Fix fragile_for test modifier

7 days agotestsuite: Skip T7919 in ghci way
Ben Gamari [Sat, 6 Apr 2019 16:09:35 +0000 (12:09 -0400)] 
testsuite: Skip T7919 in ghci way

It times out pretty reliably. It's not clear that much is gained by
running this test in the ghci way anyways.

7 days agotestsuite: Mark T2783 as fragile in threaded1
Ben Gamari [Sat, 6 Apr 2019 02:22:43 +0000 (22:22 -0400)] 
testsuite: Mark T2783 as fragile in threaded1

It was previously marked as broken but it passes non-deterministically.
See #2783.

7 days agotestsuite: Mark Overflow as broken in hpc way
Ben Gamari [Fri, 5 Apr 2019 11:47:31 +0000 (07:47 -0400)] 
testsuite: Mark Overflow as broken in hpc way

As noted in #16543.

7 days agotestsuite: Omit tcrun022 in hpc way
Ben Gamari [Fri, 5 Apr 2019 03:01:46 +0000 (23:01 -0400)] 
testsuite: Omit tcrun022 in hpc way

As noted in #16542, the expected rule doesn't fire. However, this
doesn't seem terribly surpring given the circumstances.

7 days agotestsuite: Mark T16180 as broken in ghci and ext-interp ways
Ben Gamari [Fri, 5 Apr 2019 02:55:00 +0000 (22:55 -0400)] 
testsuite: Mark T16180 as broken in ghci and ext-interp ways

As noted in #16541.

7 days agotestsuite: Mark T14761c as broken in hpc, profasm, and optasm ways
Ben Gamari [Fri, 5 Apr 2019 02:50:00 +0000 (22:50 -0400)] 
testsuite: Mark T14761c as broken in hpc, profasm, and optasm ways

As noted in #16540.

7 days agotestsuite: Mark T13910 as broken in optasm
Ben Gamari [Fri, 5 Apr 2019 02:38:06 +0000 (22:38 -0400)] 
testsuite: Mark T13910 as broken in optasm

Due to #16537.

7 days agotestsuite: Mark T13167 as fragile in threaded2
Ben Gamari [Fri, 5 Apr 2019 02:25:23 +0000 (22:25 -0400)] 
testsuite: Mark T13167 as fragile in threaded2

As noted in #16536.

7 days agotestsuite: Mark hWaitForInput-accurate-stdin as broken in threaded ways
Ben Gamari [Fri, 5 Apr 2019 01:57:05 +0000 (21:57 -0400)] 
testsuite: Mark hWaitForInput-accurate-stdin as broken in threaded ways

As noted in #16535.

7 days agogitlab-ci: Test using slowtest in deb9-debug job
Ben Gamari [Thu, 4 Apr 2019 16:12:14 +0000 (12:12 -0400)] 
gitlab-ci: Test using slowtest in deb9-debug job

7 days agoBump terminfo to 0.4.1.4
Ben Gamari [Wed, 5 Jun 2019 00:31:38 +0000 (20:31 -0400)] 
Bump terminfo to 0.4.1.4

(cherry picked from commit 1134488b4c9cef904ea82f22f1978646eea612df)

7 days agoBump time submodule to 1.9.3
Ben Gamari [Wed, 5 Jun 2019 00:34:27 +0000 (20:34 -0400)] 
Bump time submodule to 1.9.3

(cherry picked from commit fdb07571036b1498800589d45b61781e6acdd368)

7 days agoBump Cabal submodule
Ben Gamari [Wed, 5 Jun 2019 00:37:31 +0000 (20:37 -0400)] 
Bump Cabal submodule

(cherry picked from commit ff438786613f07df9b2d43eaeac49b13815d849d)

Metric Increase:
    haddock.Cabal

7 days agoBump binary to 0.8.7.0
Ben Gamari [Fri, 7 Jun 2019 21:34:16 +0000 (17:34 -0400)] 
Bump binary to 0.8.7.0

(cherry picked from commit 983ada70a013c7642a751f6e41587ff95b57d0f8)

7 days agoUse DeriveFunctor throughout the codebase (#15654)
Krzysztof Gogolewski [Sat, 8 Jun 2019 18:48:07 +0000 (20:48 +0200)] 
Use DeriveFunctor throughout the codebase (#15654)

7 days agorts/linker: Only mprotect GOT after it is filled
Ben Gamari [Sat, 8 Jun 2019 17:28:19 +0000 (13:28 -0400)] 
rts/linker: Only mprotect GOT after it is filled

This fixes a regression, introduced by 67c422ca, where we mprotect'd the
global offset table (GOT) region to PROT_READ before we had finished
filling it, resulting in a linker crash.

Fixes #16779.

7 days agorts/linker: Make elf_got.c a bit more legible
Ben Gamari [Sat, 8 Jun 2019 17:28:08 +0000 (13:28 -0400)] 
rts/linker: Make elf_got.c a bit more legible

7 days agotestsuite: Add haddock perf test output to gitignore
Ben Gamari [Mon, 10 Jun 2019 23:00:57 +0000 (19:00 -0400)] 
testsuite: Add haddock perf test output to gitignore

[skip ci]

7 days agollvm-targets: Add armv7l-unknown-linux-gnueabi
Ben Gamari [Tue, 11 Jun 2019 01:59:19 +0000 (21:59 -0400)] 
llvm-targets: Add armv7l-unknown-linux-gnueabi

Fixes #15208.

[skip ci]

8 days agotestsuite/mk/boilerplate.mk: rename 'ghc-config-mk' to 'ghc_config_mk'
Alp Mestanogullari [Mon, 10 Jun 2019 15:38:34 +0000 (17:38 +0200)] 
testsuite/mk/boilerplate.mk: rename 'ghc-config-mk' to 'ghc_config_mk'

Make/shell variable names which contain dashes can cause problems under
some conditions. The 'ghc-config-mk' variable from testsuite/mk/boilerplate.mk
that I made overridable (by Hadrian) in ba0aed2e was working as expected when
our Hadrian/Linux job was based off the deb8 Docker image, but broke when
I switched the job to use our deb9-based image, in 3d97bad6. The exact
circumstances/tool versions that trigger this problem are unknown, but
changing the variable's name to 'ghc_config_mk' lets us work around the issue.

This fixes the annth_compunits and annth_make test failures that showed up
when we switched the Hadrian/Linux job to use the deb9 environment.

8 days agoFix an error message in CheckUnload.c:searchHeapBlocks
Ömer Sinan Ağacan [Mon, 10 Jun 2019 08:36:49 +0000 (11:36 +0300)] 
Fix an error message in CheckUnload.c:searchHeapBlocks