ghc.git
8 weeks agogitlab-ci: Allow Windows Hadrian build to fail
Ben Gamari [Sat, 18 May 2019 21:34:06 +0000 (17:34 -0400)] 
gitlab-ci: Allow Windows Hadrian build to fail

Due to #16574.

8 weeks agoFix #16666 by parenthesizing contexts in Convert
Ryan Scott [Thu, 16 May 2019 21:50:33 +0000 (17:50 -0400)] 
Fix #16666 by parenthesizing contexts in Convert

Most places where we convert contexts in `Convert` are actually in
positions that are to the left of some `=>`, such as in superclasses
and instance contexts. Accordingly, these contexts need to be
parenthesized at `funPrec`. To accomplish this, this patch changes
`cvtContext` to require a precedence argument for the purposes of
calling `parenthesizeHsContext` and adjusts all `cvtContext` call
sites accordingly.

8 weeks agodistrib/configure.ac.in: remove mention to 'settings', since settings.in is gone
Alp Mestanogullari [Thu, 16 May 2019 09:12:30 +0000 (11:12 +0200)] 
distrib/configure.ac.in: remove mention to 'settings', since settings.in is gone

Otherwise, when `./configure`ing a GHC bindist, produced by either Make or
Hadrian, we would try to generate the `settings` file from the `settings.in`
template that we used to have around but which has been gone since d37d91e9.
That commit generates the settings file using the build systems instead, but
forgot to remove this mention to the `settings` file.

8 weeks agoUpdate resolver for for happy 1.19.10
Shayne Fletcher [Wed, 15 May 2019 10:30:36 +0000 (06:30 -0400)] 
Update resolver for for happy 1.19.10

8 weeks agoFix doc for Data.Function.fix.
Javran Cheng [Mon, 13 May 2019 21:58:56 +0000 (14:58 -0700)] 
Fix doc for Data.Function.fix.

Doc-only change.

8 weeks agousers-guide: Fix -rtsopts default
Kirill Elagin [Mon, 13 May 2019 13:20:50 +0000 (09:20 -0400)] 
users-guide: Fix -rtsopts default

8 weeks agoRefactor Libffi and RTS rules
David Eichmann [Fri, 3 May 2019 17:53:26 +0000 (18:53 +0100)] 
Refactor Libffi and RTS rules

This removes a hack that copies libffi files to the rts
build directory. This was done in a libffi rule, but now
an rts rule correctly needs and copies the relevant
files from the libffi build dir to the rts build dir.

Issues: #16272 #16304

8 weeks agoInclude CPP preprocessor dependencies in -M output
David Eichmann [Tue, 9 Apr 2019 12:17:34 +0000 (13:17 +0100)] 
Include CPP preprocessor dependencies in -M output

Issue #16521

8 weeks agousers-guide: Fix directive errors on 8.10
Takenobu Tani [Sat, 27 Apr 2019 11:54:21 +0000 (20:54 +0900)] 
users-guide: Fix directive errors on 8.10

The following sections are not displayed due to a directive error:

  * -Wunused-record-wildcards
  * -Wredundant-record-wildcards

I changed the location of the `since` directive.

[skip ci]

8 weeks agoRecalculate Performance Test Baseline T9630 #16680
David Eichmann [Mon, 20 May 2019 18:45:56 +0000 (19:45 +0100)] 
Recalculate Performance Test Baseline T9630 #16680

Metric Decrease:
    T9630

8 weeks agoImprove test runner logging when calculating performance metric baseline #16662
David Eichmann [Thu, 16 May 2019 12:19:38 +0000 (13:19 +0100)] 
Improve test runner logging when calculating performance metric baseline #16662

We attempt to get 75 commit hashes via `git log`, but this only gave 10
hashes in a CI run (see #16662). Better logging may help solve this
error if it occurs again in the future.

2 months agorts: Explicit state that CONSTR tag field is zero-based
Ben Gamari [Thu, 16 May 2019 16:47:59 +0000 (12:47 -0400)] 
rts: Explicit state that CONSTR tag field is zero-based

This was a bit unclear as we use both one-based and zero-based
tags in GHC.

[skip ci]

2 months agoHadrian: 'need' source files for various docs in Rules.Documentation
Alp Mestanogullari [Thu, 9 May 2019 13:09:45 +0000 (15:09 +0200)] 
Hadrian: 'need' source files for various docs in Rules.Documentation

Previously, changing one of the .rst files from the user guide would not cause
the user guide to be rebuilt. This patch take a first stab at declaring the
documentation source files that our documentation rules depend on, focusing
on the .rst files only for now.

We eventually might want to rebuild docs when we, say, change the haddock style
file, but this level of tracking isn't really necessary for now.

This fixes #16645.

2 months agoRestore the --coerce option in 'happy' configuration
Vladislav Zavialov [Thu, 9 May 2019 08:01:17 +0000 (11:01 +0300)] 
Restore the --coerce option in 'happy' configuration

happy-1.19.10 has been released with a fix for --coerce in the presence
of higher rank types. This should result in about 10% performance
improvement in the parser.

2 months agoGuard CUSKs behind a language pragma
Vladislav Zavialov [Wed, 8 May 2019 22:53:26 +0000 (01:53 +0300)] 
Guard CUSKs behind a language pragma

GHC Proposal #36 describes a transition plan away from CUSKs and to
top-level kind signatures:

1. Introduce a new extension, -XCUSKs, on by default, that detects CUSKs
   as they currently exist.
2. We turn off the -XCUSKs extension in a few releases and remove it
   sometime thereafter.

This patch implements phase 1 of this plan, introducing a new language
extension to control whether CUSKs are enabled. When top-level kind
signatures are implemented, we can transition to phase 2.

2 months agoAdd a minimized regression test for #12928
Vladislav Zavialov [Wed, 8 May 2019 18:47:38 +0000 (21:47 +0300)] 
Add a minimized regression test for #12928

2 months agoUpdate terminal title while running test-suite
Oleg Grenrus [Wed, 8 May 2019 06:35:15 +0000 (09:35 +0300)] 
Update terminal title while running test-suite

Useful progress indicator even when `make test VERBOSE=1`,
and when you do something else, but have terminal title visible.

2 months agoRemove all target-specific portions of Config.hs
John Ericson [Wed, 27 Mar 2019 04:27:01 +0000 (00:27 -0400)] 
Remove all target-specific portions of Config.hs

1. If GHC is to be multi-target, these cannot be baked in at compile
   time.

2. Compile-time flags have a higher maintenance than run-time flags.

3. The old way makes build system implementation (various bootstrapping
   details) with the thing being built. E.g. GHC doesn't need to care
   about which integer library *will* be used---this is purely a crutch
   so the build system doesn't need to pass flags later when using that
   library.

4. Experience with cross compilation in Nixpkgs has shown things work
   nicer when compiler's can *optionally* delegate the bootstrapping the
   package manager. The package manager knows the entire end-goal build
   plan, and thus can make top-down decisions on bootstrapping. GHC can
   just worry about GHC, not even core library like base and ghc-prim!

2 months agoDont refer to `cLeadingUnderscore` in test
John Ericson [Tue, 7 May 2019 23:09:25 +0000 (19:09 -0400)] 
Dont refer to `cLeadingUnderscore` in test

Can't use this config entry because it's about to go away

2 months agohadrian: Make settings stage specific
John Ericson [Sun, 7 Apr 2019 14:24:03 +0000 (10:24 -0400)] 
hadrian: Make settings stage specific

2 months agoAdd regression test for old parser issue #504
Kevin Buhr [Tue, 7 May 2019 02:40:37 +0000 (21:40 -0500)] 
Add regression test for old parser issue #504

2 months agoChange GHC.hs to Packages.hs in Hadrian user-settings.md
Giles Anderson [Mon, 8 Apr 2019 19:52:51 +0000 (21:52 +0200)] 
Change GHC.hs to Packages.hs in Hadrian user-settings.md

... "all packages that are currently built as part of the GHC are
defined in src/Packages.hs"

2 months agoAdd regression test case for old issue #493
Kevin Buhr [Tue, 7 May 2019 00:24:31 +0000 (19:24 -0500)] 
Add regression test case for old issue #493

2 months agogitlab-ci: Disable cleanup job on Windows
Ben Gamari [Mon, 6 May 2019 13:34:19 +0000 (09:34 -0400)] 
gitlab-ci: Disable cleanup job on Windows

As discussed in the Note, we now have a cron job to handle this and the
cleanup job itself is quite fragile.

[skip ci]

2 months agoHadrian: programs need registered ghc-pkg libraries
David Eichmann [Tue, 30 Apr 2019 11:02:41 +0000 (12:02 +0100)] 
Hadrian: programs need registered ghc-pkg libraries

In Hadrian, building programs (e.g. `ghc` or `haddock`) requires libraries located in the ghc-pkg package database i.e.

    _build/stage1/lib/x86_64-linux-ghc-8.9.0.20190430/libHSdeepseq-1.4.4.0-ghc8.9.0.20190430.so

Add the corresponding `need`s for these library files and the subsequent rules.

2 months agoFix bugs and documentation for #13456
Roland Senn [Sun, 14 Apr 2019 12:21:40 +0000 (14:21 +0200)] 
Fix bugs and documentation for #13456

2 months agoAdd Generic tuple instances up to 15-tuple
Oleg Grenrus [Thu, 11 Apr 2019 13:46:06 +0000 (16:46 +0300)] 
Add Generic tuple instances up to 15-tuple

Why 15? Because we have Eq instances up to 15.

Metric Increase:
    T9630
    haddock.base

2 months agoAdd a regression test for #14548
Vladislav Zavialov [Tue, 7 May 2019 15:17:44 +0000 (18:17 +0300)] 
Add a regression test for #14548

2 months agoAdd regression test for old issue #507
Kevin Buhr [Tue, 7 May 2019 04:32:42 +0000 (23:32 -0500)] 
Add regression test for old issue #507

2 months agoPurge TargetPlatform_NAME and cTargetPlatformString
John Ericson [Wed, 27 Mar 2019 03:48:47 +0000 (23:48 -0400)] 
Purge TargetPlatform_NAME and cTargetPlatformString

2 months agoRegression test for #16627.
Richard Eisenberg [Sat, 4 May 2019 02:04:19 +0000 (22:04 -0400)] 
Regression test for #16627.

test: typecheck/should_fail/T16627

2 months agoPrint PAP object address in stg_PAP_info entry code
Ömer Sinan Ağacan [Thu, 2 May 2019 10:48:09 +0000 (13:48 +0300)] 
Print PAP object address in stg_PAP_info entry code

Continuation to ce23451c

2 months agostg_floatToWord32zh: zero-extend the Word32 (#16617)
Kevin Buhr [Wed, 1 May 2019 22:13:33 +0000 (17:13 -0500)] 
stg_floatToWord32zh: zero-extend the Word32 (#16617)

The primop stgFloatToWord32 was sign-extending the 32-bit word, resulting
in weird negative Word32s.  Zero-extend them instead.

Closes #16617.

2 months agoImplement ImportQualifiedPost
Shayne Fletcher [Tue, 7 May 2019 21:35:50 +0000 (17:35 -0400)] 
Implement ImportQualifiedPost

2 months agoFix #16632 by using the correct SrcSpan in checkTyClHdr
Ryan Scott [Tue, 7 May 2019 12:56:30 +0000 (08:56 -0400)] 
Fix #16632 by using the correct SrcSpan in checkTyClHdr

`checkTyClHdr`'s case for `HsTyVar` was grabbing the wrong `SrcSpan`,
which lead to error messages pointing to the wrong location. Easily
fixed.

2 months agoFix #16603 by documenting some important changes in changelogs
Ryan Scott [Sat, 4 May 2019 15:05:20 +0000 (11:05 -0400)] 
Fix #16603 by documenting some important changes in changelogs

This addresses some glaring omissions from
`libraries/base/changelog.md` and
`docs/users_guide/8.8.1-notes.rst`, fixing #16603 in the process.

2 months agoAdd regression test for old typechecking issue #505
Kevin Buhr [Tue, 7 May 2019 02:42:33 +0000 (21:42 -0500)] 
Add regression test for old typechecking issue #505

2 months agoCheck for duplicate variables in associated default equations
Ryan Scott [Mon, 6 May 2019 18:49:44 +0000 (14:49 -0400)] 
Check for duplicate variables in associated default equations

A follow-up to !696's, which attempted to clean up the error messages
for ill formed associated type family default equations. The previous
attempt, !696, forgot to account for the possibility of duplicate
kind variable arguments, as in the following example:

```hs
class C (a :: j) where
  type T (a :: j) (b :: k)
  type T (a :: k) (b :: k) = k
```

This patch addresses this shortcoming by adding an additional check
for this. Fixes #13971 (hopefully for good this time).

2 months agoAdd /includes/dist to .gitignore
Ryan Scott [Sat, 4 May 2019 14:30:47 +0000 (10:30 -0400)] 
Add /includes/dist to .gitignore

As of commit d37d91e9a444a7822eef1558198d21511558515e, the GHC build
now autogenerates a `includes/dist/build/settings` file. To avoid
dirtying the current `git` status, this adds `includes/dist` to
`.gitignore`.

[ci skip]

2 months agoHadrian: override $(ghc-config-mk), to prevent redundant config generation
Alp Mestanogullari [Tue, 23 Apr 2019 12:46:42 +0000 (14:46 +0200)] 
Hadrian: override $(ghc-config-mk), to prevent redundant config generation

This required making the 'ghc-config-mk' variable overridable in
testsuite/mk/boilerplate.mk, and then making use of this in hadrian
to point to '<build root>/test/ghcconfig' instead, which is where we
always put the test config.

Previously, we would build ghc-config and run it against the
GHC to be tested, a second time, while we're running the tests, because some
include testsuite/mk/boilerplate.mk. This was causing unexpected output
failures.

2 months agoEnable external interpreter when TH is requested but no internal interpreter is available
Alp Mestanogullari [Fri, 3 May 2019 10:21:44 +0000 (12:21 +0200)] 
Enable external interpreter when TH is requested but no internal interpreter is available

2 months agoRemove `$(TOP)/ANNOUNCE` file
Takenobu Tani [Mon, 29 Apr 2019 09:12:31 +0000 (18:12 +0900)] 
Remove `$(TOP)/ANNOUNCE` file

Remove `$(TOP)/ANNOUNCE` because maintaining this file is expensive
for each release.

Currently, release announcements of ghc are made on ghc blogs and wikis.

[skip ci]

2 months agoRemove cGhcEnableTablesNextToCode
John Ericson [Wed, 27 Mar 2019 04:27:01 +0000 (00:27 -0400)] 
Remove cGhcEnableTablesNextToCode

Get "Tables next to code" from the settings file instead.

2 months ago'warnSpaceAfterBang' only in patterns (#16619)
Vladislav Zavialov [Thu, 2 May 2019 04:42:16 +0000 (07:42 +0300)] 
'warnSpaceAfterBang' only in patterns (#16619)

2 months agoFix #16593 by having only one definition of -fprint-explicit-runtime-reps
Chaitanya Koparkar [Fri, 19 Apr 2019 13:50:54 +0000 (09:50 -0400)] 
Fix #16593 by having only one definition of -fprint-explicit-runtime-reps

[skip ci]

2 months ago[ typo ] 'castFloatToWord32' -> 'castFloatToWord64'
gallais [Fri, 3 May 2019 08:24:21 +0000 (04:24 -0400)] 
[ typo ] 'castFloatToWord32' -> 'castFloatToWord64'

Probably due to a copy/paste gone wrong.

2 months agoFix typo in 8.8.1 notes related to traceBinaryEvent
iustin [Fri, 26 Apr 2019 13:07:33 +0000 (09:07 -0400)] 
Fix typo in 8.8.1 notes related to traceBinaryEvent

- fixes double mention of `traceBinaryEvent#` (the second one should be `traceEvent#`, I think)
- fixes note about `traceEvent#` taking a `String` - the docs say it takes a zero-terminated ByteString.

2 months agoPrimOps.cmm: remove unused stuff
Ömer Sinan Ağacan [Fri, 3 May 2019 05:13:57 +0000 (08:13 +0300)] 
PrimOps.cmm: remove unused stuff

2 months agoStgCmmMonad: remove emitProc_, don't export emitProc
Ömer Sinan Ağacan [Fri, 3 May 2019 05:12:48 +0000 (08:12 +0300)] 
StgCmmMonad: remove emitProc_, don't export emitProc

2 months agorts: Properly free the RTSSummaryStats structure
Ömer Sinan Ağacan [Wed, 1 May 2019 15:40:33 +0000 (18:40 +0300)] 
rts: Properly free the RTSSummaryStats structure

`stat_exit` always allocates a `RTSSummaryStats` but only sometimes
frees it, which casues leaks. With this patch we unconditionally free
the structure, fixing the leak.

Fixes #16584

2 months agoMake equality constraints in kinds invisible
Ryan Scott [Tue, 30 Apr 2019 15:28:41 +0000 (11:28 -0400)] 
Make equality constraints in kinds invisible

Issues #12102 and #15872 revealed something strange about the way GHC
handles equality constraints in kinds: it treats them as _visible_
arguments! This causes a litany of strange effects, from strange
error messages
(https://gitlab.haskell.org/ghc/ghc/issues/12102#note_169035)
to bizarre `Eq#`-related things leaking through to GHCi output, even
without any special flags enabled.

This patch is an attempt to contain some of this strangeness.
In particular:

* In `TcHsType.etaExpandAlgTyCon`, we propagate through the
  `AnonArgFlag`s of any `Anon` binders. Previously, we were always
  hard-coding them to `VisArg`, which meant that invisible binders
  (like those whose kinds were equality constraint) would mistakenly
  get flagged as visible.
* In `ToIface.toIfaceAppArgsX`, we previously assumed that the
  argument to a `FunTy` always corresponding to a `Required`
  argument. We now dispatch on the `FunTy`'s `AnonArgFlag` and map
  `VisArg` to `Required` and `InvisArg` to `Inferred`. As a
  consequence, the iface pretty-printer correctly recognizes that
  equality coercions are inferred arguments, and as a result,
  only displays them in `-fprint-explicit-kinds` is enabled.
* Speaking of iface pretty-printing, `Anon InvisArg` binders were
  previously being pretty-printed like `T (a :: b ~ c)`, as if they
  were required. This seemed inconsistent with other invisible
  arguments (that are printed like `T @{d}`), so I decided to switch
  this to `T @{a :: b ~ c}`.

Along the way, I also cleaned up a minor inaccuracy in the users'
guide section for constraints in kinds that was spotted in
https://gitlab.haskell.org/ghc/ghc/issues/12102#note_136220.

Fixes #12102 and #15872.

2 months agoFix interface version number printing in --show-iface
Ömer Sinan Ağacan [Tue, 30 Apr 2019 09:42:08 +0000 (12:42 +0300)] 
Fix interface version number printing in --show-iface

Before

    Version: Wanted [8, 0, 9, 0, 2, 0, 1, 9, 0, 4, 2, 5],
             got    [8, 0, 9, 0, 2, 0, 1, 9, 0, 4, 2, 5]

After

    Version: Wanted 809020190425,
             got    809020190425

2 months agoOnly skip decls with CUSKs with PolyKinds on (fix #16609)
Ningning Xie [Mon, 29 Apr 2019 14:57:37 +0000 (22:57 +0800)] 
Only skip decls with CUSKs with PolyKinds on (fix #16609)

2 months agoPattern/expression ambiguity resolution
Vladislav Zavialov [Tue, 23 Apr 2019 18:21:33 +0000 (21:21 +0300)] 
Pattern/expression ambiguity resolution

This patch removes 'EWildPat', 'EAsPat', 'EViewPat', and 'ELazyPat'
from 'HsExpr' by using the ambiguity resolution system introduced
earlier for the command/expression ambiguity.

Problem: there are places in the grammar where we do not know whether we
are parsing an expression or a pattern, for example:

do { Con a b <- x } -- 'Con a b' is a pattern
do { Con a b }      -- 'Con a b' is an expression

Until we encounter binding syntax (<-) we don't know whether to parse
'Con a b' as an expression or a pattern.

The old solution was to parse as HsExpr always, and rejig later:

checkPattern :: LHsExpr GhcPs -> P (LPat GhcPs)

This meant polluting 'HsExpr' with pattern-related constructors. In
other words, limitations of the parser were affecting the AST, and all
other code (the renamer, the typechecker) had to deal with these extra
constructors.

We fix this abstraction leak by parsing into an overloaded
representation:

class DisambECP b where ...
newtype ECP = ECP { runECP_PV :: forall b. DisambECP b => PV (Located b) }

See Note [Ambiguous syntactic categories] for details.

Now the intricacies of parsing have no effect on the hsSyn AST when it
comes to the expression/pattern ambiguity.

2 months agoHadrian: generate JUnit testsuite report in Linux CI job
Alp Mestanogullari [Fri, 26 Apr 2019 11:58:32 +0000 (13:58 +0200)] 
Hadrian: generate JUnit testsuite report in Linux CI job

We also keep it as an artifact, like we do for non-Hadrian jobs, and list it
as a junit report, so that the test results are reported in the GitLab UI for
merge requests.

2 months agotestsuite: Mark concprog001 as fragile
Ben Gamari [Fri, 26 Apr 2019 04:54:21 +0000 (00:54 -0400)] 
testsuite: Mark concprog001 as fragile

Due to #16604.

2 months agoMake Extension derive Bounded
Shayne Fletcher [Thu, 25 Apr 2019 15:09:00 +0000 (11:09 -0400)] 
Make Extension derive Bounded

2 months agoTypeset Big-O complexities with Tex-style notation (#16090)
Sven Tennie [Mon, 22 Apr 2019 23:35:33 +0000 (01:35 +0200)] 
Typeset Big-O complexities with Tex-style notation (#16090)

Use `\min` instead of `min` to typeset it as an operator.

2 months agoEmit GHC timing events to eventlog
Ben Gamari [Tue, 16 Apr 2019 19:19:01 +0000 (15:19 -0400)] 
Emit GHC timing events to eventlog

2 months agoErrUtils: Emit progress messages to eventlog
Ben Gamari [Sun, 14 Apr 2019 21:05:50 +0000 (17:05 -0400)] 
ErrUtils: Emit progress messages to eventlog

2 months agoBuild Hadrian with -Werror in the 'ghc-in-ghci' CI job
Alp Mestanogullari [Mon, 15 Apr 2019 11:52:34 +0000 (13:52 +0200)] 
Build Hadrian with -Werror in the 'ghc-in-ghci' CI job

2 months agoMove cGHC_UNLIT_PGM to be "unlit command" in settings
John Ericson [Thu, 4 Apr 2019 17:38:53 +0000 (13:38 -0400)] 
Move cGHC_UNLIT_PGM to be "unlit command" in settings

The bulk of the work was done in #712, making settings be make/Hadrian
controlled. This commit then just moves the unlit command rules in
make/Hadrian from the `Config.hs` generator to the `settings` generator
in each build system.

I think this is a good change because the crucial benefit is *settings*
don't affect the build: ghc gets one baby step closer to being a regular
cabal executable, and make/Hadrian just maintains settings as part of
bootstrapping.

2 months agoRemove settings.in
John Ericson [Wed, 3 Apr 2019 20:31:59 +0000 (16:31 -0400)] 
Remove settings.in

It is no longer needed

2 months agoGenerate settings by make/hadrian instead of configure
John Ericson [Wed, 3 Apr 2019 13:32:05 +0000 (09:32 -0400)] 
Generate settings by make/hadrian instead of configure

This allows it to eventually become stage-specific

2 months agoCompute demand signatures assuming idArity
Sebastian Graf [Thu, 7 Feb 2019 14:34:07 +0000 (15:34 +0100)] 
Compute demand signatures assuming idArity

This does four things:

1. Look at `idArity` instead of manifest lambdas to decide whether to use LetUp
2. Compute the strictness signature in LetDown assuming at least `idArity`
   incoming arguments
3. Remove the special case for trivial RHSs, which is subsumed by 2
4. Don't perform the W/W split when doing so would eta expand a binding.
   Otherwise we would eta expand PAPs, causing unnecessary churn in the
   Simplifier.

NoFib Results

--------------------------------------------------------------------------------
        Program         Allocs    Instrs
--------------------------------------------------------------------------------
 fannkuch-redux          +0.3%      0.0%
             gg          -0.0%     -0.1%
       maillist          +0.2%     +0.2%
        minimax           0.0%     +0.8%
         pretty           0.0%     -0.1%
        reptile          -0.0%     -1.2%
--------------------------------------------------------------------------------
            Min          -0.0%     -1.2%
            Max          +0.3%     +0.8%
 Geometric Mean          +0.0%     -0.0%

2 months agoghci: Ensure that system libffi include path is searched
Ben Gamari [Fri, 12 Apr 2019 20:59:50 +0000 (16:59 -0400)] 
ghci: Ensure that system libffi include path is searched

Previously hsc2hs failed when building against a system FFI.

2 months agoUse pp_item
Wojciech Baranowski [Wed, 24 Apr 2019 19:03:26 +0000 (22:03 +0300)] 
Use pp_item

2 months agoSuggest only local candidates from global env
Wojciech Baranowski [Wed, 24 Apr 2019 18:54:42 +0000 (21:54 +0300)] 
Suggest only local candidates from global env

2 months agoComment on 'candidates' function
Wojciech Baranowski [Wed, 24 Apr 2019 13:59:08 +0000 (16:59 +0300)] 
Comment on 'candidates' function

2 months agoosa1's patch: consistent suggestion message
Wojciech Baranowski [Tue, 23 Apr 2019 08:44:57 +0000 (11:44 +0300)] 
osa1's patch: consistent suggestion message

2 months agoPrint suggestions in a single message
Wojciech Baranowski [Sat, 13 Apr 2019 09:31:13 +0000 (12:31 +0300)] 
Print suggestions in a single message

2 months agorename: hadle type signatures with typos
Wojciech Baranowski [Sun, 7 Apr 2019 16:25:05 +0000 (19:25 +0300)] 
rename: hadle type signatures with typos

When encountering type signatures for unknown names, suggest similar
alternatives.

This fixes issue #16504

2 months agogitlab-ci: Reintroduce DWARF-enabled bindists
Ben Gamari [Thu, 25 Apr 2019 21:13:58 +0000 (17:13 -0400)] 
gitlab-ci: Reintroduce DWARF-enabled bindists

It seems that this was inadvertently dropped in
1285d6b95fbae7858abbc4722bc2301d7fe40425.

2 months agoUpdate autoconf scripts
Ben Gamari [Wed, 24 Apr 2019 17:10:54 +0000 (13:10 -0400)] 
Update autoconf scripts

Scripts taken from autoconf a8d79c3130da83c7cacd6fee31b9acc53799c406

2 months agoupdate-autoconf: Initial commit
Ben Gamari [Wed, 24 Apr 2019 17:16:51 +0000 (13:16 -0400)] 
update-autoconf: Initial commit

2 months agoMinor RTS refactoring:
Ömer Sinan Ağacan [Mon, 22 Apr 2019 06:58:56 +0000 (09:58 +0300)] 
Minor RTS refactoring:

- Remove redundant casting in evacuate_static_object
- Remove redundant parens in STATIC_LINK
- Fix a typo in GC.c

2 months agocheckPattern error hint is PV context
Vladislav Zavialov [Tue, 26 Mar 2019 17:49:26 +0000 (20:49 +0300)] 
checkPattern error hint is PV context

There is a hint added to error messages reported in checkPattern.
Instead of passing it manually, we put it in a ReaderT environment inside PV.

2 months agoIntroduce MonadP, make PV a newtype
Vladislav Zavialov [Mon, 25 Mar 2019 10:33:32 +0000 (13:33 +0300)] 
Introduce MonadP, make PV a newtype

Previously we defined   type PV = P,
this had the downside that if we wanted to change PV,
we would have to modify P as well.

Now PV is free to evolve independently from P.

The common operations addError, addFatalError, getBit, addAnnsAt,
were abstracted into a class called MonadP.

2 months agogitlab-ci: source-tarball job should have no dependencies
Ben Gamari [Wed, 24 Apr 2019 16:16:10 +0000 (12:16 -0400)] 
gitlab-ci: source-tarball job should have no dependencies

2 months agoFix error message for './configure' regarding '--with-ghc' [skip ci]
Alexandre Baldé [Tue, 9 Apr 2019 00:19:16 +0000 (01:19 +0100)] 
Fix error message for './configure' regarding '--with-ghc' [skip ci]

2 months agoosReserveHeapMemory: handle signed rlim_t
Fraser Tweedale [Mon, 8 Apr 2019 07:27:06 +0000 (17:27 +1000)] 
osReserveHeapMemory: handle signed rlim_t

rlim_t is a signed type on FreeBSD, and the build fails with a
sign-compare error.  Add explicit (unsigned) cast to handle this
case.

2 months agoStop misusing EWildPat in pattern match coverage checking
Vladislav Zavialov [Fri, 19 Apr 2019 14:55:01 +0000 (17:55 +0300)] 
Stop misusing EWildPat in pattern match coverage checking

EWildPat is a constructor of HsExpr used in the parser to represent
wildcards in ambiguous positions:

* in expression context, EWildPat is turned into hsHoleExpr (see rnExpr)
* in pattern context, EWildPat is turned into WildPat (see checkPattern)

Since EWildPat exists solely for the needs of the parser, we could
remove it by improving the parser.

However, EWildPat has also been used for a different purpose since
8a50610: to represent patterns that the coverage checker cannot handle.
Not only this is a misuse of EWildPat, it also stymies the removal of
EWildPat.

2 months agoHadrian: use the testsuite driver's config.haddock arg more correctly
Alp Mestanogullari [Wed, 17 Apr 2019 15:14:08 +0000 (17:14 +0200)] 
Hadrian: use the testsuite driver's config.haddock arg more correctly

4 haddock tests assume that .haddock files have been produced, by using the
'req_haddock' modifier. The testsuite driver assumes that this condition is
satisfied if 'config.haddock' is non-empty, but before this patch Hadrian was
always passing the path to where the haddock executable should be, regardless
of whether it is actually there or not.

Instead, we now pass an empty config.haddock when we can't find all of
<build root>/docs/html/libraries/<pkg>/<pkg>.haddock>, where <pkg> ranges over
array, base, ghc-prim, process and template-haskell, and pass the path
to haddock when all those file exists. This has the (desired) effect of skipping
the 4 tests (marked as 'missing library') when the docs haven't been built,
and running the haddock tests when they have.

2 months agoCorrect off by one error in ghci +c
Matthew Pickering [Wed, 17 Apr 2019 16:56:56 +0000 (17:56 +0100)] 
Correct off by one error in ghci +c

Fixes #16569

2 months agotestsuite: fix ifdef lint errors under tests/rts/linker
Artem Pyanykh [Tue, 16 Apr 2019 16:30:16 +0000 (19:30 +0300)] 
testsuite: fix ifdef lint errors under tests/rts/linker

2 months agotestsuite: move tests related to linker under tests/rts/linker
Artem Pyanykh [Tue, 16 Apr 2019 16:10:31 +0000 (19:10 +0300)] 
testsuite: move tests related to linker under tests/rts/linker

2 months ago[skip ci] correct the docs for casArray a little more. clarify that the returned...
Andrew Martin [Tue, 16 Apr 2019 13:03:46 +0000 (09:03 -0400)] 
[skip ci] correct the docs for casArray a little more. clarify that the returned element may be two different things

2 months ago[skip ci] correct formatting of casArray# in docs for casSmallArray#
Andrew Martin [Sat, 13 Apr 2019 18:25:57 +0000 (14:25 -0400)] 
[skip ci] correct formatting of casArray# in docs for casSmallArray#

2 months ago[skip ci] say "machine words" instead of "Int units" in the primops docs
Andrew Martin [Fri, 12 Apr 2019 12:45:36 +0000 (08:45 -0400)] 
[skip ci] say "machine words" instead of "Int units" in the primops docs

2 months agoimprove docs for casArray and casSmallArray
Andrew Martin [Thu, 11 Apr 2019 01:11:03 +0000 (21:11 -0400)] 
improve docs for casArray and casSmallArray

2 months agousers-guide: Add libraries section to 8.10.1 release notes
Ben Gamari [Sat, 6 Apr 2019 16:38:09 +0000 (12:38 -0400)] 
users-guide: Add libraries section to 8.10.1 release notes

2 months agousers-guide: Add pretty to package list
Ben Gamari [Sat, 6 Apr 2019 16:26:38 +0000 (12:26 -0400)] 
users-guide: Add pretty to package list

2 months agogitlab-ci: Do not build profiled libraries on 32-bit Windows
Ben Gamari [Fri, 19 Apr 2019 04:16:57 +0000 (00:16 -0400)] 
gitlab-ci: Do not build profiled libraries on 32-bit Windows

Due to #15934.

2 months agogitlab-ci: Add centos7 release job
Ben Gamari [Thu, 11 Apr 2019 22:22:51 +0000 (18:22 -0400)] 
gitlab-ci: Add centos7 release job

2 months agogitlab-ci: Only run release notes lint on release tags
Ben Gamari [Fri, 12 Apr 2019 15:10:48 +0000 (11:10 -0400)] 
gitlab-ci: Only run release notes lint on release tags

2 months agogitlab-ci: Allow doc-tarball job to fail
Ben Gamari [Sat, 20 Apr 2019 15:44:22 +0000 (11:44 -0400)] 
gitlab-ci: Allow doc-tarball job to fail

Due to allowed failure of Windows job.

2 months agogitlab-ci: Improve error message on failure of doc-tarball job
Ben Gamari [Sat, 20 Apr 2019 15:17:10 +0000 (11:17 -0400)] 
gitlab-ci: Improve error message on failure of doc-tarball job

Previously the failure was quite nondescript.

2 months agoHadrian: Drop old/unused CI scripts
Andrey Mokhov [Thu, 18 Apr 2019 22:52:17 +0000 (23:52 +0100)] 
Hadrian: Drop old/unused CI scripts

2 months agoHaddock: support strict GADT args with docs
Alec Theriault [Thu, 18 Apr 2019 19:53:56 +0000 (12:53 -0700)] 
Haddock: support strict GADT args with docs

Rather than massaging the output of the parser to re-arrange docs and
bangs, it is simpler to patch the two places in which the strictness
info is needed (to accept that the `HsBangTy` may be inside an
`HsDocTy`).

Fixes #16585.

2 months agoTagless final encoding of ExpCmdI in the parser
Vladislav Zavialov [Thu, 18 Apr 2019 21:36:00 +0000 (00:36 +0300)] 
Tagless final encoding of ExpCmdI in the parser

Before this change, we used a roundabout encoding:

1. a GADT (ExpCmdG)
2. a class to pass it around (ExpCmdI)
3. helpers to match on it (ecHsApp, ecHsIf, ecHsCase, ...)

It is more straightforward to turn these helpers into class methods,
removing the need for a GADT.