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

5 years agoFactor-out the `OverlapMode` from `OverlapFlag`.
Iavor S. Diatchki [Sun, 29 Jun 2014 23:34:30 +0000 (16:34 -0700)] 
Factor-out the `OverlapMode` from `OverlapFlag`.

This seems a bit cleaner conceptually because the overlap mode and running
in safety mode are quite orthogonal.

More pragmatically, it also makes it possible to use `OverlapMode` to let
programmers pick the overlap mode for individual instances.

5 years agoPromote TcNullaryTC and TcCoercible to fast tests
Herbert Valerio Riedel [Sun, 29 Jun 2014 14:06:45 +0000 (16:06 +0200)] 
Promote TcNullaryTC and TcCoercible to fast tests

I'm wondering whether it's sensible to omit so many typecheck testcases from
the default validate test target. As for instance, TcNullaryTC has been failing
since its introduction in c63a465011b99eeafbb957074e54c2e6bbf751d9 (re #8993) and
it seems to have gone unnoticed so far.

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoUpdate 32bit & 64bit performance numbers
Herbert Valerio Riedel [Sun, 29 Jun 2014 13:53:39 +0000 (15:53 +0200)] 
Update 32bit & 64bit performance numbers

Some numbers have decreased but the haddock numbers have generally
increased noticeable again (see also last update in 970e5d99fb658b73)

This updates all numbers I noticed in the "fast" test-mode, *except* for
the T9203 test-case on 32bit, which needs more investigation before
bumping due to its significant increase:

  bytes allocated value is too high:
      Expected    bytes allocated: 50000000 +/-5%
      Lower bound bytes allocated: 47500000
      Upper bound bytes allocated: 52500000
      Actual      bytes allocated: 85093548
  *** unexpected failure for T9203(normal)

5 years agoExpect test failure for T8832 on 32bit (re #8832)
Herbert Valerio Riedel [Sun, 29 Jun 2014 13:49:27 +0000 (15:49 +0200)] 
Expect test failure for T8832 on 32bit (re #8832)

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoUpdate Cabal to BinaryLiterals-aware 1.20 version
Herbert Valerio Riedel [Sun, 29 Jun 2014 08:03:35 +0000 (10:03 +0200)] 
Update Cabal to BinaryLiterals-aware 1.20 version

In 1c0b5fdc9f2b6ea8166cc565383d4cd20432343c (re #9224) `BinaryLiterals`
was temporarily added to T4437's `expectedGhcOnlyExtensions` list. This
can now reverted as Cabal has been made aware of `BinaryLiterals`
(see haskell/cabal#1970 and haskell/cabal#1972).

updates Cabal submodule

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoTyop in comment
Gabor Greif [Sun, 29 Jun 2014 09:20:34 +0000 (11:20 +0200)] 
Tyop in comment

5 years agoAdd BUILD_DPH variable to GHC build-system
Herbert Valerio Riedel [Sat, 28 Jun 2014 18:23:48 +0000 (20:23 +0200)] 
Add BUILD_DPH variable to GHC build-system

Now that the `libraries/dph` submodule is checked out always we need
a different way to disable building DPH to save compile-time while
developing GHC.

This commit adds a new YES/NO Make variable `BUILD_DPH` that can be used
inside mk/build.mk to control whether to build libraries/dph or not.
The default setting is `BUILD_DPH=YES` (via `mk/config.mk.in`).

This also changes `validate`'s flag `--no-dph` to explicitly disable DPH
for the current validation run.

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
Test Plan: successful validates with `--fast --no-dph`

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

5 years agoSimplify .gitignore files
Herbert Valerio Riedel [Sat, 28 Jun 2014 16:48:20 +0000 (18:48 +0200)] 
Simplify .gitignore files

It's a bit confusing to have .gitignore files spread all over the
filesystem. This commit tries to consolidate those into one .gitignore
file per component. Moreover, we try to describe files to be ignored which
happen to have a common identifying pattern by glob patterns.

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoFix #9245 by always checking hi-boot for consistency if we find one.
Edward Z. Yang [Sat, 28 Jun 2014 10:56:08 +0000 (11:56 +0100)] 
Fix #9245 by always checking hi-boot for consistency if we find one.

Summary:
What this fix does is reorder how we look for hi-boot files: we
unconditionally check for an hi-boot file, and if we don't find one, we
check the import graph to see if there was circularity.  This is as
opposed to the previous scheme (check for circularity, then load hi-boot
file).

This costs us an extra file system access every typecheck, which
is not the best.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: Validate and check for compiler regressions in nofib

Reviewers: simonpj, austin

Subscribers: simonmar, relrod, carter

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

5 years agoUntabify and M-x whitespace cleanup
Gabor Greif [Wed, 25 Jun 2014 09:52:11 +0000 (11:52 +0200)] 
Untabify and M-x whitespace cleanup

5 years agoWhitespace only
Gabor Greif [Mon, 16 Jun 2014 13:50:45 +0000 (15:50 +0200)] 
Whitespace only

5 years agoMinor updates to Backpack docs.
Edward Z. Yang [Thu, 26 Jun 2014 13:40:45 +0000 (14:40 +0100)] 
Minor updates to Backpack docs.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
5 years agoAdd -XBinaryLiterals language extension (re #9224)
Herbert Valerio Riedel [Sat, 21 Jun 2014 09:38:17 +0000 (11:38 +0200)] 
Add -XBinaryLiterals language extension (re #9224)

Haskell2010 supports

- base-10 (prefix-less),
- base-8 (via `0[oO]`-prefix), and
- base-16 (via `0[xX]`-prefix) integer literals.

This commit adds syntax support for base-2 integer literals via the new `0[bB]`
prefix. The use of a `0b` prefix for indicating binary literals is known
from popular programming languages such as C++14, Perl, Python, Ruby, and Java.

This syntax extension is disabled by default and can be enabled via the
new `{-# LANGUAGE BinaryLiterals #-}` pragma and/or the new `-XBinaryLiterals`

This new extensions requires to upgrade the `ExtsBitmap` type from
`Word` to `Word64` as this adds a 33th flag which is not guaranteed to
fit into a `Word`.

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
Differential Revision: https://phabricator.haskell.org/D22

5 years agoComments only
Gabor Greif [Fri, 27 Jun 2014 16:35:17 +0000 (18:35 +0200)] 
Comments only

5 years agoRevert "Make -fno-write-interface to all modes of GHC, not just -fno-code."
Edward Z. Yang [Fri, 27 Jun 2014 13:06:51 +0000 (14:06 +0100)] 
Revert "Make -fno-write-interface to all modes of GHC, not just -fno-code."

This reverts commit 05120ecd95b2ebf9b096a95304793cd78be9506e.

5 years agoMake -fno-write-interface to all modes of GHC, not just -fno-code.
Edward Z. Yang [Fri, 27 Jun 2014 12:48:19 +0000 (13:48 +0100)] 
Make -fno-write-interface to all modes of GHC, not just -fno-code.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
5 years agoRefactor extension-bitmap in Lexer
Herbert Valerio Riedel [Sat, 21 Jun 2014 15:04:32 +0000 (17:04 +0200)] 
Refactor extension-bitmap in Lexer

This introduces an Enum type `ExtBits` for the currently used 32 flags
and introduces a type-synonym `ExtsBitmap` for representing a set over
`ExtBits`. While at it, the current `Int` was replaced by `Word` to
have the compiler catch any missed use-sites.

This will make it easy to swap the `Word`-representation of `ExtsBitmap`
by something different, such as e.g. a `Word64`

Test Plan: successful validate

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

5 years agoFix docs typo.
Edward Z. Yang [Fri, 27 Jun 2014 10:40:08 +0000 (11:40 +0100)] 
Fix docs typo.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
5 years agoIn TcValidity.checkAmbiguity, skolemise kind vars that appear free in the kinds of...
Simon Peyton Jones [Tue, 24 Jun 2014 21:23:29 +0000 (22:23 +0100)] 
In TcValidity.checkAmbiguity, skolemise kind vars that appear free in the kinds of type variables

This was shown up by Trac #9222.

5 years agoMore allDistinctTyVars from TcDeriv to Type
Simon Peyton Jones [Tue, 24 Jun 2014 21:19:24 +0000 (22:19 +0100)] 
More allDistinctTyVars from TcDeriv to Type

Just a minor refactoring

5 years agos/KnownLit/KnownSymbol/g and a typo fix
Gabor Greif [Thu, 26 Jun 2014 22:11:14 +0000 (00:11 +0200)] 
s/KnownLit/KnownSymbol/g and a typo fix

5 years agoAdd testsuite-related .gitignore files
Herbert Valerio Riedel [Thu, 26 Jun 2014 21:51:54 +0000 (23:51 +0200)] 
Add testsuite-related .gitignore files

Also set `submodule.<name>.ignore=none` explicitly for the recently
converted submodules, as those are not supposed to have untracked/unignored
files lying around.

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoAdd new flag -fwrite-interface for -fno-code.
Edward Z. Yang [Thu, 26 Jun 2014 15:52:52 +0000 (16:52 +0100)] 
Add new flag -fwrite-interface for -fno-code.

Summary:
Normally, -fno-code does not generate interface files.
However, if you want to use it to type check over multiple
runs of GHC, you will need the interface files to check
source files further down the dependency chain; -fwrite-interface
does this for you.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: clean validate, and a new test-case

Reviewers: simonpj

Subscribers: simonmar, relrod, carter

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

5 years agoarclint: update rules for xml files
Austin Seipp [Thu, 26 Jun 2014 16:33:29 +0000 (11:33 -0500)] 
arclint: update rules for xml files

As pointed out by Edward, it's probably unreasonable to have the xml
docs adhere to 80 columns, so we'll separate out the linters for now.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoUpdate parallel and stm submodules to have .gitignore
Edward Z. Yang [Thu, 26 Jun 2014 16:24:37 +0000 (09:24 -0700)] 
Update parallel and stm submodules to have .gitignore

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
5 years agoRevert "Add more primops for atomic ops on byte arrays"
Johan Tibell [Thu, 26 Jun 2014 12:31:37 +0000 (14:31 +0200)] 
Revert "Add more primops for atomic ops on byte arrays"

This commit caused the register allocator to fail on i386.

This reverts commit d8abf85f8ca176854e9d5d0b12371c4bc402aac3 and
04dd7cb3423f1940242fdfe2ea2e3b8abd68a177 (the second being a fix to
the first).

5 years agoLots of rewrites to further move toward new world order
Edward Z. Yang [Thu, 26 Jun 2014 12:31:40 +0000 (13:31 +0100)] 
Lots of rewrites to further move toward new world order

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
5 years agoWork around lack of __sync_fetch_and_nand in clang
Johan Tibell [Thu, 26 Jun 2014 06:39:53 +0000 (08:39 +0200)] 
Work around lack of __sync_fetch_and_nand in clang

clang chose to not implement this function. See
http://llvm.org/bugs/show_bug.cgi?id=8842

5 years agoFix “Checking for old .. repo” messages
Joachim Breitner [Thu, 26 Jun 2014 02:44:18 +0000 (19:44 -0700)] 
Fix “Checking for old .. repo” messages

5 years agoFix sync-all get from a local working copy
Joachim Breitner [Thu, 26 Jun 2014 02:36:22 +0000 (19:36 -0700)] 
Fix sync-all get from a local working copy

5 years agoMerge Thomas Miedema’s syn-all improvments
Joachim Breitner [Thu, 26 Jun 2014 02:21:28 +0000 (19:21 -0700)] 
Merge Thomas Miedema’s syn-all improvments

as submitted on #9212.

5 years agosync-all: Allow - in submodule URLs
Joachim Breitner [Wed, 25 Jun 2014 17:52:36 +0000 (10:52 -0700)] 
sync-all: Allow - in submodule URLs

5 years agoThe linking restriction, no shaping necessary.
Edward Z. Yang [Wed, 25 Jun 2014 17:14:11 +0000 (18:14 +0100)] 
The linking restriction, no shaping necessary.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
5 years agoFix few Haddock parser brainfarts
Mateusz Kowalczyk [Wed, 25 Jun 2014 13:25:37 +0000 (15:25 +0200)] 
Fix few Haddock parser brainfarts

Updates submodule

5 years agoFix anchors in Haddock
Mateusz Kowalczyk [Wed, 25 Jun 2014 08:53:56 +0000 (10:53 +0200)] 
Fix anchors in Haddock

Updates submodule

5 years agoTypos in comments
Gabor Greif [Fri, 6 Jun 2014 14:15:21 +0000 (16:15 +0200)] 
Typos in comments

5 years agoConvert loose sub-repos into proper submodules (re #8545)
Herbert Valerio Riedel [Sat, 22 Mar 2014 14:26:34 +0000 (15:26 +0100)] 
Convert loose sub-repos into proper submodules (re #8545)

Specifically, the following sub-repos/modules are converted:

 - libffi-tarballs
 - libraries/array
 - libraries/deepseq
 - libraries/directory
 - libraries/dph
 - libraries/filepath
 - libraries/haskell2010
 - libraries/haskell98
 - libraries/hoopl
 - libraries/hpc
 - libraries/old-locale
 - libraries/old-time
 - libraries/parallel
 - libraries/process
 - libraries/stm
 - libraries/unix
 - nofib
 - utils/hsc2hs

N.B. ghc-tarballs is not converted as it will probably be handled
     differently in the future.

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoFixup c1035d51e to behave more like in GHC 7.6
Herbert Valerio Riedel [Tue, 24 Jun 2014 20:58:41 +0000 (22:58 +0200)] 
Fixup c1035d51e to behave more like in GHC 7.6

The fix in c1035d51e (addressing #9231) was done under the assumption
that `Data.Fixed` is used only with power-of-10 `resolution`. This
follow-up fixup changes the behavior to be more consistent with the
previous behavior in GHC 7.6

For instance, for the following `B7` resolution

   > data B7
   > instance HasResolution B7 where resolution _ = 128

After this patch, the following behavior is now observable:

   > 1.070 :: Fixed B7
   1.062
   > 1.062 :: Fixed B7
   1.054

   > read "1.070" :: Fixed B7
   1.062
   > read "1.062" :: Fixed B7
   1.054

This doesn't provide the desirable "read . show == id" property
yet (which didn't hold in GHC 7.6 either), but at least `fromRational`
and `read` are consistent.

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoAdd more primops for atomic ops on byte arrays
Johan Tibell [Mon, 9 Jun 2014 09:43:21 +0000 (11:43 +0200)] 
Add more primops for atomic ops on byte arrays

Summary:
Add more primops for atomic ops on byte arrays

Adds the following primops:

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

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

 * fetchAddIntArray#
 * casIntArray#

5 years agoDescribe signature mini-backpack.
Edward Z. Yang [Tue, 24 Jun 2014 16:29:49 +0000 (17:29 +0100)] 
Describe signature mini-backpack.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
5 years agoAdd Note [Placeholder PatSyn kinds] in TcBinds
Simon Peyton Jones [Tue, 24 Jun 2014 12:24:36 +0000 (13:24 +0100)] 
Add Note [Placeholder PatSyn kinds] in TcBinds

This is just documentation for the fix to Trac #9161

5 years agoComment the expect_broken for Trac #9208
Simon Peyton Jones [Mon, 23 Jun 2014 16:37:56 +0000 (17:37 +0100)] 
Comment the expect_broken for Trac #9208

5 years agoMinor refactoring of interface to extraTyVarInfo
Simon Peyton Jones [Mon, 23 Jun 2014 16:16:48 +0000 (17:16 +0100)] 
Minor refactoring of interface to extraTyVarInfo

5 years agoFix regression in Data.Fixed Read instance (re #9231)
Herbert Valerio Riedel [Tue, 24 Jun 2014 09:42:06 +0000 (11:42 +0200)] 
Fix regression in Data.Fixed Read instance (re #9231)

`convertFixed` operates under the wrong assumption that
`Data.Fixed.resolution` returns a base-10 exponent `e`, whereas it
actually returns the power-of-10 value `10^e`.

So while the code (that was introduced in 5f19f951d8 / #7483) happens to
compute a correct result by coincidence, it allocates huge integer values
in the process (i.e. `10^(10^e)`) which cause long computations which
eventually result in out-of-memory conditions for `e`-values beyond
`Data.Fixed.Milli`.

A proper long-term fix would probably be to extend the `HasResolution`
type-class to have a 2nd method providing the `e` value.

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
Differential Revision: https://phabricator.haskell.org/D25

5 years agoMore updates to Backpack impl docs.
Edward Z. Yang [Mon, 23 Jun 2014 16:26:10 +0000 (17:26 +0100)] 
More updates to Backpack impl docs.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
5 years agoMark T9208 as broken when debugging is on
Joachim Breitner [Mon, 23 Jun 2014 15:50:47 +0000 (08:50 -0700)] 
Mark T9208 as broken when debugging is on

this seems to be expected, as explained by SPJ in comment 7 of #9208.

5 years agosync-all: infer remotepath from .gitmodules file
Thomas Miedema [Tue, 17 Jun 2014 15:27:04 +0000 (17:27 +0200)] 
sync-all: infer remotepath from .gitmodules file

After this commit, running `sync-all remote set-url` works properly for the
haddock package:

    command: ./sync-all -r git://git.haskell.org remote set-url origin
    before: git://git.haskell.org/packages/haddock.git
    after: git://git.haskell.org/haddock.git

By doing the `remotepath` lookup before the `$is_github_repo` check,
running `sync-all remote set-url` now also works properly for submodule
repos on github:

    command: ./sync-all -r git://github.com/ghc remote set-url origin
    before: git://github.com/ghc/packages/binary
    after: git://github.com/ghc/packages-binary

* Relevant prior commits:
4f4357 "Make `sync-all remote set-url` use normalized `/packages/` urls"
34b072 "Convert haddock into a proper submodule (re #8545)"
974a97 "sync-all: Apply submodule url rewriting also to stuff in util/"