ghc.git
5 years agoUpdate Cabal submodule to HEAD (1.21)
Edward Z. Yang [Fri, 18 Jul 2014 16:50:28 +0000 (09:50 -0700)] 
Update Cabal submodule to HEAD (1.21)

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
5 years agoFurther improvements to floating equalities
Simon Peyton Jones [Fri, 18 Jul 2014 08:35:24 +0000 (09:35 +0100)] 
Further improvements to floating equalities

This equality-floating stuff is horribly delicate!  Trac #9316 showed
up yet another corner case.

The main changes are
 * include CTyVarEqs when "growing" the skolem set
 * do not include the kind argument to (~) when growing the skolem set

I added a lot more comments as well

5 years agoComments only
Simon Peyton Jones [Fri, 18 Jul 2014 08:32:46 +0000 (09:32 +0100)] 
Comments only

5 years agoReduce volume of typechecker trace information
Simon Peyton Jones [Fri, 18 Jul 2014 08:32:30 +0000 (09:32 +0100)] 
Reduce volume of typechecker trace information

5 years agoBuild on travis with CPUS=2
Joachim Breitner [Thu, 17 Jul 2014 08:27:25 +0000 (10:27 +0200)] 
Build on travis with CPUS=2

With CPU=3 we are hitting resoure limits (probably memory). With CPU=2
this is less likely to happen. We will get more random timeouts, but
these are more easily spotted, and marked as "Failure", not as "Error".

5 years agoOK, I think we've finally solved granularity.
Edward Z. Yang [Thu, 17 Jul 2014 16:16:55 +0000 (17:16 +0100)] 
OK, I think we've finally solved granularity.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
5 years agoRemove unused parameters in OptCoercion (#9233)
Richard Eisenberg [Thu, 17 Jul 2014 14:06:55 +0000 (10:06 -0400)] 
Remove unused parameters in OptCoercion (#9233)

5 years agoCorrectly round when calculating the deviation
Joachim Breitner [Thu, 17 Jul 2014 11:03:09 +0000 (13:03 +0200)] 
Correctly round when calculating the deviation

5 years agoAdjust a few performance numbers
Joachim Breitner [Thu, 17 Jul 2014 10:58:33 +0000 (12:58 +0200)] 
Adjust a few performance numbers

These did not yet trigger a failure, but are more than 1% away from the
expected value. Since I now start collecting logs to investigate
deviations from the expected value, it makes sense to reset them. This
way we know that every significat deviation was caused since this
commit.

I only updated bytes_allocated numbers, as these are (mostly)
deterministic. Other depend, AFAIK, on sampling timing, so I did not
bother.

5 years agoInclude test case name in performance result
Joachim Breitner [Thu, 17 Jul 2014 09:08:41 +0000 (11:08 +0200)] 
Include test case name in performance result

With THREADS=n, for n > 1, it becomes impossible to match the
performance numbers to the test case name. Hence include it in the
output. This also makes grepping through a bunch of logs for a specific
test case much easier, and outweighs the extra verbosity.

5 years agoTest Trac #9323
Simon Peyton Jones [Thu, 17 Jul 2014 09:01:25 +0000 (10:01 +0100)] 
Test Trac #9323

5 years agoRichards optCoercion improvement made test cases fail the nice way
Joachim Breitner [Thu, 17 Jul 2014 08:46:27 +0000 (10:46 +0200)] 
Richards optCoercion improvement made test cases fail the nice way

This was likely caused by 5e7406d9, which fixed #9233.

5 years agoWorkaround haddock parser error caused by 5e7406d9
Herbert Valerio Riedel [Thu, 17 Jul 2014 07:04:46 +0000 (09:04 +0200)] 
Workaround haddock parser error caused by 5e7406d9

Haddock complains if a comment looks like a misplaced Haddock-comment.
In this case, the comment line starting with `-- *kind* and` looked like a
section-heading to Haddock and caused the following error:

    parse error on input ‘-- *kind* and role of its argument. Luckily, laziness should’

This commit just rewraps the line so that no `*` appear at the start of the
non-Haddock comment lines.

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoOptimise optCoercion. (#9233)
Richard Eisenberg [Wed, 16 Jul 2014 16:25:24 +0000 (12:25 -0400)] 
Optimise optCoercion. (#9233)

The old optCoercion (and helper functions) used coercionKind and
coercionRole internally. This was terrible when these had to be
called at *every* point in the coercion tree during the recursive
descent. This is rewritten to avoid such calls.

5 years agoRewrite coercionRole. (#9233)
Richard Eisenberg [Wed, 16 Jul 2014 02:32:29 +0000 (22:32 -0400)] 
Rewrite coercionRole. (#9233)

Summary:
coercionRole is now much more efficient, computing both the coercion's
kind and role together. The previous version calculated them separately,
leading to quite possibly exponential behavior.

This is still too slow, but it's a big improvement.

Test Plan: Evaluate by running the "minimized" test from the Trac ticket.

Reviewers: simonpj, austin

Subscribers: simonmar, relrod, carter

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

5 years agoTry to explain the applicativity problem
Edward Z. Yang [Wed, 16 Jul 2014 11:59:37 +0000 (12:59 +0100)] 
Try to explain the applicativity problem

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
5 years agoImprove documentation of overlapping instances (again)
Simon Peyton Jones [Tue, 15 Jul 2014 16:40:39 +0000 (17:40 +0100)] 
Improve documentation of overlapping instances (again)

Prompted by Trac #9288

5 years agoImprove documentation of :set/:seti
Simon Peyton Jones [Tue, 15 Jul 2014 08:18:05 +0000 (09:18 +0100)] 
Improve documentation of :set/:seti

Prompted by Trac #9299

5 years agoEntirely re-jig the handling of default type-family instances (fixes Trac #9063)
Simon Peyton Jones [Tue, 15 Jul 2014 06:43:55 +0000 (07:43 +0100)] 
Entirely re-jig the handling of default type-family instances (fixes Trac #9063)

In looking at Trac #9063 I decided to re-design the default
instances for associated type synonyms.  Previously it was all
jolly complicated, to support generality that no one wanted, and
was arguably undesirable.

Specifically

* The default instance for an associated type can have only
  type variables on the LHS.  (Not type patterns.)

* There can be at most one default instances declaration for
  each associated type.

To achieve this I had to do a surprisingly large amount of refactoring
of HsSyn, specifically to parameterise HsDecls.TyFamEqn over the type
of the LHS patterns.

That change in HsDecls has a (trivial) knock-on effect in Haddock, so
this commit does a submodule update too.

The net result is good though.  The code is simpler; the language
specification is simpler.  Happy days.

Trac #9263 and #9264 are thereby fixed as well.

5 years agoDefine PrelNames.allNameStrings and use it in TcHsType
Simon Peyton Jones [Tue, 15 Jul 2014 06:39:51 +0000 (07:39 +0100)] 
Define PrelNames.allNameStrings and use it in TcHsType

Refactoring only.

5 years agoWhite space only
Simon Peyton Jones [Wed, 2 Jul 2014 22:08:00 +0000 (23:08 +0100)] 
White space only

5 years agoAdd a clarifying comment about scoping of type variables in associated type decls
Simon Peyton Jones [Wed, 2 Jul 2014 22:05:52 +0000 (23:05 +0100)] 
Add a clarifying comment about scoping of type variables in associated type decls

5 years agoPartially revert 194107ea9333c1d9d61abf307db2da6a699847af
Austin Seipp [Mon, 14 Jul 2014 17:27:58 +0000 (12:27 -0500)] 
Partially revert 194107ea9333c1d9d61abf307db2da6a699847af

This reverts the numbers for T9203.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoGive performance benchmark deviation also in percents
Joachim Breitner [Mon, 14 Jul 2014 11:30:24 +0000 (13:30 +0200)] 
Give performance benchmark deviation also in percents

this makes it easier to spot a “just over the mark” change (e.g. +5.1%),
compared to a more radical jump (e.g. +15%).

5 years agoNew testsuite verbosity level 4
Joachim Breitner [Mon, 14 Jul 2014 11:29:47 +0000 (13:29 +0200)] 
New testsuite verbosity level 4

which makes it print performance numbers even when the test succeeds
(good for historic analysis)

5 years agoUpdate various performance benchmarks
Joachim Breitner [Mon, 14 Jul 2014 11:02:07 +0000 (13:02 +0200)] 
Update various performance benchmarks

I started monitoring perfomance on a per-commit base. These seem to be
off for a while now. Adjusting them, and from now I hope I can keep
closer tabs on them.

5 years agoFinish TCs section
Edward Z. Yang [Mon, 14 Jul 2014 09:59:47 +0000 (10:59 +0100)] 
Finish TCs section

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
5 years agoType classes
Edward Z. Yang [Fri, 11 Jul 2014 16:13:12 +0000 (17:13 +0100)] 
Type classes

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
5 years agoadd support for x86_64-solaris2 platform
Karel Gardas [Mon, 14 Jul 2014 02:43:20 +0000 (21:43 -0500)] 
add support for x86_64-solaris2 platform

Summary:
this set of patches adds support for x86_64-solaris2 platform
Solaris is multi-lib platform which means it provides 32bit user-land together
with 32bit and 64bit libraries. The 32bit libraries are located in <somewhere>/lib
directories while 64bit libraries are located in <somewhere>/lib/64 directories.
This is why GHCi required the fix since otherwise it'll attempt to load
/usr/lib/libgmp.so which is 32bit library into 64bit binary process space (GHCi).
This of course fails with wrong ELFCLASS32 error message.
Another issue was that by default GNU C distributed with Solaris compiles
into 32bit binary. We need to enforce compilation to 64bit binary
by adding appropriate -m64 option.

Test Plan: already built on x86_64-solaris2

Reviewers: austin

Reviewed By: austin

Subscribers: phaskell, simonmar, relrod, carter

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

5 years agoAcquire all_tasks_mutex in forkProcess
Edsko de Vries [Sun, 13 Jul 2014 20:19:45 +0000 (15:19 -0500)] 
Acquire all_tasks_mutex in forkProcess

Summary: (for the same reason that we acquire all the other mutexes)

Test Plan: validate

Reviewers: simonmar, austin, duncan

Reviewed By: simonmar, austin, duncan

Subscribers: simonmar, relrod, carter

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

5 years agoAvoid deadlock in freeTask (called by forkProcess)
Edsko de Vries [Sun, 13 Jul 2014 20:19:39 +0000 (15:19 -0500)] 
Avoid deadlock in freeTask (called by forkProcess)

Summary: Documented in more detail inline with the change.

Test Plan: validate

Reviewers: austin, simonmar, duncan

Reviewed By: austin, simonmar, duncan

Subscribers: simonmar, relrod, carter

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

5 years agoFix ghci tab completion of duplicate identifiers.
Shachaf Ben-Kiki [Sun, 13 Jul 2014 20:19:33 +0000 (15:19 -0500)] 
Fix ghci tab completion of duplicate identifiers.

Summary:
Currently, if the same identifier is imported via multiple modules, ghci
shows multiple completions for it. Use the nub of the completions
instead so that it only shows up once.

Signed-off-by: Shachaf Ben-Kiki <shachaf@gmail.com>
Test Plan: by hand

Reviewers: simonmar, austin, hvr

Reviewed By: austin, hvr

Subscribers: hvr, simonmar, relrod, carter

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

5 years agoTypo in comment
Gabor Greif [Sun, 13 Jul 2014 09:52:17 +0000 (11:52 +0200)] 
Typo in comment

5 years agoTest case for #9305
Joachim Breitner [Sat, 12 Jul 2014 22:27:54 +0000 (00:27 +0200)] 
Test case for #9305

5 years agointeger-gmp: tweak gitignore.
Austin Seipp [Sat, 12 Jul 2014 21:18:03 +0000 (16:18 -0500)] 
integer-gmp: tweak gitignore.

Auditors: hvr

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agotestsuite: Tweak T6048 bounds
Austin Seipp [Sat, 12 Jul 2014 20:13:59 +0000 (15:13 -0500)] 
testsuite: Tweak T6048 bounds

Summary:
This should fix the Harbormaster builds; the bounds are just a little too narrow.

Signed-off-by: Austin Seipp <austin@well-typed.com>
Test Plan: Harbormaster should build successfully.

Reviewers: simonmar

Subscribers: phaskell, simonmar, relrod, carter

Projects: #ghc

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

5 years agoAdd travis-ci badge
Gabor Greif [Sat, 12 Jul 2014 17:59:37 +0000 (19:59 +0200)] 
Add travis-ci badge

5 years agoFix note spelling
Gabor Greif [Sat, 12 Jul 2014 15:15:38 +0000 (17:15 +0200)] 
Fix note spelling

5 years agoRectify some panic messages
Gabor Greif [Sat, 12 Jul 2014 15:12:10 +0000 (17:12 +0200)] 
Rectify some panic messages

5 years agoTypoes in comments
Gabor Greif [Sat, 12 Jul 2014 09:36:02 +0000 (11:36 +0200)] 
Typoes in comments

5 years agoFix comment
Gabor Greif [Sat, 12 Jul 2014 09:21:47 +0000 (11:21 +0200)] 
Fix comment

5 years agoActivate tab checks
Gabor Greif [Sat, 12 Jul 2014 09:20:31 +0000 (11:20 +0200)] 
Activate tab checks

5 years agoM-x untabify
Gabor Greif [Sat, 12 Jul 2014 09:19:58 +0000 (11:19 +0200)] 
M-x untabify

5 years agoAdd a .travis.yml file
Joachim Breitner [Sat, 12 Jul 2014 11:58:09 +0000 (13:58 +0200)] 
Add a .travis.yml file

This is a reduced build that should finish within the 50 minute time
limit most of the time. In particular,
 * it skips DPH
 * it does not build dynamic libraries and no dynamic executables
 * does not build haddock or generate documentation
 * only runs fast tests, and no performance tests

You can see its results at
https://travis-ci.org/ghc/ghc/builds

5 years agoDeclare official github home of libraries/unix
Herbert Valerio Riedel [Fri, 11 Jul 2014 17:36:26 +0000 (19:36 +0200)] 
Declare official github home of libraries/unix

Effective immediately, pushing to libraries/unix requires pushing to
ssh://git@github.com/haskell/unix.git. This done now even though there's
no scripted tooling yet as the GitHub repo is already receiving pull requests
(which are getting merged)

5 years agoComments only
Jan Stolarek [Fri, 11 Jul 2014 12:33:38 +0000 (14:33 +0200)] 
Comments only

5 years agoRemove unused parameter in rnHsTyVar
Jan Stolarek [Fri, 11 Jul 2014 12:25:27 +0000 (14:25 +0200)] 
Remove unused parameter in rnHsTyVar

5 years agoIntegrate changelog entries from base-4.7.0.1 rel
Herbert Valerio Riedel [Fri, 11 Jul 2014 11:54:18 +0000 (13:54 +0200)] 
Integrate changelog entries from base-4.7.0.1 rel

5 years agoFix typos in base documentation.
Shachaf Ben-Kiki [Fri, 11 Jul 2014 04:55:53 +0000 (23:55 -0500)] 
Fix typos in base documentation.

Summary: Signed-off-by: Shachaf Ben-Kiki <shachaf@gmail.com>

Test Plan: n/a

Reviewers: austin

Reviewed By: austin

Subscribers: simonmar, relrod, carter

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

5 years agoGHC.Conc: clarify that 'forkOn' binds to capability, not a 'CPU' or 'Task'
Sergei Trofimovich [Thu, 10 Jul 2014 07:56:23 +0000 (02:56 -0500)] 
GHC.Conc: clarify that 'forkOn' binds to capability, not a 'CPU' or 'Task'

Summary:
Capability (HEC) can migrate to other Task (thus switch CPU)
unless capability was created as a bound haskell thread.

Task also can migrate to other CPU due to OS scheduler
(unless '-qa' RTS option is set).

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Test Plan: proofread for typos

Reviewers: simonmar, austin

Reviewed By: austin

Subscribers: simonmar, relrod, carter

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

5 years agoremove SPARC related comment in PPC code generator
Peter Trommler [Thu, 10 Jul 2014 07:55:51 +0000 (02:55 -0500)] 
remove SPARC related comment in PPC code generator

Summary:
PowerPC does not do delay slots and there is also no requirement
to put extra instructions between FP operations and branches.

Test Plan: None. Comment change only.

Reviewers: austin, simonmar

Reviewed By: austin, simonmar

Subscribers: simonmar, relrod, carter

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

5 years agoAvoid unnecessary clock_gettime() syscalls in GC stats.
Brian Brooks [Thu, 10 Jul 2014 07:55:33 +0000 (02:55 -0500)] 
Avoid unnecessary clock_gettime() syscalls in GC stats.

Summary: Avoid unnecessary clock_gettime() syscalls in GC stats.

Test Plan: Use strace.

Reviewers: simonmar, austin

Reviewed By: simonmar, austin

Subscribers: simonmar, relrod, carter

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

5 years ago[backpack] Rework definite package compilation
Edward Z. Yang [Thu, 10 Jul 2014 16:07:18 +0000 (17:07 +0100)] 
[backpack] Rework definite package compilation

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
5 years agoMake the example a little more complex
Edward Z. Yang [Thu, 10 Jul 2014 14:28:23 +0000 (15:28 +0100)] 
Make the example a little more complex

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
5 years agorts: Fix #9003 with an annoying hack
Austin Seipp [Thu, 10 Jul 2014 00:08:26 +0000 (19:08 -0500)] 
rts: Fix #9003 with an annoying hack

The TL;DR is that by adding this, we can distinguish GHC 7.8.3 from
7.8.2, which had a buggy implementation. See the ticket for details.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoStart expanding out linking text
Edward Z. Yang [Wed, 9 Jul 2014 18:01:11 +0000 (19:01 +0100)] 
Start expanding out linking text

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
5 years agoAdd hyperref package.
Edward Z. Yang [Wed, 9 Jul 2014 08:53:43 +0000 (09:53 +0100)] 
Add hyperref package.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
5 years ago[docs/backpack] Get lint to stop complaining
Edward Z. Yang [Wed, 9 Jul 2014 08:50:27 +0000 (09:50 +0100)] 
[docs/backpack] Get lint to stop complaining

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
5 years agoScott's updates to the impl paper.
Edward Z. Yang [Wed, 9 Jul 2014 08:40:42 +0000 (09:40 +0100)] 
Scott's updates to the impl paper.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
5 years agoMore testsuite ignores.
Edward Z. Yang [Mon, 7 Jul 2014 14:14:12 +0000 (15:14 +0100)] 
More testsuite ignores.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
5 years agoTrack gitignore update in submodule unix
Edward Z. Yang [Mon, 7 Jul 2014 13:58:29 +0000 (14:58 +0100)] 
Track gitignore update in submodule unix

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
5 years agoPrivate axiom comment in Backpack
Edward Z. Yang [Mon, 7 Jul 2014 13:54:13 +0000 (14:54 +0100)] 
Private axiom comment in Backpack

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
5 years agoDo not print the result of 'main' after invoking ':main' (fixes #9086).
Gintautas Miliauskas [Sun, 8 Jun 2014 11:49:29 +0000 (11:49 +0000)] 
Do not print the result of 'main' after invoking ':main' (fixes #9086).

5 years agoFix imports in GHC.Event.Poll when not HAVE_POLL_H (#9275)
Reid Barton [Sun, 6 Jul 2014 20:34:32 +0000 (16:34 -0400)] 
Fix imports in GHC.Event.Poll when not HAVE_POLL_H (#9275)

Though as far as I can tell, we can never successfully build under
this configuration anyways: GHC.Event.TimerManager requires the Poll
backend to be functional.

5 years agoSet mdo in typewriter face
Gabor Greif [Sat, 5 Jul 2014 19:49:17 +0000 (21:49 +0200)] 
Set mdo in typewriter face

5 years agoFix windows breakage (fallout from 34f7e9a3c998)
Austin Seipp [Fri, 4 Jul 2014 14:40:25 +0000 (09:40 -0500)] 
Fix windows breakage (fallout from 34f7e9a3c998)

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoUpdate .gitignore
Austin Seipp [Fri, 4 Jul 2014 01:35:47 +0000 (20:35 -0500)] 
Update .gitignore

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoUpdate documentation
Jan Stolarek [Thu, 3 Jul 2014 06:16:28 +0000 (08:16 +0200)] 
Update documentation

  * fix links to the User's Guide in ghc and ghci --help messages
  * fix default stack size info in RTS help message

5 years agoPrelNames cleanup
Jan Stolarek [Thu, 3 Jul 2014 05:12:12 +0000 (07:12 +0200)] 
PrelNames cleanup

  * Replace usage of methName with varQual, because they are identical
  * Minor formatting adjustments

5 years agoUpdate transformers submodule to 0.4.1.0 release
Herbert Valerio Riedel [Wed, 2 Jul 2014 21:35:34 +0000 (23:35 +0200)] 
Update transformers submodule to 0.4.1.0 release

5 years agoMark HPC ticks labels as dynamic
Reid Barton [Tue, 1 Jul 2014 05:04:18 +0000 (01:04 -0400)] 
Mark HPC ticks labels as dynamic

This enables GHC's PIC machinery for accessing tickboxes of other
packages correctly when building dynamic libraries. Previously
GHC was doing strange and wrong things in that situation. See #9012.

5 years agoMinor edits to Backpack design doc
Edward Z. Yang [Wed, 2 Jul 2014 17:27:17 +0000 (18:27 +0100)] 
Minor edits to Backpack design doc

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
5 years agoremove redundant condition checking in profiling RTS code
osa1 [Wed, 2 Jul 2014 13:55:04 +0000 (08:55 -0500)] 
remove redundant condition checking in profiling RTS code

Summary: A redundant condition checking is removed, as discussed in http://www.haskell.org/pipermail/ghc-devs/2014-June/005088.html

Test Plan: validate

Reviewers: simonmar, austin

Reviewed By: austin

Subscribers: simonmar, relrod, carter

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

5 years agoincludes/stg/SMP.h: use 'NOSMP' instead of never defined 'WITHSMP' (Trac #8789)
Sergei Trofimovich [Wed, 2 Jul 2014 13:54:35 +0000 (08:54 -0500)] 
includes/stg/SMP.h: use 'NOSMP' instead of never defined 'WITHSMP' (Trac #8789)

Summary:
git history does not contain state where 'WITHSMP' macro was ever defined.
It should have always been '!NOSMP'.

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Test Plan: build tested

Reviewers: austin, simonmar

Reviewed By: austin, simonmar

Subscribers: simonmar, relrod, carter

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

5 years agoghc-pkg register/update --enable-multi-instance
Austin Seipp [Wed, 2 Jul 2014 13:54:22 +0000 (08:54 -0500)] 
ghc-pkg register/update --enable-multi-instance

Summary:
New flag to ghc-pkg register/update to lift the restriction on multiple instances of the same package version being in a db at once.

Lifting the restriction is easy. The tricky bit is checking ghc does something sensible, but from the reading of the code it should treat such instances the same way it does with multiple instances between multiple DBs.

We'll also need a way to unregister by installed package id.

Test Plan: need to test that ghc is doing what we expect, at least if you use it like -hide-all-packages -package-id this -package-id that

Reviewers: ezyang, simonmar

Reviewed By: simonmar

Subscribers: relrod

Projects: #ghc

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

5 years agocompiler/ghc.mk: restore GhcHcOpts variable handling (Trac #8787)
Sergei Trofimovich [Wed, 2 Jul 2014 13:54:06 +0000 (08:54 -0500)] 
compiler/ghc.mk: restore GhcHcOpts variable handling (Trac #8787)

Summary:
wiki and mk/config.mk.in suggests setting GhcHcOpts
for compiler-wide haskell flags. But it does not
work for a while now (broke around ca07d92837fc1e3ae9be67bb7d9e7f1b8035b00f)

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Test Plan: 'make' shows now ghc timing as it used to be

Reviewers: simonmar, austin

Reviewed By: austin

Subscribers: simonmar, relrod, carter

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

5 years agoreading/writing blocking FDs over FD_SETSIZE is broken (Partially Trac #9169)
Sergei Trofimovich [Wed, 2 Jul 2014 13:53:34 +0000 (08:53 -0500)] 
reading/writing blocking FDs over FD_SETSIZE is broken (Partially Trac #9169)

Summary:
libraries/base/cbits/inputReady.c had no limits on file descriptors.
Add a limit as non-threaded RTS does.

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Test Plan: none

Reviewers: austin, simonmar

Reviewed By: austin, simonmar

Subscribers: simonmar, relrod, carter

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

5 years agoControl CPP through settings file (#8683)
Carter Tazio Schonwald [Wed, 2 Jul 2014 13:52:53 +0000 (08:52 -0500)] 
Control CPP through settings file (#8683)

Summary:
Allow the CPP program and flag choices for GHC
be configured via the the ghc settings file

Test Plan: ran validate yesterday

Reviewers: hvr, austin, mzero, simonmar

Reviewed By: austin, mzero, simonmar

Subscribers: mzero, simonmar, relrod, carter

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

5 years agoFinish up incomplete sections
Edward Z. Yang [Wed, 2 Jul 2014 11:48:53 +0000 (12:48 +0100)] 
Finish up incomplete sections

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
5 years agoFinish the simple elaboration algo
Edward Z. Yang [Tue, 1 Jul 2014 19:02:18 +0000 (20:02 +0100)] 
Finish the simple elaboration algo

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
5 years agoFix variable name in allocate()
Reid Barton [Tue, 1 Jul 2014 18:00:28 +0000 (14:00 -0400)] 
Fix variable name in allocate()

5 years agoBackpack docs: Compilation, surface syntax, and package database
Edward Z. Yang [Tue, 1 Jul 2014 18:41:00 +0000 (19:41 +0100)] 
Backpack docs: Compilation, surface syntax, and package database

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
5 years agoFixup nullary typeclasses (Trac #8993)
Krzysztof Gogolewski [Tue, 1 Jul 2014 18:19:20 +0000 (20:19 +0200)] 
Fixup nullary typeclasses (Trac #8993)

Summary: Fix test broken after Trac #8993

Test Plan: validate

Reviewers: austin, simonpj, hvr

Reviewed By: austin, hvr

Subscribers: simonmar, relrod, carter

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

5 years agoTest Trac #9222
Simon Peyton Jones [Tue, 1 Jul 2014 14:23:30 +0000 (15:23 +0100)] 
Test Trac #9222

5 years agoFix demand analyser for unboxed types
Simon Peyton Jones [Tue, 1 Jul 2014 12:31:18 +0000 (13:31 +0100)] 
Fix demand analyser for unboxed types

This is a tricky case exposed by Trac #9254.  I'm surprised it hasn't
shown up before, because it's happens when you use unsafePerformIO in
the right way.

Anyway, fixed now.  See Note [Analysing with absent demand]
in Demand.lhs

5 years agoCheck for integer overflow in allocate() (#9172)
Reid Barton [Tue, 1 Jul 2014 14:20:31 +0000 (10:20 -0400)] 
Check for integer overflow in allocate() (#9172)

Summary: Check for integer overflow in allocate() (#9172)

Test Plan: validate

Reviewers: austin

Reviewed By: austin

Subscribers: simonmar, relrod, carter

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

5 years agoPartially fix #9003 by reverting bad numbering.
Edward Z. Yang [Tue, 1 Jul 2014 13:43:50 +0000 (14:43 +0100)] 
Partially fix #9003 by reverting bad numbering.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
5 years agoUpdate Haddock submodule with Iavor's validate fix.
Edward Z. Yang [Tue, 1 Jul 2014 10:40:46 +0000 (03:40 -0700)] 
Update Haddock submodule with Iavor's validate fix.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
5 years agoRefactor checkHiBootIface so that TcGblEnv is not necessary.
Edward Z. Yang [Mon, 30 Jun 2014 08:07:23 +0000 (09:07 +0100)] 
Refactor checkHiBootIface so that TcGblEnv is not necessary.

Summary:
This patch is a prelude to implementation of hi-to-hi compatibility
checking.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate

Reviewers: simonpj, austin

Subscribers: simonmar, relrod, carter

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

5 years agoReplace thenM/thenM_ with do-notation in RnExpr
Jan Stolarek [Mon, 30 Jun 2014 13:42:24 +0000 (15:42 +0200)] 
Replace thenM/thenM_ with do-notation in RnExpr

5 years agoUnbreak TcNullaryTC testcase, by using MPTC
Joachim Breitner [Tue, 1 Jul 2014 07:11:30 +0000 (09:11 +0200)] 
Unbreak TcNullaryTC testcase, by using MPTC

5 years agoAdd a cast to new code in hp2ps
Reid Barton [Tue, 1 Jul 2014 02:11:03 +0000 (22:11 -0400)] 
Add a cast to new code in hp2ps

For parallelism with the existing code. I don't think it should
make any difference.

5 years agoAvoid integer overflow in hp2ps (#9145)
Reid Barton [Tue, 1 Jul 2014 02:01:57 +0000 (22:01 -0400)] 
Avoid integer overflow in hp2ps (#9145)

This is slightly hackish, but hp2ps is already convoluted enough
that I don't feel bad about it.

5 years agoRemove extraneous debugging output (#9071)
Reid Barton [Mon, 30 Jun 2014 21:27:14 +0000 (17:27 -0400)] 
Remove extraneous debugging output (#9071)

5 years agoRe-add more primops for atomic ops on byte arrays
Johan Tibell [Fri, 27 Jun 2014 11:48:24 +0000 (13:48 +0200)] 
Re-add more primops for atomic ops on byte arrays

This is the second attempt to add this functionality. The first
attempt was reverted in 950fcae46a82569e7cd1fba1637a23b419e00ecd, due
to register allocator failure on x86. Given how the register
allocator currently works, we don't have enough registers on x86 to
support cmpxchg using complicated addressing modes. Instead we fall
back to a simpler addressing mode on x86.

Adds the following primops:

 * atomicReadIntArray#
 * atomicWriteIntArray#
 * fetchSubIntArray#
 * fetchOrIntArray#
 * fetchXorIntArray#
 * fetchAndIntArray#

Makes these pre-existing out-of-line primops inline:

 * fetchAddIntArray#
 * casIntArray#

5 years agoRevert "Fix obscure problem with using the system linker (#8935)"
Austin Seipp [Mon, 30 Jun 2014 12:44:31 +0000 (07:44 -0500)] 
Revert "Fix obscure problem with using the system linker (#8935)"

This reverts commit 2f8b4c9330b455d4cb31c186c747a7db12a69251.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoRemove dead code. Fix comment typo.
Jan Stolarek [Mon, 30 Jun 2014 08:34:36 +0000 (10:34 +0200)] 
Remove dead code. Fix comment typo.

5 years agoDocument #8883 in the release notes
Jan Stolarek [Mon, 30 Jun 2014 07:52:16 +0000 (09:52 +0200)] 
Document #8883 in the release notes

5 years agoEliminate `Unify.validKindShape` (#9242)
Iavor S. Diatchki [Mon, 30 Jun 2014 00:37:34 +0000 (17:37 -0700)] 
Eliminate `Unify.validKindShape` (#9242)

5 years agoOverlapable pragmas for individual instances (#9242)
Iavor S. Diatchki [Mon, 30 Jun 2014 00:22:16 +0000 (17:22 -0700)] 
Overlapable pragmas for individual instances (#9242)

Programmers may provide a pragma immediately after the `instance` keyword
to control the overlap/incoherence behavior for individual instances.
For example:

    instance {-# OVERLAP #-} C a where ...

I chose this notation, rather than the other two outlined in the ticket
for these reasons:

   1. Having the pragma after the type looks odd, I think.
   2. Having the pragma after there `where` does not work for
       stand-alone derived instances

I have implemented 3 pragams:

   1. NO_OVERLAP
   2. OVERLAP
   3. INCOHERENT

These correspond directly to the internal modes currently supported by
GHC.  If a pragma is specified, it will be used no matter what flags are
turned on.   For example, putting `NO_OVERLAP` on an instance will mark
it as non-overlapping, even if `OVERLAPPIN_INSTANCES` is turned on for the
module.