ghc.git
5 years agoModule reexports, fixing #8407.
Edward Z. Yang [Fri, 4 Jul 2014 16:01:08 +0000 (17:01 +0100)] 
Module reexports, fixing #8407.

The general approach is to add a new field to the package database,
reexported-modules, which considered by the module finder as possible
module declarations.  Unlike declaring stub module files, multiple
reexports of the same physical package at the same name do not
result in an ambiguous import.

Has submodule updates for Cabal and haddock.

NB: When a reexport renames a module, that renaming is *not* accessible
from inside the package.  This is not so much a deliberate design choice
as for implementation expediency (reexport resolution happens only when
a package is in the package database.)

TODO: Error handling when there are duplicate reexports/etc is not very
well tested.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Conflicts:
compiler/main/HscTypes.lhs
testsuite/.gitignore
utils/haddock

5 years agoUpdate test suite output
Joachim Breitner [Fri, 25 Jul 2014 21:01:47 +0000 (23:01 +0200)] 
Update test suite output

after changes in 92587bf.

This problem was noticed on ghcspeed (although only by accident,
unfortunately, as a change from 0 to 1 is not reported in the summary).

5 years agoRefactor FFI error messages
Simon Peyton Jones [Fri, 25 Jul 2014 15:22:21 +0000 (16:22 +0100)] 
Refactor FFI error messages

This patch was provoked by Trac #5610, which I finally got a moment to look at.

In the end I added a new data type ErrUtils.Validity,

  data Validity
    = IsValid            -- Everything is fine
    | NotValid MsgDoc    -- A problem, and some indication of why

with some suitable combinators, and used it where appropriate (which touches
quite a few modules).  The main payoff is that error messages improve for
FFI type validation.

5 years ago[backpack] Rewrite compilation to be cleaner.
Edward Z. Yang [Fri, 25 Jul 2014 11:56:33 +0000 (12:56 +0100)] 
[backpack] Rewrite compilation to be cleaner.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
5 years agoCheck for boxed tau types in the LHS of type family instances
Simon Peyton Jones [Fri, 25 Jul 2014 09:29:35 +0000 (10:29 +0100)] 
Check for boxed tau types in the LHS of type family instances

Fixes Trac #9357

5 years agoUse the right kinds on the LHS in 'deriving' clauses
Simon Peyton Jones [Thu, 24 Jul 2014 11:49:04 +0000 (12:49 +0100)] 
Use the right kinds on the LHS in 'deriving' clauses

This patch fixes Trac #9359

5 years agoFixed issue with detection of duplicate record fields
Gintautas Miliauskas [Thu, 24 Jul 2014 12:45:26 +0000 (14:45 +0200)] 
Fixed issue with detection of duplicate record fields

Duplicate record fields would not be detected when given a type
with multiple data constructors, and the first data constructor
had a record field r1 and any consecutive data constructors
had multiple fields named r1.

This fixes #9156 and was reviewed in https://phabricator.haskell.org/D87

5 years agoAdd missing memory fence to atomicWriteIntArray#
Johan Tibell [Wed, 23 Jul 2014 11:12:10 +0000 (13:12 +0200)] 
Add missing memory fence to atomicWriteIntArray#

5 years agoFix test for fetchNandIntArray#
Johan Tibell [Wed, 23 Jul 2014 11:11:15 +0000 (13:11 +0200)] 
Fix test for fetchNandIntArray#

The test was incorrectly testing that NAND is associative, which it
isn't.

5 years agoX86 codegen: make LOCK a real instruction prefix
Johan Tibell [Wed, 23 Jul 2014 10:22:37 +0000 (12:22 +0200)] 
X86 codegen: make LOCK a real instruction prefix

Before LOCK was a separate instruction and this led to the register
allocator separating it from the instruction it was supposed to be a
prefix of, leading to illegal assembly such as

    lock mov

Fix contributed by PÁLI Gábor János.

5 years agoDuplicate word
Gabor Greif [Wed, 23 Jul 2014 18:32:56 +0000 (20:32 +0200)] 
Duplicate word

5 years agoIgnore tix files.
Edward Z. Yang [Wed, 23 Jul 2014 15:54:38 +0000 (16:54 +0100)] 
Ignore tix files.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
5 years agoWrite up rename on entry
Edward Z. Yang [Wed, 23 Jul 2014 15:34:07 +0000 (16:34 +0100)] 
Write up rename on entry

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
5 years agoDefinite compilation is a go
Edward Z. Yang [Wed, 23 Jul 2014 14:29:27 +0000 (15:29 +0100)] 
Definite compilation is a go

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
5 years agoAdd a summary section.
Edward Z. Yang [Tue, 22 Jul 2014 15:21:35 +0000 (16:21 +0100)] 
Add a summary section.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
5 years agoRewrite package/module identity section
Edward Z. Yang [Tue, 22 Jul 2014 14:55:59 +0000 (15:55 +0100)] 
Rewrite package/module identity section

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
5 years agoMake last a good consumer
Joachim Breitner [Tue, 22 Jul 2014 09:21:01 +0000 (11:21 +0200)] 
Make last a good consumer

Summary:
Make last a good consumer simply by implementing it as foldl. This fixes Trac: #9339.
Thanks to David Feuer for bringing it up.

Test Plan: perf/should_run/T9339 + general validation

Reviewers: austin

Reviewed By: austin

Subscribers: phaskell, simonmar, relrod, carter

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

Trac Issues: #9339

5 years agoUnbreak the build on FreeBSD/i386, where the default target arch is i486.
Gabor Pali [Mon, 21 Jul 2014 20:13:24 +0000 (22:13 +0200)] 
Unbreak the build on FreeBSD/i386, where the default target arch is i486.

The recent version of ghc-prim assumes a more modern processor as it
exploits built-in atomic operations, and some of them are not yet
present on i486.  Hence the -march flag is explicitly set to i686 for the
C compiler -- just to be in sync with the default of other distributions.

5 years agoAlways qualify on hi interface mismatch.
Edward Z. Yang [Mon, 21 Jul 2014 16:21:10 +0000 (17:21 +0100)] 
Always qualify on hi interface mismatch.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
5 years agoUpdate Cabal submodule to HEAD (1.21)
Edward Z. Yang [Mon, 21 Jul 2014 15:51:45 +0000 (08:51 -0700)] 
Update Cabal submodule to HEAD (1.21)

This reverts commit f23b2129aca24beb4ece0d5915f67c448dc64ae4.

5 years agoDocumentation for substringCheck.
Edward Z. Yang [Mon, 21 Jul 2014 15:22:13 +0000 (16:22 +0100)] 
Documentation for substringCheck.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
5 years agoRename PackageId to PackageKey, distinguishing it from Cabal's PackageId.
Edward Z. Yang [Sat, 19 Jul 2014 16:11:08 +0000 (17:11 +0100)] 
Rename PackageId to PackageKey, distinguishing it from Cabal's PackageId.

Summary:
Previously, both Cabal and GHC defined the type PackageId, and we expected
them to be roughly equivalent (but represented differently).  This refactoring
separates these two notions.

A package ID is a user-visible identifier; it's the thing you write in a
Cabal file, e.g. containers-0.9.  The components of this ID are semantically
meaningful, and decompose into a package name and a package vrsion.

A package key is an opaque identifier used by GHC to generate linking symbols.
Presently, it just consists of a package name and a package version, but
pursuant to #9265 we are planning to extend it to record other information.
Within a single executable, it uniquely identifies a package.  It is *not* an
InstalledPackageId, as the choice of a package key affects the ABI of a package
(whereas an InstalledPackageId is computed after compilation.)  Cabal computes
a package key for the package and passes it to GHC using -package-name (now
*extremely* misnamed).

As an added bonus, we don't have to worry about shadowing anymore.

As a follow on, we should introduce -current-package-key having the same role as
-package-name, and deprecate the old flag.  This commit is just renaming.

The haddock submodule needed to be updated.

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

Reviewers: simonpj, simonmar, hvr, austin

Subscribers: simonmar, relrod, carter

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

Conflicts:
compiler/main/HscTypes.lhs
compiler/main/Packages.lhs
utils/haddock

5 years agodocs: Delete old docbook cheat sheet
Austin Seipp [Mon, 21 Jul 2014 09:45:26 +0000 (04:45 -0500)] 
docs: Delete old docbook cheat sheet

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agodocs: Remove obsolete Visual Haskell document
Austin Seipp [Mon, 21 Jul 2014 09:37:26 +0000 (04:37 -0500)] 
docs: Remove obsolete Visual Haskell document

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoarclint: update linting configuration
Austin Seipp [Mon, 21 Jul 2014 09:33:27 +0000 (04:33 -0500)] 
arclint: update linting configuration

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoUpdate upstream Git repo url for `time` package
Herbert Valerio Riedel [Mon, 21 Jul 2014 14:10:32 +0000 (16:10 +0200)] 
Update upstream Git repo url for `time` package

The `time` package has recently moved its primary upstream location
to https://github.com/haskell/time.

This leaves `transformers` the only package used by GHC still requiring
darcs2git mirroring machinery.

5 years ago[ghc-pkg] Fix #5442 by using the flag db stack to modify packages.
Edward Z. Yang [Mon, 21 Jul 2014 12:50:19 +0000 (05:50 -0700)] 
[ghc-pkg] Fix #5442 by using the flag db stack to modify packages.

Summary:
Previously, the full database stack was used for ghc-pkg to
modify packages, which meant that commands like
'ghc-pkg unregister --user' worked the same as 'ghc-pkg unregister'.
Since package modification is a "read and write" operation, we
should use the flag db stack (which is currently used for reads)
to determine which database to update.

There is also a new flag --user-package-db, which lets you explicitly
set the user database (as seen by --user).  This was mostly added
to aid in testing, but could be useful for end users as well.

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

Reviewers: simonmar, hvr, austin

Subscribers: simonmar, relrod, carter

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

5 years agoMake 'ghc' a wired in package.
Edward Z. Yang [Sat, 19 Jul 2014 15:24:59 +0000 (16:24 +0100)] 
Make 'ghc' a wired in package.

Summary:
Previously, the GHC API was "semi" wired-in: it was installed with a
version number, but that version number was hard-coded into the compiler
and it wasn't really possible to install other copies of the GHC API.
This patch makes the GHC API more similar to existing wired-in packages
such as ghc-prim, and will be helpful when we start extending the amount
of information passed to -package-name.

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

Reviewers: simonmar, simonpj, hvr, austin

Subscribers: simonmar, relrod, carter

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

5 years agoTypos in note
Gabor Greif [Mon, 21 Jul 2014 08:39:35 +0000 (10:39 +0200)] 
Typos in note

5 years agoRevert "travis: Install process via cabal"
Joachim Breitner [Mon, 21 Jul 2014 07:21:48 +0000 (09:21 +0200)] 
Revert "travis: Install process via cabal"

This reverts commit c41b716d82b1722f909979d02a76e21e9b68886c.

With the Cabal bump reverted, this should build again, and we aim to
keep it buildable like this.

5 years agovagrant: move files around
Austin Seipp [Sun, 20 Jul 2014 23:27:46 +0000 (18:27 -0500)] 
vagrant: move files around

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoutils: remove old pvm scripts
Austin Seipp [Sun, 20 Jul 2014 23:25:49 +0000 (18:25 -0500)] 
utils: remove old pvm scripts

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoutils: delete obsolete heap-view program
Austin Seipp [Sun, 20 Jul 2014 23:24:11 +0000 (18:24 -0500)] 
utils: delete obsolete heap-view program

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agodriver: use absolute paths in ld scripts (#7452)
Austin Seipp [Sun, 20 Jul 2014 15:13:15 +0000 (10:13 -0500)] 
driver: use absolute paths in ld scripts (#7452)

Patch contributed by slowmo.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoData.List: Unterse/Obvious comment regarding CPP
Alexander Berntsen [Sat, 19 Jul 2014 04:56:00 +0000 (23:56 -0500)] 
Data.List: Unterse/Obvious comment regarding CPP

Test Plan: validate

Reviewers: austin

Reviewed By: austin

Subscribers: phaskell, simonmar, relrod, carter

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

5 years agorts: drop unused 'SpinLockCount' typedef
Sergei Trofimovich [Sat, 19 Jul 2014 04:55:46 +0000 (23:55 -0500)] 
rts: drop unused 'SpinLockCount' typedef

Summary: Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

Test Plan: git grep, git log -SSpinLockCount, build test

Reviewers: austin, simonmar

Reviewed By: austin, simonmar

Subscribers: phaskell, simonmar, relrod, carter

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

5 years agoMake GHCi permissions checks ignore root user.
Mathieu Boespflug [Sat, 19 Jul 2014 04:55:18 +0000 (23:55 -0500)] 
Make GHCi permissions checks ignore root user.

Summary:
As a security precaution, GHCi helpfully refuses to run a .ghci file if it is owned by another user. But if the that other user is root, then arguably GHCi should not refuse to interpret the file, because if root really was malicious, then the user would be having a bad day anyways.
This means that .ghci files installed in a global location, say under /usr/local/, can now be read.

Fixes #9324

Test Plan:
```
$ sudo touch .ghci
$ ghci
```
Notice that the warning about the file being owned by someone else is now gone.

Reviewers: austin

Reviewed By: austin

Subscribers: phaskell, simonmar, carter, nomeata, relrod

Projects: #ghc

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

5 years agofix inconsistency in exported functions from TcSplice.lhs/lhs-boot files when GHCI...
Karel Gardas [Sat, 19 Jul 2014 04:54:52 +0000 (23:54 -0500)] 
fix inconsistency in exported functions from TcSplice.lhs/lhs-boot files when GHCI is not defined

Summary:
This patch fixes inconsistency in exported functions from TcSplice.lhs and TcSplice.lhs-boot
files. It looks like only GHC HEAD is sensitive to it and complains about it while bootstraping
another HEAD. At least this is what happening on Solaris/AMD64 builder machine where GHC 7.9.20140620
is used as a boostrap compiler. The failure does not happen on another builders.

Test Plan: validate

Reviewers: austin

Reviewed By: austin

Subscribers: phaskell, simonmar, relrod, carter

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

5 years agoAdding more parser exports and some documentation.
Andrew Gibiansky [Sat, 19 Jul 2014 04:54:26 +0000 (23:54 -0500)] 
Adding more parser exports and some documentation.

Summary: Add a few exports to be generated by the Happy parser module. Add documentation showing how to use the Happy parser.

Test Plan: Validate

Reviewers: carter, austin

Reviewed By: austin

Subscribers: phaskell, simonmar, relrod, carter

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

5 years agoAdd PolyKinds extension to Data.Monoid
Alexander Berntsen [Sat, 19 Jul 2014 04:53:48 +0000 (23:53 -0500)] 
Add PolyKinds extension to Data.Monoid

Summary:
Carl Howells pointed out[0] that the `Monoid` instance for
`Data.Proxy.Proxy` is only defined for types with kind *.

This is a very mild change. Furthermore, Edward Kmett revealed[1] that
it was supposed to be there all along -- the extension simply got lost
in commit 1d1ff77aaa09efaddc8cfe0dcf92d6763297cf11, as pointed out by
Adam Vogt[2]. This used to be correct in GHC 7.6, so this commit fixes a
regression.

This addresses #9317.

[0] <http://www.haskell.org/pipermail/libraries/2014-July/023261.html>.
[1] <http://www.haskell.org/pipermail/libraries/2014-July/023267.html>.
[2] <http://www.haskell.org/pipermail/libraries/2014-July/023265.html>.

Signed-off-by: Alexander Berntsen <alexander@plaimi.net>
Test Plan: See [0]

Reviewers: austin, hvr, ekmett

Reviewed By: austin, hvr, ekmett

Subscribers: phaskell, simonmar, relrod, carter

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

5 years agotypes: detabify/dewhitespace Kind
Austin Seipp [Sat, 19 Jul 2014 03:32:13 +0000 (22:32 -0500)] 
types: detabify/dewhitespace Kind

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoutils: detabify/dewhitespace Digraph
Austin Seipp [Sat, 19 Jul 2014 03:31:13 +0000 (22:31 -0500)] 
utils: detabify/dewhitespace Digraph

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agonativeGen: detabify/dewhitespace SPARC/CodeGen/Base
Austin Seipp [Sat, 19 Jul 2014 03:30:25 +0000 (22:30 -0500)] 
nativeGen: detabify/dewhitespace SPARC/CodeGen/Base

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agonativeGen: detabify/dewhitespace SPARC/CodeGen/Gen32
Austin Seipp [Sat, 19 Jul 2014 03:30:08 +0000 (22:30 -0500)] 
nativeGen: detabify/dewhitespace SPARC/CodeGen/Gen32

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agonativeGen: detabify/dewhitespace SPARC/CodeGen/Sanity
Austin Seipp [Sat, 19 Jul 2014 03:29:47 +0000 (22:29 -0500)] 
nativeGen: detabify/dewhitespace SPARC/CodeGen/Sanity

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agonativeGen: detabify/dewhitespace SPARC/CodeGen/Expand
Austin Seipp [Sat, 19 Jul 2014 03:29:21 +0000 (22:29 -0500)] 
nativeGen: detabify/dewhitespace SPARC/CodeGen/Expand

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agonativeGen: detabify/dewhitespace SPARC/CodeGen/Amode
Austin Seipp [Sat, 19 Jul 2014 03:29:03 +0000 (22:29 -0500)] 
nativeGen: detabify/dewhitespace SPARC/CodeGen/Amode

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agonativeGen: detabify/dewhitespace SPARC/CodeGen/CondCode
Austin Seipp [Sat, 19 Jul 2014 03:28:40 +0000 (22:28 -0500)] 
nativeGen: detabify/dewhitespace SPARC/CodeGen/CondCode

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agonativeGen: detabify/dewhitespace SPARC/Cond
Austin Seipp [Sat, 19 Jul 2014 03:28:05 +0000 (22:28 -0500)] 
nativeGen: detabify/dewhitespace SPARC/Cond

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agonativeGen: detabify/dewhitespace SPARC/Regs
Austin Seipp [Sat, 19 Jul 2014 03:27:51 +0000 (22:27 -0500)] 
nativeGen: detabify/dewhitespace SPARC/Regs

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agonativeGen: detabify/dewhitespace SPARC/Instr
Austin Seipp [Sat, 19 Jul 2014 03:27:25 +0000 (22:27 -0500)] 
nativeGen: detabify/dewhitespace SPARC/Instr

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agonativeGen: detabify/dewhitespace SPARC/ShortcutJump
Austin Seipp [Sat, 19 Jul 2014 03:27:03 +0000 (22:27 -0500)] 
nativeGen: detabify/dewhitespace SPARC/ShortcutJump

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agonativeGen: detabify/dewhitespace SPARC/Imm
Austin Seipp [Sat, 19 Jul 2014 03:26:33 +0000 (22:26 -0500)] 
nativeGen: detabify/dewhitespace SPARC/Imm

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agonativeGen: detabify/dewhitespace SPARC/Stack
Austin Seipp [Sat, 19 Jul 2014 03:26:20 +0000 (22:26 -0500)] 
nativeGen: detabify/dewhitespace SPARC/Stack

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agonativeGen: detabify/dewhitespace TargetReg
Austin Seipp [Sat, 19 Jul 2014 03:25:29 +0000 (22:25 -0500)] 
nativeGen: detabify/dewhitespace TargetReg

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agonativeGen: detabify/dewhitespace RegClass
Austin Seipp [Sat, 19 Jul 2014 03:25:01 +0000 (22:25 -0500)] 
nativeGen: detabify/dewhitespace RegClass

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agonativeGen: detabify/dewhitespace PPC/RegInfo
Austin Seipp [Sat, 19 Jul 2014 03:24:40 +0000 (22:24 -0500)] 
nativeGen: detabify/dewhitespace PPC/RegInfo

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agonativeGen: detabify/dewhitespace PPC/Cond
Austin Seipp [Sat, 19 Jul 2014 03:24:16 +0000 (22:24 -0500)] 
nativeGen: detabify/dewhitespace PPC/Cond

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agonativeGen: detabify/dewhitespace X86/RegInfo
Austin Seipp [Sat, 19 Jul 2014 03:23:59 +0000 (22:23 -0500)] 
nativeGen: detabify/dewhitespace X86/RegInfo

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agonativeGen: detabify/dewhitespace Reg
Austin Seipp [Sat, 19 Jul 2014 03:23:33 +0000 (22:23 -0500)] 
nativeGen: detabify/dewhitespace Reg

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agonativeGen: detabify/dewhitespace Size
Austin Seipp [Sat, 19 Jul 2014 03:22:59 +0000 (22:22 -0500)] 
nativeGen: detabify/dewhitespace Size

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoprelude: detabify/unwhitespace PrelInfo
Austin Seipp [Sat, 19 Jul 2014 03:21:28 +0000 (22:21 -0500)] 
prelude: detabify/unwhitespace PrelInfo

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agomain: detabify/unwhitespace PprTyThing
Austin Seipp [Sat, 19 Jul 2014 03:13:39 +0000 (22:13 -0500)] 
main: detabify/unwhitespace PprTyThing

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoghci: detabify/unwhitespace ByteCodeInstr
Austin Seipp [Sat, 19 Jul 2014 03:12:55 +0000 (22:12 -0500)] 
ghci: detabify/unwhitespace ByteCodeInstr

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoghci: detabify/unwhitespace ByteCodeGen
Austin Seipp [Sat, 19 Jul 2014 03:12:29 +0000 (22:12 -0500)] 
ghci: detabify/unwhitespace ByteCodeGen

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agocmm: detabify/unwhitespace CmmLex
Austin Seipp [Sat, 19 Jul 2014 03:11:28 +0000 (22:11 -0500)] 
cmm: detabify/unwhitespace CmmLex

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agocmm: detabify/unwhitespace CmmInfo
Austin Seipp [Sat, 19 Jul 2014 03:11:08 +0000 (22:11 -0500)] 
cmm: detabify/unwhitespace CmmInfo

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoprofiling: detabify/unwhitespace CostCentre
Austin Seipp [Sat, 19 Jul 2014 03:09:47 +0000 (22:09 -0500)] 
profiling: detabify/unwhitespace CostCentre

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoparser: detabify/dewhitespace cutils.c
Austin Seipp [Sat, 19 Jul 2014 03:09:03 +0000 (22:09 -0500)] 
parser: detabify/dewhitespace cutils.c

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoparser: detabify/dewhitespace Ctype
Austin Seipp [Sat, 19 Jul 2014 03:08:56 +0000 (22:08 -0500)] 
parser: detabify/dewhitespace Ctype

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoghci: detabify/dewhitespace RtClosureInspect
Austin Seipp [Sat, 19 Jul 2014 03:08:43 +0000 (22:08 -0500)] 
ghci: detabify/dewhitespace RtClosureInspect

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoRevert "Update Cabal submodule to HEAD (1.21)"
Edward Z. Yang [Sun, 20 Jul 2014 21:50:44 +0000 (22:50 +0100)] 
Revert "Update Cabal submodule to HEAD (1.21)"

This reverts commit af28e61c7e84b8eb89fdfd9671af83a2a13f554a.
We'll wait until it's possible to bootstrap from 7.6 out of the box.

5 years agoComments only
Simon Peyton Jones [Sun, 20 Jul 2014 20:47:50 +0000 (21:47 +0100)] 
Comments only

5 years agoDocumentation typo
Gabor Greif [Sun, 20 Jul 2014 20:08:48 +0000 (22:08 +0200)] 
Documentation typo

5 years agoDocument OVERLAP pragmas.
Iavor S. Diatchki [Sat, 19 Jul 2014 23:54:35 +0000 (16:54 -0700)] 
Document OVERLAP pragmas.

5 years agotravis: Install process via cabal
Joachim Breitner [Sat, 19 Jul 2014 13:05:53 +0000 (15:05 +0200)] 
travis: Install process via cabal

and install to global data base (bad practice, but ok on a throw-away CI
system).

5 years agoSet i686 as the minimum architecture on 32-bit mingw
niklas [Thu, 17 Jul 2014 19:39:40 +0000 (21:39 +0200)] 
Set i686 as the minimum architecture on 32-bit mingw

Signed-off-by: Austin Seipp <austin@well-typed.com>
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>