ghc.git
7 months agoRemove `parallel` as a submodule
Alec Theriault [Wed, 13 Feb 2019 15:44:58 +0000 (07:44 -0800)] 
Remove `parallel` as a submodule

`parallel` is used in exactly one place in the GHC tree: the T2317 test.
It seems almost by accident that it is a submodule; libraries needed
only for tests should net be included as submodules (see `QuickCheck`,
`async`, `haskell98`, `regex-compat`, `utf8-string`, `vector` and more
for examples).

T2317 will now get run only when `parallel` is installed instead of
`parallel` being required for the testsuite to run.

7 months agoMinor documentation fix in GHC.ForeignPtr
Ömer Sinan Ağacan [Wed, 13 Feb 2019 10:52:17 +0000 (13:52 +0300)] 
Minor documentation fix in GHC.ForeignPtr

7 months agoRemove Simon's special number from typecheck/should_fail/all.t
Matthew Pickering [Fri, 15 Feb 2019 10:30:14 +0000 (10:30 +0000)] 
Remove Simon's special number from typecheck/should_fail/all.t

7 months agoFix tests which were made to pass by "Make a smart mkAppTyM"
Matthew Pickering [Fri, 15 Feb 2019 10:26:41 +0000 (10:26 +0000)] 
Fix tests which were made to pass by "Make a smart mkAppTyM"

For some reason gitlab is not reporting these as failures in CI. It's
not clear to me why as the junit output looks fine.

Fixes #16112 and #16113

They were fixed by 682783828275cca5fd8bf5be5b52054c75e0e22c

7 months agoFix and Reapply "Performance tests: recover a baseline from ancestor commits and...
David Eichmann [Mon, 4 Feb 2019 16:51:58 +0000 (16:51 +0000)] 
Fix and Reapply "Performance tests: recover a baseline from ancestor commits and CI results."

7 months agoDon't wrap the entry map for LiveInfo in Maybe.
klebinger.andreas@gmx.at [Thu, 14 Feb 2019 18:23:19 +0000 (19:23 +0100)] 
Don't wrap the entry map for LiveInfo in Maybe.

It never really encoded a invariant.

* The linear register allocator just did partial pattern matches
* The graph allocator just set it to (Just mapEmpty) for Nothing

So I changed LiveInfo to directly contain the map.

Further natCmmTopToLive which filled in Nothing is no longer exported.
Instead we know call cmmTopLiveness which changes the type AND fills
in the map.

7 months agoProperly escape character literals in Haddocks
Alec Theriault [Wed, 13 Feb 2019 13:43:35 +0000 (08:43 -0500)] 
Properly escape character literals in Haddocks

Character literals in Haddock should not be written as plain `'\n'` since
single quotes are for linking identifiers. Besides, since we want the
character literal to be monospaced, we really should use `@\'\\n\'@`.

[skip ci]

7 months ago'forall' always a keyword, plus the dot type operator
Vladislav Zavialov [Wed, 13 Feb 2019 21:36:00 +0000 (00:36 +0300)] 
'forall' always a keyword, plus the dot type operator

7 months agoHadrian: enable -Wcompat=error in the testsuite
Vladislav Zavialov [Wed, 13 Feb 2019 12:22:59 +0000 (15:22 +0300)] 
Hadrian: enable -Wcompat=error in the testsuite

7 months agoFail fast in solveLocalEqualities
Simon Peyton Jones [Thu, 14 Feb 2019 08:28:43 +0000 (08:28 +0000)] 
Fail fast in solveLocalEqualities

This patch makes us fail fast in TcSimplify.solveLocalEqualities,
and in TcHsType.tc_hs_sig_type, if there are insoluble constraints.

Previously we ploughed on even if there were insoluble constraints,
leading to a cascade of hard-to-understand type errors. Failing
eagerly is much better; hence a lot of testsuite error message
changes.  Eg if we have
          f :: [Maybe] -> blah
          f xs = e
then trying typecheck 'f x = e' with an utterly bogus type
is just asking for trouble.

I can't quite remember what provoked me to make this change,
but I think the error messages are notably improved, by
removing confusing clutter and focusing on the real error.

7 months agoMake a smart mkAppTyM
Simon Peyton Jones [Thu, 24 Jan 2019 11:53:03 +0000 (11:53 +0000)] 
Make a smart mkAppTyM

This patch finally delivers on Trac #15952.  Specifically

* Completely remove Note [The tcType invariant], along with
  its complicated consequences (IT1-IT6).

* Replace Note [The well-kinded type invariant] with:

      Note [The Purely Kinded Type Invariant (PKTI)]

* Instead, establish the (PKTI) in TcHsType.tcInferApps,
  by using a new function mkAppTyM when building a type
  application.  See Note [mkAppTyM].

* As a result we can remove the delicate mkNakedXX functions
  entirely.  Specifically, mkNakedCastTy retained lots of
  extremly delicate Refl coercions which just cluttered
  everything up, and(worse) were very vulnerable to being
  silently eliminated by (say) substTy. This led to a
  succession of bug reports.

The result is noticeably simpler to explain, simpler
to code, and Richard and I are much more confident that
it is correct.

It does not actually fix any bugs, but it brings us closer.
E.g. I hoped it'd fix #15918 and #15799, but it doesn't quite
do so.  However, it makes it much easier to fix.

I also did a raft of other minor refactorings:

* Use tcTypeKind consistently in the type checker

* Rename tcInstTyBinders to tcInvisibleTyBinders,
  and refactor it a bit

* Refactor tcEqType, pickyEqType, tcEqTypeVis
  Simpler, probably more efficient.

* Make zonkTcType zonk TcTyCons, at least if they have
  any free unification variables -- see zonk_tc_tycon
  in TcMType.zonkTcTypeMapper.

  Not zonking these TcTyCons was actually a bug before.

* Simplify try_to_reduce_no_cache in TcFlatten (a lot)

* Combine checkExpectedKind and checkExpectedKindX.
  And then combine the invisible-binder instantation code
  Much simpler now.

* Fix a little bug in TcMType.skolemiseQuantifiedTyVar.
  I'm not sure how I came across this originally.

* Fix a little bug in TyCoRep.isUnliftedRuntimeRep
  (the ASSERT was over-zealous).  Again I'm not certain
  how I encountered this.

* Add a missing solveLocalEqualities in
  TcHsType.tcHsPartialSigType.
  I came across this when trying to get level numbers
  right.

7 months agoImplement -Wredundant-record-wildcards and -Wunused-record-wildcards
Matthew Pickering [Mon, 11 Feb 2019 09:24:04 +0000 (09:24 +0000)] 
Implement -Wredundant-record-wildcards and -Wunused-record-wildcards

-Wredundant-record-wildcards warns when a .. pattern binds no variables.

-Wunused-record-wildcards warns when none of the variables bound by a ..
pattern are used.

These flags are enabled by `-Wall`.

7 months agoNCG: fast compilation of very large strings (#16190)
Sylvain Henry [Mon, 11 Feb 2019 16:40:00 +0000 (17:40 +0100)] 
NCG: fast compilation of very large strings (#16190)

This patch adds an optimization into the NCG: for large strings
(threshold configurable via -fbinary-blob-threshold=NNN flag), instead
of printing `.asciz "..."` in the generated ASM source, we print
`.incbin "tmpXXX.dat"` and we dump the contents of the string into a
temporary "tmpXXX.dat" file.

See the note for more details.

7 months agoAdd perf test for #16190
Sylvain Henry [Mon, 11 Feb 2019 16:39:02 +0000 (17:39 +0100)] 
Add perf test for #16190

7 months agoAdd `liftedTyped` to `Lift` class
Alec Theriault [Mon, 11 Feb 2019 17:31:40 +0000 (09:31 -0800)] 
Add `liftedTyped` to `Lift` class

Implements GHC proposal 43, adding a `liftTyped` method to the `Lift` typeclass.
This also adds some documentation to `TExp`, describing typed splices and their
advantages over their untyped counterparts.

Resolves #14671.

7 months agoFix typos [skip ci]
Alexandre Esteves [Tue, 12 Feb 2019 17:17:21 +0000 (17:17 +0000)] 
Fix typos [skip ci]

7 months agoUpdate parallel submodule
Herbert Valerio Riedel [Mon, 11 Feb 2019 22:32:38 +0000 (23:32 +0100)] 
Update parallel submodule

7 months agoFix checkStackChunk() call in Interepter.c, enable an assertion
Ömer Sinan Ağacan [Mon, 11 Feb 2019 15:17:43 +0000 (18:17 +0300)] 
Fix checkStackChunk() call in Interepter.c, enable an assertion

Fixes #16303

7 months agoconfigure: Document CLANG, LLC, and OPT variables
Ben Gamari [Sat, 9 Feb 2019 22:34:36 +0000 (17:34 -0500)] 
configure: Document CLANG, LLC, and OPT variables

7 months agoFix #15849 by checking whether there's a do block
nineonine [Sat, 9 Feb 2019 08:20:19 +0000 (00:20 -0800)] 
Fix #15849 by checking whether there's a do block

7 months agoFix #16299 by deleting incorrect code from IfaceSyn
Ryan Scott [Sun, 10 Feb 2019 16:21:12 +0000 (11:21 -0500)] 
Fix #16299 by deleting incorrect code from IfaceSyn

GHCi's `:info` command was pretty-printing Haskell98-style data types
with explicit return kinds if the return kind wasn't `Type`. This
leads to bizarre output like this:

```
λ> :i (##)
data (##) :: TYPE ('GHC.Types.TupleRep '[]) = (##)
        -- Defined in ‘GHC.Prim’
```

Or, with unlifted newtypes:

```
λ> newtype T = MkT Int#
λ> :i T
newtype T :: TYPE 'IntRep = MkT Int#
        -- Defined at <interactive>:5:1
```

The solution is simple: just delete one part from `IfaceSyn` where
GHC mistakenly pretty-prints the return kinds for non-GADTs.

7 months agoFix #16188
Richard Eisenberg [Fri, 18 Jan 2019 00:17:02 +0000 (17:17 -0700)] 
Fix #16188

There was an awful lot of zipping going on in
canDecomposableTyConAppOK, and one of the lists being zipped
was too short, causing the result to be too short. Easily
fixed.

Also fixes #16204 and #16225

test case: typecheck/should_compile/T16188
           typecheck/should_compile/T16204[ab]
           typecheck/should_fail/T16204c
           typecheck/should_compile/T16225

7 months agoFix #16293 by cleaning up Proxy# infelicities
Ryan Scott [Sat, 9 Feb 2019 14:50:42 +0000 (09:50 -0500)] 
Fix #16293 by cleaning up Proxy# infelicities

This bug fixes three problems related to `Proxy#`/`proxy#`:

1. Reifying it with TH claims that the `Proxy#` type constructor has
   two arguments, but that ought to be one for consistency with
   TH's treatment for other primitive type constructors like `(->)`.
   This was fixed by just returning the number of
   `tyConVisibleTyVars` instead of using `tyConArity` (which includes
   invisible arguments).
2. The role of `Proxy#`'s visible argument was hard-coded as nominal.
   Easily fixed by changing it to phantom.
3. The visibility of `proxy#`'s kind argument was specified, which
   is different from the `Proxy` constructor (which treats it as
   inferred). Some minor refactoring in `proxyHashId` fixed ths up.

   Along the way, I had to introduce a `mkSpecForAllTy` function, so
   I did some related Haddock cleanup in `Type`, where that function
   lives.

7 months agoAdd explicit dependencies to cleanup-darwin
Matthew Pickering [Fri, 8 Feb 2019 15:54:41 +0000 (10:54 -0500)] 
Add explicit dependencies to cleanup-darwin

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

7 months agotestsuite: Report unexpected passes in junit output
Matthew Pickering [Sun, 10 Feb 2019 21:59:38 +0000 (21:59 +0000)] 
testsuite: Report unexpected passes in junit output

7 months agoHadrian: add LLVM flavours
Alec Theriault [Wed, 30 Jan 2019 02:33:20 +0000 (18:33 -0800)] 
Hadrian: add LLVM flavours

This adds a handful of LLVM flavours and the accompanying
documentation. These flavours are mostly uninteresting, but
exist in the Make system.

7 months agoFix Int overflow on 32 bit platform
Peter Trommler [Wed, 6 Feb 2019 21:31:20 +0000 (22:31 +0100)] 
Fix Int overflow on 32 bit platform

7 months agotestsuite: Always skip T15897
Ben Gamari [Tue, 5 Feb 2019 03:02:52 +0000 (22:02 -0500)] 
testsuite: Always skip T15897

See #16193.

7 months agotestsuite: Report stdout and stderr in JUnit output
Ben Gamari [Thu, 24 Jan 2019 19:20:11 +0000 (14:20 -0500)] 
testsuite: Report stdout and stderr in JUnit output

This patch makes the JUnit output more useful as now we also report the
stdout/stderr in the message which can be used to quickly identify why a
test is failing without downloading the log.

This also introduces TestResult,
previously we were simply passing around tuples, making things the
implementation rather difficult to follow and harder to extend.

7 months agoCapture and simplify constraints arising from running typed splices
Matthew Pickering [Sun, 3 Feb 2019 11:46:28 +0000 (11:46 +0000)] 
Capture and simplify constraints arising from running typed splices

This fixes a regression caused by #15471 where splicing in a trivial
program such as `[|| return () ||]` would fail as the dictionary for
`return` would never get bound in the module containing the splice.

Arguably this is symptomatic of a major problem affecting TTH where we
serialise renamed asts and then retype check them. The reference to the
dictionary should be fully determined at the quote site so that splicing
doesn't have to solve any implicits at all. It's a coincidence this
works due to coherence but see #15863 and #15865 for examples where
things do go very wrong.

Fixes #16195

7 months agoRemove ghctags (#16274)
Sylvain Henry [Thu, 7 Feb 2019 00:02:04 +0000 (01:02 +0100)] 
Remove ghctags (#16274)

7 months agoMake CI via Hadrian build docs
Alec Theriault [Tue, 29 Jan 2019 08:54:10 +0000 (00:54 -0800)] 
Make CI via Hadrian build docs

7 months agoFix invalid doc comment
Alec Theriault [Tue, 29 Jan 2019 08:35:24 +0000 (00:35 -0800)] 
Fix invalid doc comment

The invalid doc comments were exposed by 24b39ce53eedad4cefc30f6786542d2072d1f9b0.
The fix is to properly escaped the `{-` and `-}` in the doc comments.
Some other miscallaneous markup issues are also fixed.

7 months agoFix inverted position pragma flag in parser API
Alec Theriault [Tue, 29 Jan 2019 06:11:08 +0000 (22:11 -0800)] 
Fix inverted position pragma flag in parser API

The behviour of `lexTokenStream` around position pragma was
accidentally inverted in 469fe6133646df5568c9486de2202124cb734242.
This fixes that bug.

This also unbreaks #16239.

7 months agoUpgrade to the latest stack resolver
Neil Mitchell [Thu, 7 Feb 2019 14:50:47 +0000 (14:50 +0000)] 
Upgrade to the latest stack resolver

7 months agoSimplify the build.stack.bat script to use 'stack run'
Neil Mitchell [Thu, 7 Feb 2019 14:49:33 +0000 (14:49 +0000)] 
Simplify the build.stack.bat script to use 'stack run'

7 months agoImprove snocView implementation.
klebinger.andreas@gmx.at [Tue, 22 Jan 2019 15:17:40 +0000 (16:17 +0100)] 
Improve snocView implementation.

The new implementation isn't tailrecursive and instead
builds up the initial part of the list as it goes.

This improves allocation numbers as we don't build up an intermediate
list just to reverse it later.

This is slightly slower for lists of size <= 3. But in benchmarks
significantly faster for any list above 5 elements, assuming the
majority of the resulting list will be evaluated.

7 months agoReplace a few uses of snocView with last/lastMaybe.
klebinger.andreas@gmx.at [Mon, 21 Jan 2019 16:55:22 +0000 (17:55 +0100)] 
Replace a few uses of snocView with last/lastMaybe.

These never used the first part of the result from snocView.
Hence replacing them with last[Maybe] is both clearer and
gives better performance.

7 months agoStack: fix name mangling.
Tamar Christina [Sun, 27 Jan 2019 15:54:36 +0000 (15:54 +0000)] 
Stack: fix name mangling.

7 months agoMinor refactor of CUSK handling
Simon Peyton Jones [Thu, 7 Feb 2019 09:51:36 +0000 (09:51 +0000)] 
Minor refactor of CUSK handling

Previously, in getFamDeclInitialKind, we were figuring
out whether the enclosing class decl had a CUSK very
indirectly, via tcTyConIsPoly.  This patch just makes
the computation much more direct and easy to grok.

No change in behaviour.

7 months agoComments only about the binder-swap in OccurAnal
Simon Peyton Jones [Thu, 7 Feb 2019 08:46:48 +0000 (08:46 +0000)] 
Comments only about the binder-swap in OccurAnal

7 months agoComments only
Simon Peyton Jones [Fri, 18 Jan 2019 17:12:13 +0000 (17:12 +0000)] 
Comments only

7 months agoRemove a few undefined prel names
Ömer Sinan Ağacan [Wed, 6 Feb 2019 07:26:00 +0000 (10:26 +0300)] 
Remove a few undefined prel names

- breakpointAuto
- breakpointJump
- breakpointCondJump
- breakpointAutoJump

These Ids are never defined, but there were definitions about those in
PrelNames. Those are now removed.

7 months agoFix optSemi type in Parser.y
Vladislav Zavialov [Wed, 6 Feb 2019 01:01:36 +0000 (20:01 -0500)] 
Fix optSemi type in Parser.y

The definition of 'optSemi' claimed it had type

([Located a],Bool)

Note that its production actually returns ([Located Token],Bool):

  : ';' { ([$1],True) }   -- $1 :: Located Token

Due to an infelicity in the implementation of 'happy -c', it effectively
resulted in 'unsafeCoerce :: Token -> a'.
See https://github.com/simonmar/happy/pull/134

If any consumer of 'optSemi' tried to instantiate 'a' to something not
representationally equal to 'Token', they would experience a segfault.

In addition to that, this definition made it impossible to compile Parser.y
without the -c flag (as it's reliant on this bug to cast 'Token' to 'forall
a. a').

7 months agoCleanup in parser/Ctype.hs
Sylvain Henry [Tue, 5 Feb 2019 14:55:03 +0000 (15:55 +0100)] 
Cleanup in parser/Ctype.hs

* GHC now performs constant folding on bit operations like (.|.) so we
use them and we remove the misleading comment

* we use Word8 instead of Int and we remove the useless conversion to
Int32. Hopefully future releases of GHC could transform the big case in
`charType` into a value table indexing instead of a jump table. Word8
would make the table smaller.

* we use INLINABLE pragma instead of INLINE on `is_ctype`: in my test,
the latter *prevents* `is_ctype` to be inlined because `charType` is
inlined into `is_ctype` (to call charType`s worker on the unboxed Char
directly).

7 months agorts/ProfilerReportJson: Fix format string
Ben Gamari [Tue, 5 Feb 2019 02:42:41 +0000 (21:42 -0500)] 
rts/ProfilerReportJson: Fix format string

This was warning on i386.

7 months agoLexer: Alternate Layout Rule injects actual not virtual braces
Alan Zimmerman [Sun, 3 Feb 2019 08:27:42 +0000 (10:27 +0200)] 
Lexer: Alternate Layout Rule injects actual not virtual braces

When the alternate layout rule is activated via a pragma, it injects
tokens for { and } to make sure that the source is parsed properly.

But it injects ITocurly and ITccurly, rather than their virtual
counterparts ITvocurly and ITvccurly.

This causes problems for ghc-exactprint, which tries to print these.

Likewise, any injected ITsemi should have a zero-width SrcSpan.

Test case (the existing T13087.hs)

    {-# LANGUAGE AlternativeLayoutRule #-}
    {-# LANGUAGE LambdaCase            #-}

    isOne :: Int -> Bool
    isOne = \case 1 -> True
                  _ -> False

    main = return ()

Closes #16279

7 months agoAPI Annotations: parens anns discarded for `(*)` operator
Alan Zimmerman [Sat, 2 Feb 2019 14:29:05 +0000 (16:29 +0200)] 
API Annotations: parens anns discarded for `(*)` operator

The patch from https://phabricator.haskell.org/D4865 introduces

    go _ (HsParTy _ (dL->L l (HsStarTy _ isUni))) acc ann fix
      = do { warnStarBndr l
           ; let name = mkOccName tcClsName (if isUni then "★" else "*")
           ; return (cL l (Unqual name), acc, fix, ann) }

which discards the parens annotations belonging to the HsParTy.

Updates haddock submodule

Closes #16265

7 months agoAPI Annotations: AnnAt disconnected for TYPEAPP
Alan Zimmerman [Wed, 30 Jan 2019 14:20:52 +0000 (16:20 +0200)] 
API Annotations: AnnAt disconnected for TYPEAPP

For the code

    type family F1 (a :: k) (f :: k -> Type) :: Type where
      F1 @Peano a f = T @Peano f a

the API annotation for the first @ is not attached to a SourceSpan in
the ParsedSource

Closes #16236

7 months agoAPI Annotations: more explicit foralls fixup
Alan Zimmerman [Thu, 24 Jan 2019 21:22:59 +0000 (23:22 +0200)] 
API Annotations: more explicit foralls fixup

The AnnForall annotations introduced via Phab:D4894 are not always
attached to the correct SourceSpan.

Closes #16230

7 months agoImplicitParams does not imply FlexibleContexts or FlexibleInstances, fixes #16248
Neil Mitchell [Sun, 3 Feb 2019 20:45:12 +0000 (15:45 -0500)] 
ImplicitParams does not imply FlexibleContexts or FlexibleInstances, fixes #16248

7 months agoUpdate directory submodule
Herbert Valerio Riedel [Fri, 1 Feb 2019 21:48:07 +0000 (22:48 +0100)] 
Update directory submodule

7 months agoUpdate filepath submodule
Herbert Valerio Riedel [Fri, 1 Feb 2019 21:48:40 +0000 (22:48 +0100)] 
Update filepath submodule

7 months agoAdd a changelog for base 4.14.0.0
Langston Barrett [Mon, 4 Feb 2019 16:59:56 +0000 (08:59 -0800)] 
Add a changelog for base 4.14.0.0

7 months agoTestEquality instance for Compose
Langston Barrett [Fri, 1 Feb 2019 20:33:38 +0000 (12:33 -0800)] 
TestEquality instance for Compose

7 months agoFix test for T16180 on Darwin (fix #16128)
Sylvain Henry [Tue, 29 Jan 2019 01:14:12 +0000 (02:14 +0100)] 
Fix test for T16180 on Darwin (fix #16128)

7 months agoHadrian: compile libgmp static on Windows
Tamar Christina [Sun, 27 Jan 2019 21:30:50 +0000 (21:30 +0000)] 
Hadrian: compile libgmp static on Windows

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

7 months agoAllow resizing the stack for the graph allocator.
klebinger.andreas@gmx.at [Fri, 25 Jan 2019 23:26:02 +0000 (00:26 +0100)] 
Allow resizing the stack for the graph allocator.

The graph allocator now dynamically resizes the number of stack
slots when running into the limit.

This fixes #8657.

Also loop membership of basic blocks is now available
in the register allocator for cost heuristics.

7 months agoFix #14729 by making the normaliser homogeneous
Richard Eisenberg [Thu, 24 Jan 2019 15:22:58 +0000 (10:22 -0500)] 
Fix #14729 by making the normaliser homogeneous

This ports the fix to #12919 to the normaliser. (#12919 was about
the flattener.) Because the fix is involved, this is done by
moving the critical piece of code to Coercion, and then calling
this from both the flattener and the normaliser.

The key bit is: simplifying type families in a type is always
a *homogeneous* operation. See #12919 for a discussion of why
this is the Right Way to simplify type families.

Also fixes #15549.

test case: dependent/should_compile/T14729{,kind}
           typecheck/should_compile/T15549[ab]

7 months agotestsuite: Mark T5515 as broken with debugged compiler
Ben Gamari [Mon, 28 Jan 2019 21:58:15 +0000 (16:58 -0500)] 
testsuite: Mark T5515 as broken with debugged compiler

As noted in #16251.

7 months agotestsuite: Mark T14740 and tcfail159 as broken in debugged compiler
Ben Gamari [Sun, 30 Dec 2018 18:32:50 +0000 (13:32 -0500)] 
testsuite: Mark T14740 and tcfail159 as broken in debugged compiler

As noted in #16113, these trigger an assertion in isUnliftedRuntimeRep.

7 months agotestsuite: Mark recomp007 as broken in debugged compiler
Ben Gamari [Sun, 30 Dec 2018 18:30:32 +0000 (13:30 -0500)] 
testsuite: Mark recomp007 as broken in debugged compiler

As noted in #14759, this triggers a warning in ListSetOps.

7 months agotestsuite: Mark T11334b as broken in debugged compiler
Ben Gamari [Sun, 30 Dec 2018 18:28:07 +0000 (13:28 -0500)] 
testsuite: Mark T11334b as broken in debugged compiler

As noted in #16112.

7 months agoRevert "gitlab-ci: More aggressive artifact expiration"
Matthew Pickering [Sun, 3 Feb 2019 11:30:49 +0000 (11:30 +0000)] 
Revert "gitlab-ci: More aggressive artifact expiration"

This reverts commit d87b38a2519212aaf8bad927c65abecc509a7212.

7 months agogitlab-ci: More aggressive artifact expiration
Ben Gamari [Sun, 30 Dec 2018 18:22:38 +0000 (13:22 -0500)] 
gitlab-ci: More aggressive artifact expiration

7 months agogitlab-ci: Add a devel2 build
Ben Gamari [Sat, 22 Dec 2018 05:59:43 +0000 (00:59 -0500)] 
gitlab-ci: Add a devel2 build

7 months agoFix #16287 by checking for more unsaturated synonym arguments
Ryan Scott [Tue, 5 Feb 2019 13:50:59 +0000 (08:50 -0500)] 
Fix #16287 by checking for more unsaturated synonym arguments

Trac #16287 shows that we were checking for unsaturated type synonym
arguments (in `:kind`) when the argument was to a type synonym, but
_not_ when the argument was to some other form of type constructor,
such as a data type. The solution is to use the machinery that
rejects unsaturated type synonym arguments (previously confined to
`check_syn_tc_app`) to `check_arg_type`, which checks these other
forms of arguments. While I was in town, I cleaned up
`check_syn_tc_app` a bit to only invoke `check_arg_type` so as to
minimize the number of different code paths that that function could
go down.

7 months agoAdd int-index as parser/* codeowner
Vladislav Zavialov [Sun, 3 Feb 2019 20:50:58 +0000 (15:50 -0500)] 
Add int-index as parser/* codeowner

7 months agoFix #14579 by defining tyConAppNeedsKindSig, and using it
Ryan Scott [Wed, 6 Feb 2019 00:57:29 +0000 (19:57 -0500)] 
Fix #14579 by defining tyConAppNeedsKindSig, and using it

7 months agoRefactor splice_exp in Parser.y
Vladislav Zavialov [Fri, 1 Feb 2019 06:25:45 +0000 (09:25 +0300)] 
Refactor splice_exp in Parser.y

7 months agoAdd `-fplugin-trustworthy` to avoid marking modules as unsafe
Zejun Wu [Thu, 31 Jan 2019 06:13:42 +0000 (22:13 -0800)] 
Add `-fplugin-trustworthy` to avoid marking modules as unsafe

By default, when a module is compiled with plugins, it will be marked as
unsafe. With this flag passed, all plugins are treated as trustworthy
and the safety inference will no longer be affected.

This fixes Trac #16260.

7 months agogitlab-ci: Don't allow x86_64-linux-deb9-llvm to fail
Ben Gamari [Tue, 29 Jan 2019 00:26:57 +0000 (19:26 -0500)] 
gitlab-ci: Don't allow x86_64-linux-deb9-llvm to fail

7 months agotestsuite: Mark print037 as broken when GHC is built with LLVM
Ben Gamari [Tue, 29 Jan 2019 00:26:10 +0000 (19:26 -0500)] 
testsuite: Mark print037 as broken when GHC is built with LLVM

As noted in #16205 this configuration reliably segfaults.

7 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

7 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.

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

7 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.

7 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

7 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.

7 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.

7 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

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

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

7 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]

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

[skip ci]

7 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

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

7 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 <ezyang@fb.com>
Test Plan: validate

Reviewers: simonpj, bgamari

Reviewed By: bgamari

Subscribers: rwbarton, carter

GHC Trac Issues: #16219

Differential Revision: https://phabricator.haskell.org/D5475

7 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.

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

7 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/windows.md` 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.

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

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

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

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

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

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

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