ghc.git
4 years agoBump submodule libraries/Cabal for new extension
Richard Eisenberg [Thu, 6 Aug 2015 13:56:07 +0000 (09:56 -0400)] 
Bump submodule libraries/Cabal for new extension

4 years agoStub for manual entry
Richard Eisenberg [Thu, 6 Aug 2015 13:55:53 +0000 (09:55 -0400)] 
Stub for manual entry

4 years agoTestsuite wibbles
Richard Eisenberg [Thu, 6 Aug 2015 13:42:02 +0000 (09:42 -0400)] 
Testsuite wibbles

4 years agoComments only
Richard Eisenberg [Wed, 5 Aug 2015 17:27:48 +0000 (13:27 -0400)] 
Comments only

4 years agoMove Note [Visible type application]
Richard Eisenberg [Wed, 5 Aug 2015 17:20:30 +0000 (13:20 -0400)] 
Move Note [Visible type application]

4 years agoTest pushing into conditionals
Richard Eisenberg [Wed, 5 Aug 2015 17:17:38 +0000 (13:17 -0400)] 
Test pushing into conditionals

4 years agoComments only
Richard Eisenberg [Wed, 5 Aug 2015 17:10:52 +0000 (13:10 -0400)] 
Comments only

4 years agoRefactor overloaded literals back to Inst
Richard Eisenberg [Wed, 5 Aug 2015 16:47:27 +0000 (12:47 -0400)] 
Refactor overloaded literals back to Inst

4 years agoTestsuite wibbles
Richard Eisenberg [Wed, 5 Aug 2015 16:31:47 +0000 (12:31 -0400)] 
Testsuite wibbles

4 years agoWorkin' the testsuite
Richard Eisenberg [Wed, 5 Aug 2015 16:28:19 +0000 (12:28 -0400)] 
Workin' the testsuite

4 years agoTestsuite wibbles
Richard Eisenberg [Wed, 5 Aug 2015 15:54:18 +0000 (11:54 -0400)] 
Testsuite wibbles

4 years agoArgument types *can* get instantiated.
Richard Eisenberg [Wed, 5 Aug 2015 15:52:23 +0000 (11:52 -0400)] 
Argument types *can* get instantiated.

4 years agoMore info with Shouldn'tHappenOrigin
Richard Eisenberg [Wed, 5 Aug 2015 15:37:09 +0000 (11:37 -0400)] 
More info with Shouldn'tHappenOrigin

4 years agoTestsuite wibbles
Richard Eisenberg [Wed, 5 Aug 2015 15:36:54 +0000 (11:36 -0400)] 
Testsuite wibbles

4 years agoRemove the abominable matchExpectedFunTys_Args
Richard Eisenberg [Wed, 5 Aug 2015 15:10:46 +0000 (11:10 -0400)] 
Remove the abominable matchExpectedFunTys_Args

4 years agoMove visible type app stuff from TcUnify to TcExpr
Richard Eisenberg [Wed, 5 Aug 2015 14:49:29 +0000 (10:49 -0400)] 
Move visible type app stuff from TcUnify to TcExpr

4 years agoRemove unused def'n in hs-boot file
Richard Eisenberg [Wed, 5 Aug 2015 14:39:33 +0000 (10:39 -0400)] 
Remove unused def'n in hs-boot file

4 years agoTestsuite wibbles
Richard Eisenberg [Wed, 5 Aug 2015 13:28:20 +0000 (09:28 -0400)] 
Testsuite wibbles

4 years agoError message tweak
Richard Eisenberg [Wed, 5 Aug 2015 13:25:34 +0000 (09:25 -0400)] 
Error message tweak

4 years agoTestsuite wibbles
Richard Eisenberg [Wed, 5 Aug 2015 12:40:49 +0000 (08:40 -0400)] 
Testsuite wibbles

4 years agoTestsuite wibbles
Richard Eisenberg [Wed, 5 Aug 2015 12:36:20 +0000 (08:36 -0400)] 
Testsuite wibbles

4 years agoWibble to TypeEqOrigin for better errors
Richard Eisenberg [Wed, 5 Aug 2015 12:36:00 +0000 (08:36 -0400)] 
Wibble to TypeEqOrigin for better errors

4 years agoTestsuite wibbles
Richard Eisenberg [Wed, 5 Aug 2015 12:31:09 +0000 (08:31 -0400)] 
Testsuite wibbles

4 years agoPreserve yet more synonyms
Richard Eisenberg [Wed, 5 Aug 2015 12:16:58 +0000 (08:16 -0400)] 
Preserve yet more synonyms

4 years agoTestsuite wibbles
Richard Eisenberg [Wed, 5 Aug 2015 12:03:18 +0000 (08:03 -0400)] 
Testsuite wibbles

4 years agoAvoid expanding synonyms in tcSubType
Richard Eisenberg [Wed, 5 Aug 2015 03:14:35 +0000 (23:14 -0400)] 
Avoid expanding synonyms in tcSubType

4 years agoTestsuite wibble
Richard Eisenberg [Wed, 5 Aug 2015 03:04:20 +0000 (23:04 -0400)] 
Testsuite wibble

4 years agoTrack full type better in matchExpectedFunTys
Richard Eisenberg [Wed, 5 Aug 2015 02:59:09 +0000 (22:59 -0400)] 
Track full type better in matchExpectedFunTys

4 years agoTestsuite wibbles
Richard Eisenberg [Wed, 5 Aug 2015 02:38:11 +0000 (22:38 -0400)] 
Testsuite wibbles

4 years agoMore error improving
Richard Eisenberg [Wed, 5 Aug 2015 02:23:30 +0000 (22:23 -0400)] 
More error improving

4 years agoTestsuite wibbles
Richard Eisenberg [Wed, 5 Aug 2015 02:18:15 +0000 (22:18 -0400)] 
Testsuite wibbles

4 years agoCleverly use a *landmark* context when it might be empty
Richard Eisenberg [Wed, 5 Aug 2015 02:04:45 +0000 (22:04 -0400)] 
Cleverly use a *landmark* context when it might be empty

4 years agoImprove ddump-tc-trace in TcErrors
Richard Eisenberg [Wed, 5 Aug 2015 01:36:45 +0000 (21:36 -0400)] 
Improve ddump-tc-trace in TcErrors

4 years agoImprove error messages
Richard Eisenberg [Wed, 5 Aug 2015 01:34:41 +0000 (21:34 -0400)] 
Improve error messages

4 years agoPropagate CtOrigins for better errors
Richard Eisenberg [Tue, 4 Aug 2015 15:47:18 +0000 (11:47 -0400)] 
Propagate CtOrigins for better errors

4 years agoStart toward tracking origins better
Richard Eisenberg [Thu, 9 Jul 2015 19:52:26 +0000 (15:52 -0400)] 
Start toward tracking origins better

4 years agoUse a Flexi, not a ReturnTv, when checking seq.
Richard Eisenberg [Wed, 29 Jul 2015 21:16:38 +0000 (17:16 -0400)] 
Use a Flexi, not a ReturnTv, when checking seq.

4 years agoFix broken test code
Richard Eisenberg [Wed, 29 Jul 2015 21:03:18 +0000 (17:03 -0400)] 
Fix broken test code

4 years agoInstantiate scrutinees.
Richard Eisenberg [Wed, 29 Jul 2015 19:49:39 +0000 (15:49 -0400)] 
Instantiate scrutinees.

4 years agoAvoid unnecessary call to tcSubType
Richard Eisenberg [Wed, 29 Jul 2015 19:41:06 +0000 (15:41 -0400)] 
Avoid unnecessary call to tcSubType

The unnecessary call resulted in an unexpected ambiguity check.

4 years agoInstantiate when inferring types
Richard Eisenberg [Wed, 29 Jul 2015 19:19:38 +0000 (15:19 -0400)] 
Instantiate when inferring types

4 years agoNew test
Richard Eisenberg [Wed, 29 Jul 2015 19:19:23 +0000 (15:19 -0400)] 
New test

4 years agoFix bug in TcLambdaCase
Richard Eisenberg [Wed, 15 Jul 2015 17:23:56 +0000 (13:23 -0400)] 
Fix bug in TcLambdaCase

4 years agoAdd new test to all.T
Richard Eisenberg [Fri, 10 Jul 2015 17:03:14 +0000 (13:03 -0400)] 
Add new test to all.T

4 years agoAdd another test case
Richard Eisenberg [Fri, 10 Jul 2015 16:48:39 +0000 (12:48 -0400)] 
Add another test case

4 years agobug in test case
Richard Eisenberg [Fri, 10 Jul 2015 16:47:48 +0000 (12:47 -0400)] 
bug in test case

4 years agoPropagate polytypes into if and case.
Richard Eisenberg [Fri, 10 Jul 2015 14:15:15 +0000 (10:15 -0400)] 
Propagate polytypes into if and case.

4 years agoTypeApplications implies AllowAmbiguousTypes
Richard Eisenberg [Fri, 10 Jul 2015 03:05:54 +0000 (23:05 -0400)] 
TypeApplications implies AllowAmbiguousTypes

4 years agoSupport wildcards in type applications
Richard Eisenberg [Fri, 10 Jul 2015 01:46:54 +0000 (21:46 -0400)] 
Support wildcards in type applications

4 years agoSuggest TypeApplications when it's off
Richard Eisenberg [Fri, 10 Jul 2015 01:01:28 +0000 (21:01 -0400)] 
Suggest TypeApplications when it's off

4 years agoImported ids without signatures are still inferred.
Richard Eisenberg [Fri, 10 Jul 2015 00:08:47 +0000 (20:08 -0400)] 
Imported ids without signatures are still inferred.

4 years agoRemove SkolemiseMode -- always go deep.
Richard Eisenberg [Thu, 9 Jul 2015 18:39:16 +0000 (14:39 -0400)] 
Remove SkolemiseMode -- always go deep.

4 years agoBugfixing
Richard Eisenberg [Thu, 9 Jul 2015 18:35:15 +0000 (14:35 -0400)] 
Bugfixing

4 years agoVTA tests work
Richard Eisenberg [Thu, 9 Jul 2015 17:57:48 +0000 (13:57 -0400)] 
VTA tests work

4 years agoStage 2 succeeds
Richard Eisenberg [Thu, 9 Jul 2015 17:40:56 +0000 (13:40 -0400)] 
Stage 2 succeeds

4 years agoFix [OpenTypeKind accepts foralls]
Richard Eisenberg [Thu, 9 Jul 2015 17:20:43 +0000 (13:20 -0400)] 
Fix [OpenTypeKind accepts foralls]

4 years agoComments only
Richard Eisenberg [Thu, 9 Jul 2015 17:13:13 +0000 (13:13 -0400)] 
Comments only

4 years ago*** Use global url for .gitmodules
Richard Eisenberg [Thu, 9 Jul 2015 03:24:56 +0000 (23:24 -0400)] 
*** Use global url for .gitmodules

4 years ago`base` compiles
Richard Eisenberg [Thu, 9 Jul 2015 02:17:07 +0000 (22:17 -0400)] 
`base` compiles

4 years agoUndoing some changes
Richard Eisenberg [Wed, 8 Jul 2015 20:41:33 +0000 (16:41 -0400)] 
Undoing some changes

4 years agoCheckpoint in bugfixing
Richard Eisenberg [Wed, 8 Jul 2015 18:33:54 +0000 (14:33 -0400)] 
Checkpoint in bugfixing

4 years agoMassive simplification: always deeply skolemise
Richard Eisenberg [Wed, 8 Jul 2015 13:12:34 +0000 (09:12 -0400)] 
Massive simplification: always deeply skolemise

4 years agoYet another checkpoint
Richard Eisenberg [Wed, 8 Jul 2015 03:51:50 +0000 (23:51 -0400)] 
Yet another checkpoint

4 years agoCheckpoint in more undoing.
Richard Eisenberg [Wed, 8 Jul 2015 03:39:03 +0000 (23:39 -0400)] 
Checkpoint in more undoing.

4 years agoCheckpoint on undoing a lot of sigma-type stuff.
Richard Eisenberg [Wed, 8 Jul 2015 03:29:20 +0000 (23:29 -0400)] 
Checkpoint on undoing a lot of sigma-type stuff.

4 years agoSome bugfixing
Richard Eisenberg [Wed, 8 Jul 2015 02:05:59 +0000 (22:05 -0400)] 
Some bugfixing

4 years agoWorking on failing test
Richard Eisenberg [Thu, 2 Jul 2015 03:56:57 +0000 (23:56 -0400)] 
Working on failing test

4 years agoVta1 passes
Richard Eisenberg [Wed, 1 Jul 2015 21:29:18 +0000 (17:29 -0400)] 
Vta1 passes

4 years agoCheckpoint in bugfixing
Richard Eisenberg [Wed, 1 Jul 2015 21:14:37 +0000 (17:14 -0400)] 
Checkpoint in bugfixing

4 years agoSome bugfixing
Richard Eisenberg [Wed, 1 Jul 2015 16:09:16 +0000 (12:09 -0400)] 
Some bugfixing

4 years agoIn the process of eager skolemisation
Richard Eisenberg [Wed, 1 Jul 2015 12:29:32 +0000 (08:29 -0400)] 
In the process of eager skolemisation

4 years agoIt compiles.
Richard Eisenberg [Tue, 30 Jun 2015 21:25:02 +0000 (17:25 -0400)] 
It compiles.

4 years agoStarting to compile.
Richard Eisenberg [Tue, 30 Jun 2015 20:07:56 +0000 (16:07 -0400)] 
Starting to compile.

4 years agoMidway through redesign of the type inference alg.
Richard Eisenberg [Tue, 30 Jun 2015 03:28:47 +0000 (23:28 -0400)] 
Midway through redesign of the type inference alg.

4 years agoTestsuite stuff from previous commit
Richard Eisenberg [Sun, 28 Jun 2015 20:55:09 +0000 (16:55 -0400)] 
Testsuite stuff from previous commit

4 years agoRetain System naems until the end of typechecking
Richard Eisenberg [Sun, 28 Jun 2015 17:53:32 +0000 (13:53 -0400)] 
Retain System naems until the end of typechecking

4 years agoOnly thing left is the typechecker
Richard Eisenberg [Sat, 27 Jun 2015 16:50:20 +0000 (12:50 -0400)] 
Only thing left is the typechecker

4 years agoLexing/parsing complete.
Richard Eisenberg [Sat, 27 Jun 2015 16:01:50 +0000 (12:01 -0400)] 
Lexing/parsing complete.

4 years agoAdd VTA tests
Richard Eisenberg [Fri, 26 Jun 2015 21:12:57 +0000 (17:12 -0400)] 
Add VTA tests

4 years agoRemove vestigial prefixq{var,con}sym from parser.
Richard Eisenberg [Sat, 27 Jun 2015 16:55:36 +0000 (12:55 -0400)] 
Remove vestigial prefixq{var,con}sym from parser.

4 years agoTest Trac #10524
Simon Peyton Jones [Fri, 26 Jun 2015 15:00:45 +0000 (16:00 +0100)] 
Test Trac #10524

4 years agoImprove error message for Typeable k (T k)
Simon Peyton Jones [Fri, 26 Jun 2015 15:00:19 +0000 (16:00 +0100)] 
Improve error message for Typeable k (T k)

GHC can't yest build a TypeRep for a type involving kind variables.
(We await kinds = types for that.)  But the error message was terrible,
as fixing #10524 reminded me.

This improves it a lot.

4 years agoBetter tracing and tiny refactoring
Simon Peyton Jones [Fri, 26 Jun 2015 14:57:28 +0000 (15:57 +0100)] 
Better tracing and tiny refactoring

4 years agoMake fvType ignore kinds
Simon Peyton Jones [Fri, 26 Jun 2015 14:56:35 +0000 (15:56 +0100)] 
Make fvType ignore kinds

TcValidity.fvTypes works in partnership with sizeTypes, and
hence should ignore kinds in exactly the same way.  It wasn't
doing so, which meant that validDerivPred said "No" when it
should have said "Yes". That led to the bug reported in
Trac #10524 comment:7.

The error message is pretty terrible
  No instance for (Typeable T)
but I'll fix that next

4 years agoKill off sizePred
Simon Peyton Jones [Fri, 26 Jun 2015 13:34:42 +0000 (14:34 +0100)] 
Kill off sizePred

It really isn't needed, and life is simpler without

4 years agocloseOverKinds *before* oclose in coverage check
Simon Peyton Jones [Fri, 26 Jun 2015 13:28:45 +0000 (14:28 +0100)] 
closeOverKinds *before* oclose in coverage check

Combining functional dependencies with kind-polymorphism is
devilishly tricky!  It's all documented in
    Note [Closing over kinds in coverage]

Fixes Trac #10564

4 years agoImprove CPR behavior for strict constructors
Simon Peyton Jones [Fri, 26 Jun 2015 10:40:01 +0000 (11:40 +0100)] 
Improve CPR behavior for strict constructors

When working on Trac #10482 I noticed that we could give constructor
arguments the CPR property if they are use strictly.

This is documented carefully in
    Note [CPR in a product case alternative]
and also
    Note [Initial CPR for strict binders]

There are a bunch of intersting examples in
    Note [CPR examples]
which I have added to the test suite as T10482a.

I also added a test for #10482 itself.

4 years agoSmall doc fixes
Simon Peyton Jones [Fri, 26 Jun 2015 10:36:02 +0000 (11:36 +0100)] 
Small doc fixes

4 years agoComments only
Simon Peyton Jones [Fri, 26 Jun 2015 07:35:11 +0000 (08:35 +0100)] 
Comments only

4 years agoGHCi docs: layout rule is respected inside :{ :}
Thomas Miedema [Wed, 24 Jun 2015 10:52:16 +0000 (12:52 +0200)] 
GHCi docs: layout rule is respected inside :{ :}

Summary:
I don't know if or when this changed, but the documentation on :{ :}
(multiline input) seems out of date. Layout rule works fine. I added a
regression test.

Reviewers: austin

Subscribers: thomie, bgamari

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

4 years agoFix deadlock (#10545)
Simon Marlow [Fri, 19 Jun 2015 14:12:24 +0000 (15:12 +0100)] 
Fix deadlock (#10545)

yieldCapability() was not prepared to be called by a Task that is not
either a worker or a bound Task.  This could happen if we ended up in
yieldCapability via this call stack:

performGC()
scheduleDoGC()
requestSync()
yieldCapability()

and there were a few other ways this could happen via requestSync.
The fix is to handle this case in yieldCapability(): when the Task is
not a worker or a bound Task, we put it on the returning_workers
queue, where it will be woken up again.

Summary of changes:

* `yieldCapability`: factored out subroutine waitForWorkerCapability`
* `waitForReturnCapability` renamed to `waitForCapability`, and
  factored out subroutine `waitForReturnCapability`
* `releaseCapabilityAndQueue` worker renamed to `enqueueWorker`, does
  not take a lock and no longer tests if `!isBoundTask()`
* `yieldCapability` adjusted for refactorings, only change in behavior
  is when it is not a worker or bound task.

Test Plan:
* new test concurrent/should_run/performGC
* validate

Reviewers: niteria, austin, ezyang, bgamari

Subscribers: thomie, bgamari

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

GHC Trac Issues: #10545

4 years agoFix for crash in setnumcapabilities001
Simon Marlow [Fri, 19 Jun 2015 13:41:32 +0000 (14:41 +0100)] 
Fix for crash in setnumcapabilities001

getNewNursery() was unconditionally incrementing next_nursery, which
is normally fine but it broke an assumption in
storageAddCapabilities().  This manifested as an occasional crash in
the setnumcapabilities001 test.

4 years agoTiny refactor plus comments
Simon Peyton Jones [Fri, 26 Jun 2015 07:31:37 +0000 (08:31 +0100)] 
Tiny refactor plus comments

4 years agoError message wibbles from out-of-scope changes
Simon Peyton Jones [Thu, 25 Jun 2015 08:25:39 +0000 (09:25 +0100)] 
Error message wibbles from out-of-scope changes

The patch "Treat out-of-scope variables as holes" makes
lots of error messages change a bit. This patch has all
the change.

4 years agoTreat out-of-scope variables as holes
Simon Peyton Jones [Wed, 24 Jun 2015 22:27:59 +0000 (23:27 +0100)] 
Treat out-of-scope variables as holes

This patch implements the idea in Trac #10569.

* An out-of-scope variable is treated as a typed expression
  hole.

* That is, we don't report it in the type checker, not the
  renamer, and we when we do report it, we give its type.

* Moreover, we can defer the error to runtime with
  -fdefer-typed-holes

In implementation terms:

* The renamer turns an unbound variable into a HsUnboundVar

* The type checker emits a Hole constraint for a
  HsUnboundVar, and turns it back into a HsVar

It was a bit painful to implement because a whole raft of
error messages change slightly.  But there was absolutely
nothing hard in principle.

Holes are reported with a bunch of possibly-useful context,
notably the "relevant bindings".  I found that this was
distracting clutter in the very common case of a mis-typed
variable that is only accidentally not in scope, so I've
arranged to print the context information only for true holes,
that is ones starting with an underscore.

Unbound data constructors use in patterns, like
  f (D x) = x
are still reportd by the renamer, and abort compilation
before type checking.

4 years agoGet rid of irrelevant impredicative polymoprhism
Simon Peyton Jones [Thu, 25 Jun 2015 08:21:13 +0000 (09:21 +0100)] 
Get rid of irrelevant impredicative polymoprhism

These tests aren't about impredicativity

4 years agoGet rid of irrlevant result type signature
Simon Peyton Jones [Thu, 25 Jun 2015 08:17:27 +0000 (09:17 +0100)] 
Get rid of irrlevant result type signature

Result type-sigs are now illegal, but that's not what this test
is about

4 years agoAdd module header to test
Simon Peyton Jones [Thu, 25 Jun 2015 08:14:21 +0000 (09:14 +0100)] 
Add module header to test

..to avoid irrelevant 'main is not defined' error message

4 years agoDon't float out alpha[sig] ~ Int
Simon Peyton Jones [Thu, 25 Jun 2015 08:13:30 +0000 (09:13 +0100)] 
Don't float out alpha[sig] ~ Int

This is just a small twiddle to TcSimplify.usefulToFloat
See Note [Which equalities to float].

4 years agoFix addDataConStrictness
Simon Peyton Jones [Wed, 24 Jun 2015 22:43:41 +0000 (23:43 +0100)] 
Fix addDataConStrictness

See Note [Add demands for strict constructors].

The new bit is the test for isAbsDmd in addDataConStrictness.
There was a cryptic note that said that this function
should add a seqDmd even for Absent arguments, but that
is definitely a bad thing (as the Note now says), causing
unused arguments to be passed to the worker.

Easy fix!