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

5 years agosync-all: set and check variable $repo_is_submodule
Thomas Miedema [Sun, 22 Jun 2014 16:12:06 +0000 (18:12 +0200)] 
sync-all: set and check variable $repo_is_submodule

Not only does this make the code easier to read, it also fixes a bug.

Starting with commits 691c8a and ccce9f, certain subcommands should
behave differently for submodules. This was done by checking, for each
such subcommand:

    $remotepath eq "-"

This commit corrects that to the check:

    $$line{"remotepath"} eq "-".

Because when we have a clone of a local mirror (checked_out_tree=1),
remotepath actually gets set to $$line{"localpath"}.

5 years agosync-all: make --no-dph work for all subcommands
Thomas Miedema [Tue, 17 Jun 2014 17:21:37 +0000 (19:21 +0200)] 
sync-all: make --no-dph work for all subcommands

5 years agosync-all: die for real when required repo is missing
Thomas Miedema [Tue, 17 Jun 2014 16:25:33 +0000 (18:25 +0200)] 
sync-all: die for real when required repo is missing

Since commit 0e17d4, the default "tag" is "-", not "". It is never
undefined.

5 years agosync-all: delete dead code calling gitInitSubmodules
Thomas Miedema [Wed, 11 Jun 2014 15:12:35 +0000 (17:12 +0200)] 
sync-all: delete dead code calling gitInitSubmodules

When running './sync-all get', 'git submodule init' has to be (and is
always) executed, since .gitmodules might contain new submodules (see
commit c3db2b). As a result, after cloning the ghc repo and running the
initial './sync-all get', .git/config will always contain some submodule
sections. Therefore it is not needed to check for this on every
subsequent get or pull, and this code can be deleted.

5 years agosync-all: cleanup
Thomas Miedema [Wed, 11 Jun 2014 13:36:45 +0000 (15:36 +0200)] 
sync-all: cleanup

+ Remove dead code from the DarcsAges
+ Tweak `git config` flags
    * remove --local, it is not a valid flag
    * --get was used in some places, not in others
+ Simplify reading current branch
+ Delete duplicated code in help

5 years agoarclint: disable Bad Charset lint rule
Austin Seipp [Mon, 23 Jun 2014 09:02:44 +0000 (04:02 -0500)] 
arclint: disable Bad Charset lint rule

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoFix up b84748121e777d
Austin Seipp [Mon, 23 Jun 2014 06:31:15 +0000 (01:31 -0500)] 
Fix up b84748121e777d

I forgot to amend this to my last commit.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoFix #9047
Austin Seipp [Mon, 23 Jun 2014 05:07:10 +0000 (00:07 -0500)] 
Fix #9047

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoSimplify package dump for -v4
Edward Z. Yang [Sun, 22 Jun 2014 15:42:56 +0000 (08:42 -0700)] 
Simplify package dump for -v4

Summary:
Previously, on -v4  and greater, we dumped out the entire package
database, including lots of metadata that GHC doesn't really care about,
and is guaranteed to correspond to the equivalent in the local/global
package databases on disk.  So, to make this output more useful, on -v4
we instead just print package IDs, and the exposed and trusted flags
(E and T, which can be tweaked at runtime).

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

Reviewers: simonpj

Subscribers: simonmar, relrod

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

5 years agoAdd fake entries into the global kind environment for pattern synonyms.
Dr. ERDI Gergo [Sat, 21 Jun 2014 14:37:50 +0000 (22:37 +0800)] 
Add fake entries into the global kind environment for pattern synonyms.

This is needed to give meaningful error messages (instead of internal
panics) when a program tries to lift a pattern synonym into a kind.
(fixes T9161)

5 years agoUpdate documentation to follow 2dc3b476aff28
Edward Z. Yang [Thu, 19 Jun 2014 16:25:59 +0000 (09:25 -0700)] 
Update documentation to follow 2dc3b476aff28

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
5 years agoMore fixes and updates to implementation document
Edward Z. Yang [Fri, 20 Jun 2014 16:19:40 +0000 (17:19 +0100)] 
More fixes and updates to implementation document

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
5 years agoReject forall types in constraints in signatures
Simon Peyton Jones [Thu, 19 Jun 2014 16:26:11 +0000 (17:26 +0100)] 
Reject forall types in constraints in signatures

Fixes Trac #9196.  Thanks to archblob for an initial stab at this.
In the end I fixed it in the kind checker rather than the subsequent
validity check, (a) so that the error messages look more uniform,
and (b) so that I did not need to meddle with isPredTy.

5 years agoComment typo
Simon Peyton Jones [Thu, 19 Jun 2014 13:11:07 +0000 (14:11 +0100)] 
Comment typo

5 years agoMake splitStrProdDmd (and similarly Use) more robust
Simon Peyton Jones [Thu, 19 Jun 2014 08:46:24 +0000 (09:46 +0100)] 
Make splitStrProdDmd (and similarly Use) more robust

The issue here is avoiding a GHC crash when a program uses
unsafeCoerce is a dangerous (or even outright-wrong) way.

See Trac #9208

5 years agoImprove documentation of defaulting rules with OverloadedStrings
Simon Peyton Jones [Thu, 19 Jun 2014 08:44:30 +0000 (09:44 +0100)] 
Improve documentation of defaulting rules with OverloadedStrings

See #9206

5 years agoAdd a new section to the manual about hiding things that a module doesn't export
Simon Peyton Jones [Thu, 19 Jun 2014 08:24:50 +0000 (09:24 +0100)] 
Add a new section to the manual about hiding things that a module doesn't export

See Trac #9216

5 years agoTidy up the printing of single-predicate contexts
Simon Peyton Jones [Thu, 19 Jun 2014 08:01:51 +0000 (09:01 +0100)] 
Tidy up the printing of single-predicate contexts

This covers things like
   Eq a => blah   and   (?x::Int) => blah
where there is just one predicate. Previously we used an ad-hoc
test to decide whether to parenthesise it, but acutally there is
a much simpler solution: just use the existing precedence mechamism.

This applies both to Type and HsType.

5 years agoA bit more tracing of functional dependencies
Simon Peyton Jones [Wed, 18 Jun 2014 10:59:30 +0000 (11:59 +0100)] 
A bit more tracing of functional dependencies

5 years agoTypos in comments
Gabor Greif [Thu, 19 Jun 2014 21:19:54 +0000 (23:19 +0200)] 
Typos in comments

5 years agoFinish the rest of the writeup.
Edward Z. Yang [Thu, 19 Jun 2014 14:58:42 +0000 (15:58 +0100)] 
Finish the rest of the writeup.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
5 years agoTypos in comments
Gabor Greif [Wed, 18 Jun 2014 18:39:38 +0000 (20:39 +0200)] 
Typos in comments

5 years agoTypo
Jose Pedro Magalhaes [Thu, 19 Jun 2014 09:51:22 +0000 (10:51 +0100)] 
Typo

5 years agohaddock-library: allow 7.4.x building
Mateusz Kowalczyk [Wed, 18 Jun 2014 23:31:39 +0000 (01:31 +0200)] 
haddock-library: allow 7.4.x building

Updates submodule

5 years agoIn progress Backpack implementation docs.
Edward Z. Yang [Wed, 18 Jun 2014 21:59:23 +0000 (22:59 +0100)] 
In progress Backpack implementation docs.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
5 years agoOnly comments: add notes explaining the various oddities of the `Typeable` implement...
Iavor S. Diatchki [Wed, 18 Jun 2014 17:21:06 +0000 (10:21 -0700)] 
Only comments:  add notes explaining the various oddities of the `Typeable` implementation for type-level literals.

5 years agoHaddock: haddock-library release and Travis stuff
Mateusz Kowalczyk [Wed, 18 Jun 2014 07:05:50 +0000 (09:05 +0200)] 
Haddock: haddock-library release and Travis stuff

Updates submodule.

5 years agoaccept T9181 output
Simon Marlow [Tue, 17 Jun 2014 11:41:15 +0000 (12:41 +0100)] 
accept T9181 output

Not sure if my patch changed this, but it looks reasonable.

5 years agoOptimise the Typeable instance for type app a bit, and add a perf test
Simon Marlow [Tue, 17 Jun 2014 10:47:40 +0000 (11:47 +0100)] 
Optimise the Typeable instance for type app a bit, and add a perf test

Test Plan: validate

Reviewers: simonpj, austin

Subscribers: simonmar, relrod

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

5 years agoRedo instance to be more efficient (see #8778, #9203)
Iavor S. Diatchki [Mon, 16 Jun 2014 22:58:49 +0000 (15:58 -0700)] 
Redo instance to be more efficient (see #8778, #9203)

5 years agoUpdate the incorrect comment on when function was introduced.
Iavor S. Diatchki [Mon, 16 Jun 2014 22:56:19 +0000 (15:56 -0700)] 
Update the incorrect comment on when function was introduced.

5 years agoFix recomputation of TypeRep in the instance for Typeable (s a) (#9203)
Simon Marlow [Fri, 13 Jun 2014 15:57:16 +0000 (16:57 +0100)] 
Fix recomputation of TypeRep in the instance for Typeable (s a) (#9203)

Summary:
Every time we called typeRep on a type application, we were
recomputing the TypeRep.  This showed up in a benchmark I had: #9203.

Test Plan: Benchmark from #9203.

Reviewers: simonpj, austin

Subscribers: simonmar, relrod

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

5 years agoImplement `Typeable` support for type-level literals (#8778).
Iavor S. Diatchki [Sat, 14 Jun 2014 21:08:23 +0000 (14:08 -0700)] 
Implement `Typeable` support for type-level literals (#8778).

5 years agoFixes #95 :edit command should jump to the last error
Lorenzo Tabacchini [Sun, 8 Jun 2014 08:54:39 +0000 (10:54 +0200)] 
Fixes #95 :edit command should jump to the last error

5 years agoRemove forgotten redundant import
Simon Peyton Jones [Thu, 12 Jun 2014 21:48:09 +0000 (22:48 +0100)] 
Remove forgotten redundant import

5 years agoBytes allocated by haddock.base has crept up (again)
Simon Peyton Jones [Thu, 12 Jun 2014 16:23:25 +0000 (17:23 +0100)] 
Bytes allocated by haddock.base has crept up (again)

I don't know why, and I don't like the steady increase.
But I don't think my changes here are the cause.

5 years agoFix elemLocalRdrEnv (Trac #9160)
Simon Peyton Jones [Thu, 12 Jun 2014 15:42:37 +0000 (16:42 +0100)] 
Fix elemLocalRdrEnv (Trac #9160)

This was pretty obscure.  elemLocalRdrEnv was utterly wrong (replied
False when it should reply True) when given an Exact Name. That
doesn't happen often, but it does happen in the result of a TH splice.
The result was that an associated type didn't get a type variable that
lined up with its parent class (elemLocalRdrEnv is used in
RnTypes.bindHsTyVars), and that messed up the singletons package.

I've made a completely different test case to show up the bug:
indexed_types/should_fail/T9160

I also refactored RdrName.LocalRdrEnv to be a record with named
fields, which makes the code more robust and easy to understand.

5 years agoLine up kind and type variables correctly when desugaring TH brackets
Simon Peyton Jones [Thu, 12 Jun 2014 15:36:59 +0000 (16:36 +0100)] 
Line up kind and type variables correctly when desugaring TH brackets

This bug was causing Trac #9199

5 years agoBetter debug printing
Simon Peyton Jones [Thu, 12 Jun 2014 15:35:37 +0000 (16:35 +0100)] 
Better debug printing