ghc.git
5 years agoLimit upper versions of Alex and Happy
Jan Stolarek [Wed, 18 Sep 2013 07:47:58 +0000 (08:47 +0100)] 
Limit upper versions of Alex and Happy

This is temporary until new bool primops have been pushed.

5 years agoFix-up Docbook XML broken in f4046b508a5a7
Herbert Valerio Riedel [Wed, 18 Sep 2013 06:54:45 +0000 (08:54 +0200)] 
Fix-up Docbook XML broken in f4046b508a5a7

5 years agoSuppress unused variable when OS does not support setuid.
Edward Z. Yang [Wed, 18 Sep 2013 02:59:17 +0000 (19:59 -0700)] 
Suppress unused variable when OS does not support setuid.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
5 years agoChange role annotation syntax.
Richard Eisenberg [Wed, 11 Sep 2013 04:52:56 +0000 (00:52 -0400)] 
Change role annotation syntax.

This fixes bugs #8185, #8234, and #8246. The new syntax is explained
in the comments to #8185, appears in the "Roles" subsection of the
manual, and on the [wiki:Roles] wiki page.

This change also removes the ability for a role annotation on type
synonyms, as noted in #8234.

5 years agoRelease Notes: New printf features in base
Joachim Breitner [Tue, 17 Sep 2013 08:56:42 +0000 (10:56 +0200)] 
Release Notes: New printf features in base

5 years agoAllow branches with / in them (e.g. wip/) in ./sync-all
Joachim Breitner [Tue, 17 Sep 2013 13:45:48 +0000 (15:45 +0200)] 
Allow branches with / in them (e.g. wip/) in ./sync-all

5 years agoAdd warning comment about Mach-O section name hack.
Edward Z. Yang [Tue, 17 Sep 2013 07:55:46 +0000 (00:55 -0700)] 
Add warning comment about Mach-O section name hack.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
5 years agoImplement ctors support for Linux.
Edward Z. Yang [Tue, 17 Sep 2013 00:17:35 +0000 (17:17 -0700)] 
Implement ctors support for Linux.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
5 years agoFurther linguistic improvement of that one line
Joachim Breitner [Mon, 16 Sep 2013 16:09:36 +0000 (18:09 +0200)] 
Further linguistic improvement of that one line

now brought to you by Gabor Greif... ;-)

5 years agoTypo in release notes
Joachim Breitner [Mon, 16 Sep 2013 15:48:10 +0000 (17:48 +0200)] 
Typo in release notes

5 years agos/TypeNats/DataKinds/ in release notes.
Austin Seipp [Mon, 16 Sep 2013 15:45:32 +0000 (10:45 -0500)] 
s/TypeNats/DataKinds/ in release notes.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoMake sure type literals aren't negative (#8306)
Austin Seipp [Mon, 16 Sep 2013 15:05:44 +0000 (10:05 -0500)] 
Make sure type literals aren't negative (#8306)

As Krzysztof pointed out in #8306, with NegativeLiterals and DataKinds,
definitions such as:

  type T = -1

were accepted, although type literals must be greater than zero.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoRelease Notes: Document Data.Bool.bool (#8302)
Joachim Breitner [Mon, 16 Sep 2013 15:34:35 +0000 (17:34 +0200)] 
Release Notes: Document Data.Bool.bool (#8302)

5 years agoComment typo only
Gabor Greif [Mon, 16 Sep 2013 10:09:37 +0000 (12:09 +0200)] 
Comment typo only

5 years agoRun ctors initializers backwards, see #5435.
Edward Z. Yang [Mon, 16 Sep 2013 06:53:01 +0000 (23:53 -0700)] 
Run ctors initializers backwards, see #5435.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
5 years agoDistinguish between hs-main cases when giving rtsopts advice.
Edward Z. Yang [Sat, 14 Sep 2013 05:11:12 +0000 (22:11 -0700)] 
Distinguish between hs-main cases when giving rtsopts advice.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
5 years agoMention new solver for -XTypeNats in release notes.
Austin Seipp [Sun, 15 Sep 2013 21:06:30 +0000 (16:06 -0500)] 
Mention new solver for -XTypeNats in release notes.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoFix the type signatures of new copy primops.
Austin Seipp [Sun, 15 Sep 2013 20:15:17 +0000 (15:15 -0500)] 
Fix the type signatures of new copy primops.

They claimed to work over 'ST RealWorld', when instead they should be
parameterized in the state type. This fixes the cgrun070.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoFix freeHaskellFunPtr crash on iOS.
Austin Seipp [Sun, 15 Sep 2013 17:58:45 +0000 (12:58 -0500)] 
Fix freeHaskellFunPtr crash on iOS.

Authored-by: Stephen Blackheath <...@blacksapphire.com>
Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoNew primops for byte range copies ByteArray# <-> Addr#
Duncan Coutts [Fri, 13 Sep 2013 08:19:24 +0000 (09:19 +0100)] 
New primops for byte range copies ByteArray# <-> Addr#

We have primops for copying ranges of bytes between ByteArray#s:
 * ByteArray# -> MutableByteArray#
 * MutableByteArray# -> MutableByteArray#
This extends it with three further cases:
 * Addr# -> MutableByteArray#
 * ByteArray# -> Addr#
 * MutableByteArray# -> Addr#
One use case for these is copying between ForeignPtr-based
representations and in-heap arrays (like Text, UArray etc).

The implementation is essentially the same as for the existing
primops, and shares the memcpy stuff in the code generators.

Defficiencies / future directions: none of these primops (existing
or the new ones) let one take advantage of knowing that ByteArray#s
are word-aligned in memory. Though it is unclear that any of the
code generators would make use of this information unless the size
to copy is also known at compile time.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoCause "make install" to install dynamic libraries (#8194)
Bryan O'Sullivan [Fri, 13 Sep 2013 20:13:04 +0000 (13:13 -0700)] 
Cause "make install" to install dynamic libraries (#8194)

Our special ghc-cabal command needs to be told that we are building with
dynamic library support when it does its copying. We do so by passing an
extra parameter from ghc.mk.

5 years ago80 columns
Simon Marlow [Sat, 14 Sep 2013 18:52:36 +0000 (19:52 +0100)] 
80 columns

5 years agoadd stg_MUT_VAR_CLEAN_info and stg_MUT_VAR_DIRTY_info to the symbol table
Simon Marlow [Wed, 24 Jul 2013 09:40:24 +0000 (10:40 +0100)] 
add stg_MUT_VAR_CLEAN_info and stg_MUT_VAR_DIRTY_info to the symbol table

5 years agoNuke tabs in rts/posix/OSMem.c
Austin Seipp [Sat, 14 Sep 2013 17:35:52 +0000 (12:35 -0500)] 
Nuke tabs in rts/posix/OSMem.c

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoFix getPageSize to actually cache the page size.
Austin Seipp [Sat, 14 Sep 2013 17:20:48 +0000 (12:20 -0500)] 
Fix getPageSize to actually cache the page size.

This fixes #8289.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoMention coerce in the release notes
Joachim Breitner [Sat, 14 Sep 2013 10:52:10 +0000 (12:52 +0200)] 
Mention coerce in the release notes

It is not added to the section on Special built-in functions because
the (from a user POV related) unsafeCoerce has been removed there
recently.

5 years agoFix links in #special-ids section
Joachim Breitner [Sat, 14 Sep 2013 10:28:01 +0000 (12:28 +0200)] 
Fix links in #special-ids section

This completes the change from [7ea49661c]: GHC.Exts lives in base, not
in ghc-prim.

5 years agoGive language pragma suggestions without -X
Joachim Breitner [Fri, 13 Sep 2013 11:52:18 +0000 (13:52 +0200)] 
Give language pragma suggestions without -X

for easier copy'n'paste. This fixes: #3647

5 years agoImplement __mod_init_func for Mach-O. Finishes support for init in #5435.
Edward Z. Yang [Sat, 14 Sep 2013 02:15:40 +0000 (19:15 -0700)] 
Implement __mod_init_func for Mach-O. Finishes support for init in #5435.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
5 years agoImplement .ctor support for PEi386.
Edward Z. Yang [Fri, 6 Sep 2013 06:37:37 +0000 (23:37 -0700)] 
Implement .ctor support for PEi386.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
5 years agoImplement .init/.init_array support for ELF.
Edward Z. Yang [Sat, 31 Aug 2013 02:18:28 +0000 (19:18 -0700)] 
Implement .init/.init_array support for ELF.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
5 years agoFix rebase fallout
Joachim Breitner [Fri, 13 Sep 2013 22:07:46 +0000 (00:07 +0200)] 
Fix rebase fallout

To push what was validated, not just what was commited.

5 years agoIntroduce coerce :: Coercible a b -> a -> b
Joachim Breitner [Fri, 13 Sep 2013 16:40:36 +0000 (18:40 +0200)] 
Introduce coerce :: Coercible a b -> a -> b

This is the result of the design at
http://ghc.haskell.org/trac/ghc/wiki/NewtypeWrappers

The goal is to be able to convert between, say [First Int] and [Last
Int] with zero run-time overhead. To that end, we introduce a special
two parameter type class Coercible whose instances are created
automatically and on-the fly. This relies on and exploits the recent
addition of roles to core.

5 years agoExpose tcTyConsOfType as Types.tyConsOfType
Joachim Breitner [Fri, 13 Sep 2013 12:17:40 +0000 (14:17 +0200)] 
Expose tcTyConsOfType as Types.tyConsOfType

and add related function tyConsOfTyCon.

5 years agoOutputable.isOrAre: "is" or "are" for correct grammar
Joachim Breitner [Fri, 13 Sep 2013 12:09:12 +0000 (14:09 +0200)] 
Outputable.isOrAre: "is" or "are" for correct grammar

5 years agoExpose more in the TcS monad
Joachim Breitner [Fri, 13 Sep 2013 12:08:28 +0000 (14:08 +0200)] 
Expose more in the TcS monad

in preparation for the Coercible class implementation.

5 years agoAllow primclass and class constraints in primops
Joachim Breitner [Fri, 13 Sep 2013 12:06:46 +0000 (14:06 +0200)] 
Allow primclass and class constraints in primops

In preparation for the primitive class Coercible

5 years agoRelease note for new `instance Data Data.Version`
Herbert Valerio Riedel [Fri, 13 Sep 2013 16:09:06 +0000 (18:09 +0200)] 
Release note for new `instance Data Data.Version`

Implemented in [e17549c80425f3c8a8a672c65bbff00290839f3c/base]

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoUpdate Cabal to current upstream `1.18` branch tip
Herbert Valerio Riedel [Fri, 13 Sep 2013 15:30:38 +0000 (17:30 +0200)] 
Update Cabal to current upstream `1.18` branch tip

The new commits inlcude AMP-warning fixes and support
for the new `instance Data Data.Version` provided by `base`

5 years agoMissing printf path format change
Simon Peyton Jones [Fri, 13 Sep 2013 06:46:47 +0000 (07:46 +0100)] 
Missing printf path format change

5 years agoReplace reference to `Data.Generics` with `Data.Data`
Herbert Valerio Riedel [Fri, 13 Sep 2013 10:51:37 +0000 (12:51 +0200)] 
Replace reference to `Data.Generics` with `Data.Data`

The `Data` definitions were moved from `Data.Generics` to
`Data.Data` via [5a9e76d24776608a3e14ba94f1dfa0cac072c251/base]

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoRename -ddump-cmm-rewrite to -ddump-cmm-sink
Jan Stolarek [Fri, 13 Sep 2013 07:48:54 +0000 (08:48 +0100)] 
Rename -ddump-cmm-rewrite to -ddump-cmm-sink

This makes it consistent with the corresponding -cmm-sink flag

5 years agoFix static GHCi build (#8270)
Austin Seipp [Fri, 13 Sep 2013 07:01:33 +0000 (02:01 -0500)] 
Fix static GHCi build (#8270)

When Ryan merged in the atomics branch, he made atomic_inc and
atomic_dec EXTERN_INLINE functions, meaning their definitions
became part of object files in the non-threaded build, instead of being
inlined. As a result, this broke the linker for static GHCi, since it
couldn't properly resolve the now-externally defined functions.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoAdd support for evaluation of type-level natural numbers.
Iavor S. Diatchki [Fri, 13 Sep 2013 06:19:21 +0000 (23:19 -0700)] 
Add support for evaluation of type-level natural numbers.

This patch implements some simple evaluation of type-level expressions
featuring natural numbers.  We can evaluate *concrete* expressions that
use the built-in type families (+), (*), (^), and (<=?), declared in
GHC.TypeLits.   We can also do some type inference involving these
functions.  For example, if we encounter a constraint such as `(2 + x) ~ 5`
we can infer that `x` must be 3.  Note, however, this is used only to
resolve unification variables (i.e., as a form of a constraint improvement)
and not to generate new facts.  This is similar to how functional
dependencies work in GHC.

The patch adds a new form of coercion, `AxiomRuleCo`, which makes use
of a new form of axiom called `CoAxiomRule`.  This is the form of evidence
generate when we solve a constraint, such as `(1 + 2) ~ 3`.

The patch also adds support for built-in type-families, by adding a new
form of TyCon rhs: `BuiltInSynFamTyCon`.  such built-in type-family
constructors contain a record with functions that are used by the
constraint solver to simplify and improve constraints involving the
built-in function (see `TcInteract`).  The record in defined in `FamInst`.

The type constructors and rules for evaluating the type-level functions
are in a new module called `TcTypeNats`.

5 years agoImprove sinking pass
Jan Stolarek [Thu, 12 Sep 2013 13:29:37 +0000 (14:29 +0100)] 
Improve sinking pass

This commit does two things:

  * Allows duplicating of global registers and literals by inlining
    them. Previously we would only inline global register or literal
    if it was used only once.

  * Changes method of determining conflicts between a node and an
    assignment. New method has two advantages. It relies on
    DefinerOfRegs and UserOfRegs typeclasses, so if a set of registers
    defined or used by a node should ever change, `conflicts` function
    will use the changed definition. This definition also catches
    more cases than the previous one (namely CmmCall and CmmForeignCall)
    which is a step towards making it possible to run sinking pass
    before stack layout (currently this doesn't work).

This patch also adds a lot of comments that are result of about two-week
long investigation of how sinking pass works and why it does what it does.

5 years agoAdd missing semicolon in rts/Linker.c (#8271)
Jan Stolarek [Thu, 12 Sep 2013 10:44:20 +0000 (11:44 +0100)] 
Add missing semicolon in rts/Linker.c (#8271)

And remove some trailing whitespaces from that file.

5 years agoImplement the AMP warning (#8004)
Austin Seipp [Mon, 9 Sep 2013 18:40:06 +0000 (13:40 -0500)] 
Implement the AMP warning (#8004)

This patch implements a warning when definitions conflict with the
Applicative-Monad Proposal (AMP), described in #8004. Namely, this will
cause a warning iff:

    * You have an instance of Monad, but not Applicative
    * You have an instance of MonadPlus, but not Alternative
    * You locally defined a function named join, <*>, or pure.

In GHC 7.10, these warnings will actually be enforced with superclass
constraints through changes in base, so programs will fail to compile
then.

This warning is enabled by default. Unfortunately, not all of
our upstream libraries have accepted the appropriate patches. So we
temporarily fix ./validate by ignoring the AMP warning.

Dan Rosén made an initial implementation of this change, and the
remaining work was finished off by David Luposchainsky. I finally made
some minor refactorings.

Authored-by: Dan Rosén <danr@chalmers.se>
Authored-by: David Luposchainsky <dluposchainsky@gmail.com>
Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoFix AMP warnings.
Austin Seipp [Wed, 11 Sep 2013 23:46:54 +0000 (18:46 -0500)] 
Fix AMP warnings.

Authored-by: David Luposchainsky <dluposchainsky@gmail.com>
Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoUser guide typo: Missing ) in #language-pragma
Joachim Breitner [Wed, 11 Sep 2013 20:57:41 +0000 (22:57 +0200)] 
User guide typo: Missing ) in #language-pragma

5 years agoUpdate submodule `random` to point to latest HEAD
Herbert Valerio Riedel [Wed, 11 Sep 2013 13:37:19 +0000 (15:37 +0200)] 
Update submodule `random` to point to latest HEAD

5 years agoDrop proc-points that don't exist in the graph (#8205)
Jan Stolarek [Wed, 11 Sep 2013 11:17:10 +0000 (12:17 +0100)] 
Drop proc-points that don't exist in the graph (#8205)

On some architectures it might happen that stack layout pass will
invalidate the list of calculated procpoints by dropping some of
them. We fix this by checking whether a proc-point is in a graph
at the beginning of proc-point analysis. This is a speculative
fix for #8205.

5 years agoGHCi: Fix multi-line input line/column-number refs
Herbert Valerio Riedel [Thu, 11 Jul 2013 16:21:29 +0000 (18:21 +0200)] 
GHCi: Fix multi-line input line/column-number refs

This commit addresses #8051 by fixing

 - Incorrect column indices reported in error messages for
   single-line and multi-line input,

 - incorrect line numbers reported in error messages for
   expressions entered in multi-line input, and

 - inhibiting the confusing interaction between `:{` and `:set +m`
   causing the triggering of implicit multi-line continuation
   mode right after `:}` terminates the multi-line entry block.

5 years agoUpdate Git repo URL in `bin-packages-db.cabal`
Herbert Valerio Riedel [Wed, 11 Sep 2013 11:16:11 +0000 (13:16 +0200)] 
Update Git repo URL in `bin-packages-db.cabal`

This is related to #8121

5 years agofactor 'tcRnModuleTcRnM' out of 'tcRnModule' and export it
Nicolas Frisby [Tue, 10 Sep 2013 18:00:19 +0000 (13:00 -0500)] 
factor 'tcRnModuleTcRnM' out of 'tcRnModule' and export it

'tcRnModuleTcRnM' builds the TcRnM monad computation that is the bulk of
'tcRnModule'

This commit makes it simpler for courageous Core plugins to invoke the
typechecker. In particular, they no longer need to copy-and-paste what is now
the body of 'tcRnModuleTcRnM'. The key change is that the 'tcRnModuleTcRnM'
computation can be run with (a hypothetical) 'initTcFromCoreM' instead of
'initTc'.

5 years agoImprove error reporting for "relevant bindings" again (Trac #8233)
Simon Peyton Jones [Tue, 10 Sep 2013 16:55:59 +0000 (17:55 +0100)] 
Improve error reporting for "relevant bindings" again (Trac #8233)

This patch makes a number of related improvements:

* Displays relevant bindings in innermost-first order.
  The inner ones are closer to the error.

* Does not display syntactically top-level bindings,
  unless you say -fno-max-relevant-bindings.
  This is what Trac #8233 was mainly about

* Makes the TopLevelFlag in a TcIdBinder really mean
  "syntactically top level".  It was a bit vague before.

There was some associated simplification, because we no longer
need to pas a TopLevelFlag to tcMonoBinds and friends.

5 years agoImprove the insolubility check when quantifying
Simon Peyton Jones [Tue, 10 Sep 2013 10:42:03 +0000 (11:42 +0100)] 
Improve the insolubility check when quantifying

See Note [Quantification with errors]
Fixes Trac #8262

5 years agoComments only
Simon Peyton Jones [Tue, 10 Sep 2013 10:39:05 +0000 (11:39 +0100)] 
Comments only

5 years agoImprove -flate-dmd-anal documentation
Simon Peyton Jones [Tue, 10 Sep 2013 10:38:31 +0000 (11:38 +0100)] 
Improve -flate-dmd-anal documentation

5 years agoRemove dead code
Jan Stolarek [Mon, 9 Sep 2013 15:11:53 +0000 (16:11 +0100)] 
Remove dead code

5 years agoMore release note fixes.
Austin Seipp [Tue, 10 Sep 2013 03:11:51 +0000 (22:11 -0500)] 
More release note fixes.

This is what I get for being so hasty for release notes.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoTypo fix. Spotted by Mikhail Glushenkov.
Austin Seipp [Tue, 10 Sep 2013 03:07:19 +0000 (22:07 -0500)] 
Typo fix. Spotted by Mikhail Glushenkov.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoAdd release notes for parallel compilation driver.
Austin Seipp [Tue, 10 Sep 2013 02:20:45 +0000 (21:20 -0500)] 
Add release notes for parallel compilation driver.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoFix ./validate with GHC 7.6 as bootstrap compiler.
Austin Seipp [Tue, 10 Sep 2013 02:03:57 +0000 (21:03 -0500)] 
Fix ./validate with GHC 7.6 as bootstrap compiler.

7.6 deprecated the Control.Concurrent.QSem module (to be removed later,)
but according to Patrick it was actually un-deprecated. As a result,
validate fails if your bootstrap compiler is 7.6, since it throws a
DEPRECATED warning.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoMerge branch 'ghc-parmake-gsoc' (#910)
Patrick Palka [Mon, 9 Sep 2013 20:28:02 +0000 (16:28 -0400)] 
Merge branch 'ghc-parmake-gsoc' (#910)

5 years agoRevision to release notes for the new Typeable.
Richard Eisenberg [Mon, 9 Sep 2013 18:20:13 +0000 (14:20 -0400)] 
Revision to release notes for the new Typeable.

5 years agoClarification in formalism concerning roles.
Richard Eisenberg [Mon, 9 Sep 2013 18:02:49 +0000 (14:02 -0400)] 
Clarification in formalism concerning roles.

5 years agoFix optimization of Parser.y.pp
Austin Seipp [Mon, 9 Sep 2013 15:42:55 +0000 (10:42 -0500)] 
Fix optimization of Parser.y.pp

In 9e133b, the build was modified to pass -fcmm-sink to Parser, but
unfortunately Parser specifies -O0 in its OPTIONS_GHC directive, meaning
the sinking pass was actually turned off.

HC_OPTS is the last thing passed to the compiler for that source file
however, so the correct fix is to also move -O0 out into the build
system as well.

This was uncovered thanks to a build report from Kazu Yamamoto. Thanks
to Jan Stolarek for eyeballing this bug and finding it.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
5 years agoRemove -fwarn-typeable-instances
Jose Pedro Magalhaes [Mon, 9 Sep 2013 10:31:59 +0000 (11:31 +0100)] 
Remove -fwarn-typeable-instances

5 years agoMerge remote-tracking branch 'origin/master' into ghc-parmake-gsoc
Patrick Palka [Mon, 9 Sep 2013 02:10:50 +0000 (22:10 -0400)] 
Merge remote-tracking branch 'origin/master' into ghc-parmake-gsoc

5 years agoRevert "Note infinite stack default in release notes."
Austin Seipp [Sun, 8 Sep 2013 21:17:39 +0000 (16:17 -0500)] 
Revert "Note infinite stack default in release notes."

This reverts commit c798a8c6c66d826efdc0201fa56d45337eecc2af.

5 years agoRevert "Default to infinite stack size (#8189)"
Austin Seipp [Sun, 8 Sep 2013 21:17:36 +0000 (16:17 -0500)] 
Revert "Default to infinite stack size (#8189)"

This reverts commit d85044f6b201eae0a9e453b89c0433608e0778f0.

5 years agoNote infinite stack default in release notes.
Austin Seipp [Sun, 8 Sep 2013 09:07:23 +0000 (04:07 -0500)] 
Note infinite stack default in release notes.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
5 years agoAvoid allocating while holding a lock (#8242)
Takano Akio [Fri, 6 Sep 2013 10:55:37 +0000 (19:55 +0900)] 
Avoid allocating while holding a lock (#8242)

This reverts commit 6770663f764db76dbb7138ccb3aea0527d194151.

If the program enters the garbage collector with the closure
lock held, it will confuse the garbage collector and will
result in an infinite loop in evacuate().

Signed-off-by: Austin Seipp <aseipp@pobox.com>
5 years agoDefault to infinite stack size (#8189)
Austin Seipp [Sun, 8 Sep 2013 07:08:45 +0000 (02:08 -0500)] 
Default to infinite stack size (#8189)

When servicing a stack overflows, only throw an exception to the given
thread if the user explicitly set a max stack size, using +RTS -K.
Otherwise just service it normally and grow the stack.

In case we actually run out of *heap* (stack chuncks are allocated on
the heap), then we need to bail by calling the stackOverflow() hook and
exit immediately.

Authored-by: Ben Gamari <bgamari.foss@gmail.com>
Signed-off-by: Austin Seipp <aseipp@pobox.com>
5 years agoresurrected -fdicts-strict, off by default
Nicolas Frisby [Wed, 17 Jul 2013 15:39:25 +0000 (10:39 -0500)] 
resurrected -fdicts-strict, off by default

also added -fdmd-tx-dict-sel, on by default

5 years agoRecord PAP allocation to CCCS.
Edward Z. Yang [Sat, 7 Sep 2013 21:16:37 +0000 (14:16 -0700)] 
Record PAP allocation to CCCS.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
5 years agoFix ghc-pkg list --simple-output not being alphabetical (#8245).
Niklas Hambüchen [Fri, 6 Sep 2013 14:23:24 +0000 (23:23 +0900)] 
Fix ghc-pkg list --simple-output not being alphabetical (#8245).

It was sorted by version number so far.

I also added a sort to the normal output (without --simple-output)
since the source it comes from does not guarantee sortedness.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
5 years agoAdd basic support for GHCJS
Austin Seipp [Fri, 6 Sep 2013 18:18:11 +0000 (13:18 -0500)] 
Add basic support for GHCJS

This patch encompasses most of the basic infrastructure for GHCJS. It
includes:

  * A new extension, -XJavaScriptFFI
  * A new architecture, ArchJavaScript
  * Parser and lexer support for 'foreign import javascript', only
    available under -XJavaScriptFFI, using ArchJavaScript.
  * As a knock-on, there is also a new 'WayCustom' constructor in
    DynFlags, so clients of the GHC API can add custom 'tags' to their
    built files. This should be useful for other users as well.

The remaining changes are really just the resulting fallout, making sure
all the cases are handled appropriately for DynFlags and Platform.

Authored-by: Luite Stegeman <stegeman@gmail.com>
Signed-off-by: Austin Seipp <aseipp@pobox.com>
5 years agoHave `ghc --info` report support for parallel --make
Patrick Palka [Fri, 6 Sep 2013 15:10:11 +0000 (11:10 -0400)] 
Have `ghc --info` report support for parallel --make

5 years agoMerge remote-tracking branch 'origin/master' into ghc-parmake-gsoc
Patrick Palka [Fri, 6 Sep 2013 15:08:38 +0000 (11:08 -0400)] 
Merge remote-tracking branch 'origin/master' into ghc-parmake-gsoc

5 years agoFix link to launchbury93natural
Joachim Breitner [Fri, 6 Sep 2013 09:10:25 +0000 (11:10 +0200)] 
Fix link to launchbury93natural

5 years agoWindows: load eh_frame as rodata, fixes #8237
Edward Z. Yang [Fri, 6 Sep 2013 06:34:58 +0000 (23:34 -0700)] 
Windows: load eh_frame as rodata, fixes #8237

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
5 years agoTemporary Haskeline fix for Windows build.
Edward Z. Yang [Fri, 6 Sep 2013 01:38:45 +0000 (18:38 -0700)] 
Temporary Haskeline fix for Windows build.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
5 years agodocs only: update the release notes with atomic primops
Ryan Newton [Thu, 5 Sep 2013 22:38:25 +0000 (18:38 -0400)] 
docs only: update the release notes with atomic primops

5 years agoIgnore drectve sections, partially fixing #7056
Edward Z. Yang [Thu, 5 Sep 2013 00:43:35 +0000 (17:43 -0700)] 
Ignore drectve sections, partially fixing #7056

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
5 years agoFix annoying iOS linker warnings (#8208)
Austin Seipp [Wed, 4 Sep 2013 22:35:53 +0000 (17:35 -0500)] 
Fix annoying iOS linker warnings (#8208)

Authored-by: Luke Iannini <lukexi@me.com>
Signed-off-by: Austin Seipp <aseipp@pobox.com>
5 years agoUpdate `Cabal` to 1.18.0 final
Herbert Valerio Riedel [Wed, 4 Sep 2013 21:59:06 +0000 (23:59 +0200)] 
Update `Cabal` to 1.18.0 final

5 years agoUpdate `containers` to 0.5.3.1 release
Herbert Valerio Riedel [Wed, 4 Sep 2013 18:50:15 +0000 (20:50 +0200)] 
Update `containers` to 0.5.3.1 release

5 years agodocumentation and comments for -ffun-to-thunk and -flate-dmd-anal
Nicolas Frisby [Wed, 4 Sep 2013 18:25:30 +0000 (13:25 -0500)] 
documentation and comments for -ffun-to-thunk and -flate-dmd-anal

5 years agoFix bootstrapping of GHC with earlier versions
Patrick Palka [Wed, 4 Sep 2013 18:49:51 +0000 (14:49 -0400)] 
Fix bootstrapping of GHC with earlier versions

We can no longer use atomic_inc() in the stage1 compiler because its
prototype was recently changed.

Since the stage1 compiler is always single-threaded, only use
atomic_inc() when THREADED_RTS is defined.

5 years agogenSym: atomic_inc() now takes two arguments
Patrick Palka [Wed, 4 Sep 2013 17:33:14 +0000 (13:33 -0400)] 
genSym: atomic_inc() now takes two arguments

5 years agoAdd a --no-dph flag to ./validate
Austin Seipp [Wed, 4 Sep 2013 18:15:40 +0000 (13:15 -0500)] 
Add a --no-dph flag to ./validate

Under --slow, the DPH tests can take incredible amounts of time to run.
And on some platforms, we may not have a fully working linker in order
to build DPH etc anyway. So this provides a way to turn it off.

This flag is off by default, but should your specify it, you can skip
the required 'dph' libraries in a build, should you remove them from the
source tree.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
5 years agoMake sure -fcmm-sink is passed to Parser properly
Austin Seipp [Wed, 4 Sep 2013 16:23:03 +0000 (11:23 -0500)] 
Make sure -fcmm-sink is passed to Parser properly

Parser.hs needs to be compiled with -fcmm-sink on x86 platforms, so the
register allocator doesn't run out of stack slots. Previously, we had to
do some CPP hacks in order to emit an #ifdef into the file - this is
because we preprocess it once up front, and run the preprocessor again
when we compile it.

There's two cases: the boostrap compiler is > 7.8, and the stage1 parser
needs the flag, or the stage1 compiler is compiling the stage2
Parser.hs, and needs the flag..

The previous approach was super fragile with Clang. The more principled
fix is to instead do this through the build system.

This fixes #8182.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
5 years agoRemove -fglasgow-exts from --help
Austin Seipp [Wed, 4 Sep 2013 16:13:30 +0000 (11:13 -0500)] 
Remove -fglasgow-exts from --help

It's been deprecated for who knows how long, and gives a warning.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
5 years agoMerge remote-tracking branch 'origin/master' into ghc-parmake-gsoc
Patrick Palka [Wed, 4 Sep 2013 16:10:27 +0000 (12:10 -0400)] 
Merge remote-tracking branch 'origin/master' into ghc-parmake-gsoc

5 years agoAdd --show-options to --help (#8190)
Austin Seipp [Wed, 4 Sep 2013 16:06:33 +0000 (11:06 -0500)] 
Add --show-options to --help (#8190)

Signed-off-by: Austin Seipp <aseipp@pobox.com>
5 years agoTurn manual Typeable instances into errors; fixes #8132
Jose Pedro Magalhaes [Wed, 4 Sep 2013 08:09:17 +0000 (10:09 +0200)] 
Turn manual Typeable instances into errors; fixes #8132

5 years agoFix definition of DefinerOfRegs for CmmForeignCall
Jan Stolarek [Wed, 4 Sep 2013 13:11:40 +0000 (14:11 +0100)] 
Fix definition of DefinerOfRegs for CmmForeignCall

And update comments

5 years agoMake role inference work on the source type of a data con
Simon Peyton Jones [Wed, 4 Sep 2013 11:07:01 +0000 (12:07 +0100)] 
Make role inference work on the source type of a data con

When inferring roles it is Much More Kosher to work on the source
type, as written by the user, rather than the representation type as
computed by GHC.  Error messages may be better and, more subtly, the
representation type is the result of a pretty complicated calculation
and I'm worried about accidental cycles.

5 years agoPut the interface-file typechecking of IfUnpackCo inside forkM
Simon Peyton Jones [Wed, 4 Sep 2013 11:05:01 +0000 (12:05 +0100)] 
Put the interface-file typechecking of IfUnpackCo inside forkM

Now that IfBangs can contain coercions, which can mention the
very type being typechecked, the tc_strict call must be inside
forkM. This led to Trac #8221