9 months agotestsuite: Use makefile_test for T16212
Ben Gamari [Sat, 2 Feb 2019 19:35:29 +0000 (14:35 -0500)] 
testsuite: Use makefile_test for T16212

9 months agotestsuite: Skip T15897 in unregisterised way
Ben Gamari [Sat, 2 Feb 2019 17:52:21 +0000 (12:52 -0500)] 
testsuite: Skip T15897 in unregisterised way

As noted in #16227 this test routinely times out when run in the
unregisterised way.

See also #15467.

9 months agoReport multiple errors
Vladislav Zavialov [Fri, 1 Feb 2019 17:39:57 +0000 (20:39 +0300)] 
Report multiple errors

9 months agoAdd werror function to Flavour.hs
Matthew Pickering [Thu, 31 Jan 2019 11:01:04 +0000 (11:01 +0000)] 
Add werror function to Flavour.hs

This function makes it easy to turn on `-Werror` in the correct manner
to mimic how CI turns on -Werror.

9 months agoFix missing space in ppr_cmd for HsCmdArrForm
Vladislav Zavialov [Sat, 2 Feb 2019 14:30:05 +0000 (17:30 +0300)] 
Fix missing space in ppr_cmd for HsCmdArrForm

9 months agodocs: change meta-variable of -interactive-print from expr to name
Zejun Wu [Thu, 31 Jan 2019 01:35:50 +0000 (17:35 -0800)] 
docs: change meta-variable of -interactive-print from expr to name

`-interactive-print` doesn't accept **expr** as `-e` or `:def` does. It must
be a qualified or unqualified **name** in scope.

9 months agoTurn on -Wno-unused-imports in make build system
Matthew Pickering [Fri, 1 Feb 2019 19:10:07 +0000 (19:10 +0000)] 
Turn on -Wno-unused-imports in make build system

This mirrors Hadrian and it good enough to get us unstuck.

9 months agoBump hsc2hs for removed unused match
Sebastian Graf [Fri, 1 Feb 2019 11:43:27 +0000 (12:43 +0100)] 
Bump hsc2hs for removed unused match

9 months agoRemove unused imports
Sebastian Graf [Wed, 30 Jan 2019 12:59:10 +0000 (13:59 +0100)] 
Remove unused imports

9 months agoTurn on -Werror when validating
Matthew Pickering [Wed, 30 Jan 2019 13:29:26 +0000 (08:29 -0500)] 
Turn on -Werror when validating

9 months agoPolished Note [Exceptions and strictness]
Sebastian Graf [Fri, 1 Feb 2019 12:25:42 +0000 (13:25 +0100)] 
Polished Note [Exceptions and strictness]

[ci skip]

9 months agoUpdate with a pointer to `Packages`
Sebastian Graf [Fri, 1 Feb 2019 09:48:41 +0000 (04:48 -0500)] 
Update with a pointer to `Packages`

[skip ci]

9 months agoReject oversaturated VKAs in type family equations
Ryan Scott [Sat, 2 Feb 2019 00:10:55 +0000 (19:10 -0500)] 
Reject oversaturated VKAs in type family equations

9 months agoRemove ExnStr and ThrowsExn business
Sebastian Graf [Fri, 1 Feb 2019 11:46:32 +0000 (06:46 -0500)] 
Remove ExnStr and ThrowsExn business

9 months agoFix #16219: TemplateHaskell causes indefinite package build error
Edward Z. Yang [Fri, 1 Feb 2019 01:00:50 +0000 (20:00 -0500)] 
Fix #16219: TemplateHaskell causes indefinite package build error

It should work to write an indefinite package using TemplateHaskell,
so long as all of the actual TH code lives outside of the package.
However, cleverness we had to build TH code even when building
with -fno-code meant that we attempted to build object code for
modules in an indefinite package, even when the signatures were
not instantiated.  This patch disables said logic in the event
that an indefinite package is being typechecked.

Signed-off-by: Edward Z. Yang <>
Test Plan: validate

Reviewers: simonpj, bgamari

Reviewed By: bgamari

Subscribers: rwbarton, carter

GHC Trac Issues: #16219

Differential Revision:

9 months agoRevert "Performance tests: recover a baseline from ancestor commits and CI results."
Ben Gamari [Fri, 1 Feb 2019 00:47:53 +0000 (19:47 -0500)] 
Revert "Performance tests: recover a baseline from ancestor commits and CI results."

Unfortunately this has broken all future commits due to spurious(?)
performance changes which I have been unable to work around.

This reverts commit cc2261d42f6a954d88e355aaad41f001f65c95da.

9 months agoHadrian: Fix outdated link.
Andrey Mokhov [Sun, 27 Jan 2019 22:42:23 +0000 (22:42 +0000)] 
Hadrian: Fix outdated link.

9 months agoHadrian: Update instructions for building on Windows
Andrey Mokhov [Sun, 27 Jan 2019 22:34:30 +0000 (22:34 +0000)] 
Hadrian: Update instructions for building on Windows

The `hadrian/doc/` file has falled out of date. In particular
it still points to the old GitHub repository, and uses incorrect path
to GHC. This patch fixes it.

9 months agoUpdate terminfo submodule
Herbert Valerio Riedel [Sun, 27 Jan 2019 21:35:35 +0000 (22:35 +0100)] 
Update terminfo submodule

9 months agoUpdate stm submodule
Herbert Valerio Riedel [Sun, 27 Jan 2019 21:35:35 +0000 (22:35 +0100)] 
Update stm submodule

9 months agoUpdate process submodule
Herbert Valerio Riedel [Sun, 27 Jan 2019 21:35:35 +0000 (22:35 +0100)] 
Update process submodule

9 months agoUpdate parsec submodule
Herbert Valerio Riedel [Sun, 27 Jan 2019 21:35:35 +0000 (22:35 +0100)] 
Update parsec submodule

9 months agoUpdate haskeline submodule
Herbert Valerio Riedel [Sun, 27 Jan 2019 21:35:36 +0000 (22:35 +0100)] 
Update haskeline submodule

9 months agoUpdate deepseq submodule
Herbert Valerio Riedel [Sun, 27 Jan 2019 21:35:36 +0000 (22:35 +0100)] 
Update deepseq submodule

9 months agoUpdate unix submodule
Herbert Valerio Riedel [Sun, 27 Jan 2019 21:35:35 +0000 (22:35 +0100)] 
Update unix submodule

9 months agoUpdate text submodule
Herbert Valerio Riedel [Sun, 27 Jan 2019 21:35:35 +0000 (22:35 +0100)] 
Update text submodule

9 months agoUpdate hsc2hs submodule
Herbert Valerio Riedel [Sun, 27 Jan 2019 14:33:22 +0000 (15:33 +0100)] 
Update hsc2hs submodule

9 months agoPPC NCG: Promote integers to word size in C calls
Peter Trommler [Wed, 23 Jan 2019 22:13:57 +0000 (23:13 +0100)] 
PPC NCG: Promote integers to word size in C calls

Fixes #16222

9 months agoSmall optimizations to BlockLayout. [Thu, 24 Jan 2019 23:08:21 +0000 (00:08 +0100)] 
Small optimizations to BlockLayout.

* Remove `takeL/R 1` occurences by lastOL/headOL.

* Make BlockChain a OrdList newtype by removing the set of blocks.

Initially BlockChain contained both, a set for membership test
and a ordered list of blocks. The set is not used for any
performance sensitive lookups so we get rid of it.

9 months agoReplace BlockSequence with OrdList in BlockLayout.hs [Thu, 24 Jan 2019 22:02:51 +0000 (23:02 +0100)] 
Replace BlockSequence with OrdList in BlockLayout.hs

OrdList does the same thing and more so there is no reason
to have both.

9 months agotestsuite: Add test for #14828
Ben Gamari [Tue, 22 Jan 2019 21:58:04 +0000 (16:58 -0500)] 
testsuite: Add test for #14828

9 months agoIntroduce GhciMonad and generalize types of functions in GHCi.UI
Zejun Wu [Tue, 22 Jan 2019 00:28:01 +0000 (16:28 -0800)] 
Introduce GhciMonad and generalize types of functions in GHCi.UI

Introduce `GhciMonad`, which is bascially `GhcMonad` + `HasGhciState`.
Generalize the commands and help functions defined in `GHCi.UI` so they
can be used as both `GHCi a` and `InputT GHCi a`.

The long term plan is to move reusable bits to ghci library and make it
easier to build a customized interactive ui which carries customized state
and provides customized commands.

Most changes are trivial in this diff by relaxing the type constraint or
add/remove lift as necessary. The non-trivial changes are:

* Change `HasGhciState` to `GhciMonad` and expose it.
* Implementation of `reifyGHCi`.

Test Plan:

Reviewers: simonmar, hvr, bgamari

Reviewed By: simonmar

Subscribers: rwbarton, carter

Differential Revision:

9 months agoAdd O2 to hsCompiler on stage0 for most hadrian flavours. [Fri, 25 Jan 2019 00:27:05 +0000 (01:27 +0100)] 
Add O2 to hsCompiler on stage0 for most hadrian flavours.

9 months agoUse O2 on stage1 for faster overall build times with make. [Thu, 24 Jan 2019 19:20:39 +0000 (20:20 +0100)] 
Use O2 on stage1 for faster overall build times with make.

Build times when using the quick flavour:

stage1 opt | time (wall) | time (user)
     -O1   |        13m  |        53m
     -O2   |        13m  |        51m
So even when we compile stage2 with -O0 (quick)
using -O2 on stage1 is already faster.

The difference is even bigger when freezing
stage1 and doing multiple builds or compiling
stage2 with optimizations.

9 months agoAdd -fdefer-diagnostics to defer and group diagnostic messages in make-mode
Zejun Wu [Fri, 28 Dec 2018 08:10:22 +0000 (00:10 -0800)] 
Add -fdefer-diagnostics to defer and group diagnostic messages in make-mode

When loading many modules in parallel there can a lot of warnings and
errors get mixed up with regular output. When the compilation fails,
the relevant error message can be thousands of lines backward and is
hard to find. When the compilation successes, warning message is likely
to be ignored as it is not seen. We can address this by deferring the
warning and error message after the compilation. We also put errors
after warnings so it is more visible.

This idea was originally proposed by Bartosz Nitka in

9 months agohWaitForInput-accurate-stdin test
Ben Gamari [Thu, 31 Jan 2019 04:36:17 +0000 (23:36 -0500)] 
hWaitForInput-accurate-stdin test

9 months agoOptimize pprASCII
Sylvain Henry [Thu, 17 Jan 2019 23:01:45 +0000 (00:01 +0100)] 
Optimize pprASCII

* Use `ByteString.foldr` instead of `(List.foldr . BS.unpack)`
* Avoid calling `chr` and its test that checks for invalid Unicode
codepoints: we stay in the ASCII range so we know we're ok
* Avoid calling `isPrint` (unsafe FFI call): we can check the ASCII
printable range directly
* Use bit operations (`unsafeShiftR`, `.&.`) instead of `div` and `mod`

9 months agoUse ByteString to represent Cmm string literals (#16198)
Sylvain Henry [Thu, 17 Jan 2019 12:34:32 +0000 (13:34 +0100)] 
Use ByteString to represent Cmm string literals (#16198)

Also used ByteString in some other relevant places

9 months agoFix syntax in CODEOWNERS file
Matthew Pickering [Wed, 30 Jan 2019 12:28:08 +0000 (07:28 -0500)] 
Fix syntax in CODEOWNERS file

[skip ci]

9 months agoDon't use X86_64_ELF_NONPIC_HACK for +RTS -xp
Zejun Wu [Sat, 29 Dec 2018 04:48:31 +0000 (20:48 -0800)] 
Don't use X86_64_ELF_NONPIC_HACK for +RTS -xp

When `+RTS -xp` is passed, when don't need the X86_64_ELF_NONPIC_HACK,
becasue the relocation offset should only be out of range if

* the object file was not compiled with `-fPIC -fexternal-dynamic-refs`;
* ghc generates non-pic code while it should (e.g. #15723)

In either case, we should print an error message rather that silently
attempt to use a hacky workaround that may not work.

This could have made debugging #15723 and #15729 much easier.

Test Plan:
Run this in a case where ghci used to crash becasue of T15723. Now we
see helpful message like:

ghc-iserv-prof: R_X86_64_PC32 relocation out of range:

Reviewers: simonmar, bgamari, erikd

Reviewed By: simonmar, bgamari

Subscribers: rwbarton, carter

Differential Revision:

9 months agoAllocate bss section within proper range of other sections
Zejun Wu [Sat, 29 Dec 2018 04:47:33 +0000 (20:47 -0800)] 
Allocate bss section within proper range of other sections

This re-applies {D5195} and {D5235}, they were reverted as part of diff
stack to unbreak i386. The proper fix is done in {D5289}.

Allocate bss section within proper range of other sections:

* when `+RTS -xp` is passed, allocate it contiguously as we did for
  jump islands
* when we mmap the code to lower 2Gb, we should allocate bss section
  there too

Test Plan:
1. `./validate`




`TEST="T15729" make test` passed in both linux (both i386 and x86_64) and macos.


Also test in a use case where we used to encouter error like:

ghc-iserv-prof: R_X86_64_PC32 relocation out of range: (noname) =

and now, everything works fine.

Reviewers: simonmar, bgamari, angerman, erikd

Reviewed By: simonmar

Subscribers: rwbarton, carter

GHC Trac Issues: #15729

Differential Revision:

9 months agoAdd a RTS option -xp to load PIC object anywhere in address space
Zejun Wu [Sat, 29 Dec 2018 04:37:13 +0000 (20:37 -0800)] 
Add a RTS option -xp to load PIC object anywhere in address space

This re-applies {D5195} with fixes for i386:
* Fix unused label warnings, see {D5230} or {D5273}
* Fix a silly bug introduced by moving `#if`


Add a RTS option -xp to load PIC object anywhere in address space. We do
this by relaxing the requirement of <0x80000000 result of
`mmapForLinker` and implying USE_CONTIGUOUS_MMAP.

We also need to change calls to `ocInit` and `ocGetNames` to avoid
dangling pointers when the address of `oc->image` is changed by

Test Plan:
See {D5195}, also test under i386:

$ uname -a
Linux watashi-arch32 4.18.5-arch1-1.0-ARCH #1 SMP PREEMPT Tue Aug 28
20:45:30 CEST 2018 i686 GNU/Linux
$ cd testsuite/tests/th/ && make test

will run `./validate` on stacked diff.

Reviewers: simonmar, bgamari, alpmestan, trommler, hvr, erikd

Reviewed By: simonmar

Subscribers: rwbarton, carter

Differential Revision:

9 months agoAPI Annotations: Parens not attached correctly for ClassDecl
Alan Zimmerman [Thu, 24 Jan 2019 08:14:55 +0000 (10:14 +0200)] 
API Annotations: Parens not attached correctly for ClassDecl

The parens around the kinded tyvars should be attached to the class
declaration as a whole, they are attached to the tyvar instead,
outside the span.

An annotation must always be within or after the span it is contained

Closes #16212

9 months agoOnly build vanilla way in devel2 flavour
Matthew Pickering [Fri, 25 Jan 2019 15:48:54 +0000 (15:48 +0000)] 
Only build vanilla way in devel2 flavour

Fixes #16210

9 months agoInclude type info for only some exprs in HIE files
Alec Theriault [Fri, 25 Jan 2019 01:33:52 +0000 (17:33 -0800)] 
Include type info for only some exprs in HIE files

This commit relinquishes some some type information in `.hie` files in
exchange for better performance. See #16233 for more on this.

Using `.hie` files to generate hyperlinked sources is a crucial milestone
towards Hi Haddock (the initiative to move Haddock to work over `.hi`
files and embed docstrings in those). Unfortunately, even after much
optimization on the Haddock side, the `.hie` based solution is still
considerably slower and more memory hungry than the existing implementation
- and the @.hie@ code is to blame.

This changes `.hie` file generation to track type information for only
a limited subset of expressions (specifically, those that might eventually
turn into hyperlinks in the Haddock's hyperlinker backend).

9 months agoUse `NameEnv Id` instead of `Map Name Id`
Alec Theriault [Thu, 24 Jan 2019 21:59:18 +0000 (13:59 -0800)] 
Use `NameEnv Id` instead of `Map Name Id`

This is more consistent with the rest of the GHC codebase.

9 months agomake ghc-pkg shut up
Moritz Angermann [Wed, 23 Jan 2019 02:59:38 +0000 (10:59 +0800)] 
make ghc-pkg shut up

9 months agoAvoid compiling Hadrian dependencies with profiling on Cabal/Linux
Neil Mitchell [Wed, 16 Jan 2019 16:21:00 +0000 (11:21 -0500)] 
Avoid compiling Hadrian dependencies with profiling on Cabal/Linux

9 months agoAvoid compiling Hadrian dependencies with profiling on Cabal/Windows
Neil Mitchell [Wed, 16 Jan 2019 16:20:27 +0000 (11:20 -0500)] 
Avoid compiling Hadrian dependencies with profiling on Cabal/Windows

9 months agogitlab-ci: Use build cleanup logic on Darwin as well
Ben Gamari [Mon, 21 Jan 2019 15:55:48 +0000 (10:55 -0500)] 
gitlab-ci: Use build cleanup logic on Darwin as well

We use the shell executor on Darwin as well as Windows.

9 months agoCompile count{Leading,Trailing}Zeros to corresponding x86_64 instructions under ...
Dmitry Ivanov [Sat, 8 Dec 2018 15:45:02 +0000 (16:45 +0100)] 
Compile count{Leading,Trailing}Zeros to corresponding x86_64 instructions under -mbmi2

This works similarly to existing implementation for popCount.
Trac ticket: #16086.

9 months agoPerformance tests: recover a baseline from ancestor commits and CI results.
David Eichmann [Tue, 22 Jan 2019 14:57:23 +0000 (09:57 -0500)] 
Performance tests: recover a baseline from ancestor commits and CI results.

gitlab-ci: push performance metrics as git notes to the "GHC Performance Notes" repository.

9 months agotestsuite: Use makefile_test
Ben Gamari [Mon, 21 Jan 2019 04:46:13 +0000 (23:46 -0500)] 
testsuite: Use makefile_test

This eliminates most uses of run_command in the testsuite in favor of the more
structured makefile_test.

9 months agotestsuite: Introduce makefile_test
Ben Gamari [Mon, 21 Jan 2019 03:54:48 +0000 (22:54 -0500)] 
testsuite: Introduce makefile_test

9 months agoRevert "Batch merge"
Ben Gamari [Wed, 30 Jan 2019 15:05:19 +0000 (10:05 -0500)] 
Revert "Batch merge"

This reverts commit 76c8fd674435a652c75a96c85abbf26f1f221876.

9 months agoBatch merge
Ben Gamari [Wed, 30 Jan 2019 06:06:12 +0000 (01:06 -0500)] 
Batch merge

9 months agoFix #12509: ghci -XSafe fails in an inscrutable way
Roland Senn [Mon, 28 Jan 2019 09:53:50 +0000 (10:53 +0100)] 
Fix #12509: ghci -XSafe fails in an inscrutable way

9 months agoUse sigPrec in more places in Convert and HsUtils
Ryan Scott [Tue, 15 Jan 2019 02:45:17 +0000 (21:45 -0500)] 
Use sigPrec in more places in Convert and HsUtils

Trac #16183 was caused by TH conversion (in `Convert`) not properly
inserting parentheses around occurrences of explicit signatures where
appropriate, such as in applications, function types, and type family
equations. Solution: use `parenthesizeHsType sigPrec` in these
places. While I was in town, I also updated `nlHsFunTy` to do the
same thing.

9 months agoSome refactoring in tcInferApps
Richard Eisenberg [Fri, 11 Jan 2019 22:38:01 +0000 (17:38 -0500)] 
Some refactoring in tcInferApps

Should be no change in behavior, but this makes the control
flow a little more apparent.

9 months agoTest that hsc2hs works with promoted data constructors
Andrew Martin [Mon, 21 Jan 2019 21:04:30 +0000 (16:04 -0500)] 
Test that hsc2hs works with promoted data constructors

9 months agogitlab-ci: Fix Windows cleanup command line
Ben Gamari [Wed, 23 Jan 2019 15:09:49 +0000 (10:09 -0500)] 
gitlab-ci: Fix Windows cleanup command line

Why is it so hard to delete a directory's contents without deleting the
directory itself in Windows? This will forever remain a mystery.

9 months agoUpdate CODEOWNERS files with utils
Tamar Christina [Sun, 27 Jan 2019 22:20:38 +0000 (22:20 +0000)] 
Update CODEOWNERS files with utils

9 months agoFix regDotColor for amd64. [Fri, 25 Jan 2019 22:05:05 +0000 (23:05 +0100)] 
Fix regDotColor for amd64.

Add missing color mappings to regDotColor for amd64.
Also set fakeRegs to red instead of xmm regs.

9 months agoFix incorrectly named configure options
Alec Theriault [Sun, 27 Jan 2019 02:07:48 +0000 (18:07 -0800)] 
Fix incorrectly named configure options

Although we should use 'AC_ARG_ENABLE' for boolean flags, it also
means options get named '--enable-*', not '--with-*'. This should
unbreak the --with-intree-gmp option.

9 months agoDon't overwrite the set log_action when using --interactive
Matthew Pickering [Mon, 21 Jan 2019 01:58:01 +0000 (20:58 -0500)] 
Don't overwrite the set log_action when using --interactive

-ddump-json didn't work with --interactive as --interactive overwrote
the log_action in terms of defaultLogAction.

Reviewers: bgamari

Subscribers: rwbarton, thomie, carter

GHC Trac Issues: #14078

Differential Revision:

9 months agoAdd @simonmar to various things in CODEOWNERS
Simon Marlow [Tue, 22 Jan 2019 16:23:08 +0000 (11:23 -0500)] 
Add @simonmar to various things in CODEOWNERS

9 months agoUpdate CODEOWNERS
Moritz Angermann [Tue, 22 Jan 2019 15:51:46 +0000 (10:51 -0500)] 

9 months agoAdd myself to a few more places
Ömer Sinan Ağacan [Tue, 22 Jan 2019 15:48:37 +0000 (18:48 +0300)] 
Add myself to a few more places

9 months agotestsuite: Add tests from #11982
Ben Gamari [Tue, 22 Jan 2019 16:27:30 +0000 (11:27 -0500)] 
testsuite: Add tests from #11982

9 months agotestsuite: Skip foreignInterruptible in unregisterised way
Ben Gamari [Thu, 24 Jan 2019 02:32:47 +0000 (21:32 -0500)] 
testsuite: Skip foreignInterruptible in unregisterised way

See #15467.

9 months agotestsuite: Skip T1288_ghci in unregisterised
Ben Gamari [Tue, 22 Jan 2019 17:13:28 +0000 (12:13 -0500)] 
testsuite: Skip T1288_ghci in unregisterised

As pointed out in #16085, these ghci tests are fragile in the unregisterised

9 months agocheck-api-annotations checks for annotation preceding its span
Alan Zimmerman [Tue, 22 Jan 2019 21:29:25 +0000 (23:29 +0200)] 
check-api-annotations checks for annotation preceding its span

For an API annotation to be useful, it must not occur before the span
it is enclosed in.

So, for check-api-annotation output, a line such as

((Test16212.hs:3:22-36,AnnOpenP), [Test16212.hs:3:21]),

should be flagged as an error, as the AnnOpenP location of 3:21
precedes its enclosing span of 3:22-26.

This patch does this.

Closes #16217

9 months agohadrian: use new-exec to make sure alex & happy are in PATH (#16120)
Adam Sandberg Eriksson [Wed, 2 Jan 2019 21:08:49 +0000 (22:08 +0100)] 
hadrian: use new-exec to make sure alex & happy are in PATH (#16120)

9 months agoUpdate Cabal submodule to latest master branch tip
Herbert Valerio Riedel [Wed, 23 Jan 2019 00:01:15 +0000 (01:01 +0100)] 
Update Cabal submodule to latest master branch tip

9 months agoUpdate binary submodule to latest master branch tip
Herbert Valerio Riedel [Wed, 23 Jan 2019 22:26:49 +0000 (23:26 +0100)] 
Update binary submodule to latest master branch tip

9 months agotestsuite: Mark hWaitForInput-accurate-socket as requiring unix
Ben Gamari [Wed, 23 Jan 2019 18:06:45 +0000 (13:06 -0500)] 
testsuite: Mark hWaitForInput-accurate-socket as requiring unix

It imports System.Posix.IO.

9 months agotestsuite: Remove directories that already exist when seeding extra_files
Ben Gamari [Mon, 21 Jan 2019 03:36:22 +0000 (22:36 -0500)] 
testsuite: Remove directories that already exist when seeding extra_files

Otherwise the testsuite driver crashes when run multiple times with CLEANUP=NO
on a test containing such extra_files.

9 months agotestsuite: Normalise style
Ben Gamari [Mon, 21 Jan 2019 03:32:09 +0000 (22:32 -0500)] 
testsuite: Normalise style

9 months agoGhcPlugins: Fix lookup of TH names
Ben Gamari [Sat, 19 Jan 2019 18:59:18 +0000 (13:59 -0500)] 
GhcPlugins: Fix lookup of TH names

Previously `thNameToGhcName` was calling `lookupOrigNameCache` directly, which
failed to handle the case that the name wasn't already in the name cache. This
happens, for instance, when the name was in scope in a plugin being used during
compilation but not in scope in the module being compiled. In this case we the
interface file containing the name won't be loaded and `lookupOrigNameCache`
fails. This was the cause of #16104.

The solution is simple: use the nicely packaged `lookupOrigIO` instead.

9 months agotestsuite: Add test for #16104
Ben Gamari [Tue, 15 Jan 2019 16:48:59 +0000 (11:48 -0500)] 
testsuite: Add test for #16104

9 months agotestsuite: Add predicate for CPU feature availability
Ben Gamari [Thu, 27 Dec 2018 19:41:01 +0000 (14:41 -0500)] 
testsuite: Add predicate for CPU feature availability

Previously testing code-generation for ISA extensions was nearly impossible
since we had no ability to determine whether the host supports the needed
extension. Here we fix this by introducing a simple /proc/cpuinfo-based
testsuite predicate. We really ought to

9 months agoAdd @sgraf to CODEOWNERS
Sebastian Graf [Sat, 26 Jan 2019 17:44:23 +0000 (12:44 -0500)] 
Add @sgraf to CODEOWNERS

[skip ci]

9 months agoAdd Simon and Richard as more CODEOWNERS
Richard Eisenberg [Fri, 25 Jan 2019 03:27:00 +0000 (22:27 -0500)] 
Add Simon and Richard as more CODEOWNERS

[skip ci]

9 months agogitlab-ci: Explicitly clear dependencies of all jobs
Ben Gamari [Tue, 22 Jan 2019 19:21:31 +0000 (14:21 -0500)] 
gitlab-ci: Explicitly clear dependencies of all jobs

Apparently GitLab CI defaults to declaring all jobs of the previous
stage as dependencies of a job. This meant that we would end up
downloading all of our binary distributions during the `cleanup` stage,
eating up a truly remarkable amount of S3 tranfers.

9 months agotestsuite: Skip ghcilink002 when unregisterised
Ben Gamari [Tue, 22 Jan 2019 23:40:36 +0000 (18:40 -0500)] 
testsuite: Skip ghcilink002 when unregisterised

See #16085.

9 months agoMinor refactor [ci skip]
Gabor Greif [Tue, 22 Jan 2019 11:13:28 +0000 (12:13 +0100)] 
Minor refactor [ci skip]

9 months agoA few typofixes
Gabor Greif [Tue, 22 Jan 2019 11:07:47 +0000 (12:07 +0100)] 
A few typofixes

9 months agogitlab-ci: Drop CircleCI jobs
Ben Gamari [Tue, 22 Jan 2019 19:25:05 +0000 (14:25 -0500)] 
gitlab-ci: Drop CircleCI jobs

It's pretty unlikely we will be going back to circleci at this point


9 months agoError out of invalid Int/Word bit shifts
Alec Theriault [Fri, 11 Jan 2019 07:44:04 +0000 (23:44 -0800)] 
Error out of invalid Int/Word bit shifts

Although the Haddock's for `shiftL` and `shiftR` do require the number
of bits to be non-negative, we should still check this before calling
out to primitives (which also have undefined behaviour for negative bit

If a user _really_ wants to bypass checks that the number of bits is
sensible, they already have the aptly-named `unsafeShiftL`/`unsafeShiftR`
at their disposal.

See #16111.

9 months agogitlab: Collect artifacts on Windows
Ben Gamari [Wed, 16 Jan 2019 04:21:39 +0000 (23:21 -0500)] 
gitlab: Collect artifacts on Windows

9 months agoUpdate Darwin CI to use new toplevel --with-intree-gmp configure flag
Alec Theriault [Tue, 22 Jan 2019 03:25:29 +0000 (19:25 -0800)] 
Update Darwin CI to use new toplevel --with-intree-gmp configure flag

9 months agoHadrian: support in-tree GMP
Alec Theriault [Thu, 6 Dec 2018 04:46:21 +0000 (20:46 -0800)] 
Hadrian: support in-tree GMP

This adds top-level configure flags '--with-intree-gmp' and
'--with-framework-preferred', both of which are especially relevant
on MacOS.

Besides gaining two new flags, Hadrian also had to be taught what to
do with the 'framework' in .cabal files.

Test Plan:
./boot && ./configure --with-intree-gmp && ./hadrian/
./boot && ./configure --with-gmp-framework-preferred && ./hadrian/ # on macos

Reviewers: carter, snowleopard, alpmestan, hvr, goldfire, bgamari

Subscribers: rwbarton, erikd

GHC Trac Issues: #16001

Differential Revision:

9 months agogitlab-ci: Disallow failure
Ben Gamari [Thu, 17 Jan 2019 18:56:00 +0000 (13:56 -0500)] 
gitlab-ci: Disallow failure

9 months agotestsuite: Mark T16180 as broken on Darwin
Ben Gamari [Wed, 23 Jan 2019 00:08:07 +0000 (19:08 -0500)] 
testsuite: Mark T16180 as broken on Darwin

See #16218.

9 months agotestsuite: Mark ghci063 as broken on Darwin
Ben Gamari [Thu, 17 Jan 2019 18:55:00 +0000 (13:55 -0500)] 
testsuite: Mark ghci063 as broken on Darwin

This is the last failing test on Darwin preventing us from disallowing CI
failures. See #16201.

9 months agoHadrian: install patches 'haddock-{html,interface}'
Alec Theriault [Sat, 19 Jan 2019 09:06:00 +0000 (01:06 -0800)] 
Hadrian: install patches 'haddock-{html,interface}'

Since the `$(docdir)` can be picked independently from the `$(libdir)`,
we need to make sure that that the `haddock-html` and `haddock-interface`
fields in the package DB (which is in the `$(libdir)`) get updated to
point to the appropriate places in the `$(docdir)`.

NB: in the make system, `ghc-cabal` would cover this sort of thing by
re-running `configure` on installation, but here we get away with a
couple lines of `sed` and a call to `ghc-pkg recache`.

Fixes #16202.

9 months agotestsuite: Ensure that config.{msys,cygwin} are initialized
Ben Gamari [Mon, 21 Jan 2019 01:45:34 +0000 (20:45 -0500)] 
testsuite: Ensure that config.{msys,cygwin} are initialized

Reviewers: monoidal

Reviewed By: monoidal

Subscribers: monoidal, rwbarton, carter

Differential Revision:

9 months agoAdd myself to CODEOWNERS for a few files
Joachim Breitner [Tue, 22 Jan 2019 09:57:52 +0000 (10:57 +0100)] 
Add myself to CODEOWNERS for a few files

9 months agoMinor typo in docs for KProxy
Joachim Breitner [Tue, 22 Jan 2019 10:17:57 +0000 (11:17 +0100)] 
Minor typo in docs for KProxy

really minor, but it annoyed me when reading it :-)

9 months agoFix hadrian prof flavour so that it builds a profiled version of GHC
Matthew Pickering [Tue, 22 Jan 2019 11:33:18 +0000 (11:33 +0000)] 
Fix hadrian prof flavour so that it builds a profiled version of GHC

In Alp's refactoring of `getProgramContexts` he removed a call to
`getProgramContext` which was where the logic for this used to be

Fixes #16214