ghc.git
5 years agoAdd OutputableBndr instance for OccName
Dr. ERDI Gergo [Wed, 12 Mar 2014 12:37:22 +0000 (20:37 +0800)] 
Add OutputableBndr instance for OccName

5 years agoTest Trac #8832
Simon Peyton Jones [Thu, 13 Mar 2014 12:24:49 +0000 (12:24 +0000)] 
Test Trac #8832

The test is a bit crude; -ddump-simpl | grep '#'.

I'm concerned that the -ddump-simpl output may differ on 32 and 64-bit
platforms.  So far I've only put in output for 64-bit platforms.

5 years agoAdd BuiltinRules for constant-folding not# and notI# (logical complement)
Simon Peyton Jones [Thu, 13 Mar 2014 12:15:52 +0000 (12:15 +0000)] 
Add BuiltinRules for constant-folding not# and notI# (logical complement)

I don't know why these constant-folding rules were implemented for
and/or/xor but not for 'not'.

Adding them is part of the fix for Trac #8832.
(The other part is in Data.Bits.)

5 years agoComments only
Simon Peyton Jones [Thu, 13 Mar 2014 12:14:11 +0000 (12:14 +0000)] 
Comments only

5 years agoExport runTcInteractive from TcRnDriver, and from GHC (Trac #8878)
Simon Peyton Jones [Thu, 13 Mar 2014 12:13:49 +0000 (12:13 +0000)] 
Export runTcInteractive from TcRnDriver, and from GHC (Trac #8878)

5 years agoA bit more tracing to do with SPECIALISE pragmas
Simon Peyton Jones [Thu, 13 Mar 2014 08:36:28 +0000 (08:36 +0000)] 
A bit more tracing to do with SPECIALISE pragmas

5 years agoComments on virtHp, realHp (Trac #8864)
Simon Peyton Jones [Tue, 11 Mar 2014 13:09:21 +0000 (13:09 +0000)] 
Comments on virtHp, realHp (Trac #8864)

Documentation in response to Johan's questions

Plus, don't export hpRel from StgCmmHeap, StgCmmLayout
  (it is only used locally in StgCmmLayout)

5 years agoCall Arity: Resurrect fakeBoringCalls
Joachim Breitner [Wed, 12 Mar 2014 10:15:16 +0000 (11:15 +0100)] 
Call Arity: Resurrect fakeBoringCalls

(Otherwise the analysis was wrong, as covered by the new test case.)

5 years agoAdd perf test for inline array allocation
Johan Tibell [Tue, 11 Mar 2014 21:39:00 +0000 (22:39 +0100)] 
Add perf test for inline array allocation

5 years agoValidate computed sums in inline array allocation test
Johan Tibell [Tue, 11 Mar 2014 21:12:31 +0000 (22:12 +0100)] 
Validate computed sums in inline array allocation test

5 years agoAdd test for inline array allocation
Johan Tibell [Tue, 11 Mar 2014 15:01:19 +0000 (16:01 +0100)] 
Add test for inline array allocation

5 years agoFix incorrect loop condition in inline array allocation
Johan Tibell [Tue, 11 Mar 2014 12:54:29 +0000 (13:54 +0100)] 
Fix incorrect loop condition in inline array allocation

Also make sure allocHeapClosure updates profiling counters with the
memory allocated.

5 years agoRefactor inline array allocation
Simon Marlow [Mon, 10 Mar 2014 21:43:15 +0000 (21:43 +0000)] 
Refactor inline array allocation

- Move array representation knowledge into SMRep

- Separate out low-level heap-object allocation so that we can reuse
  it from doNewArrayOp

- remove card-table initialisation, we can safely ignore the card
  table for newly allocated arrays.

5 years agoRepresent offsets into heap objects with byte, not word, offsets
Simon Marlow [Fri, 29 Nov 2013 10:32:26 +0000 (10:32 +0000)] 
Represent offsets into heap objects with byte, not word, offsets

I'd like to be able to pack together non-pointer fields that are less
than a word in size, and this is a necessary prerequisite.

5 years agocodeGen: allocate small arrays of statically known size inline
Johan Tibell [Wed, 25 Sep 2013 13:10:13 +0000 (09:10 -0400)] 
codeGen: allocate small arrays of statically known size inline

This results in a 46% runtime decrease when allocating an array of 16
unit elements on a 64-bit machine.

In order to allow newArray# to have both an inline and an out-of-line
implementation, cgOpApp is refactored slightly. The new implementation
of cgOpApp should make it easier to add other primops with both inline
and out-of-line implementations in the future.

5 years agoFix last-minute typo in SetLevels commit ef44a4
Simon Peyton Jones [Tue, 11 Mar 2014 12:47:57 +0000 (12:47 +0000)] 
Fix last-minute typo in SetLevels commit ef44a4

Sorry about that...

5 years agoMake SetLevels do substitution properly (fixes Trac #8714)
Simon Peyton Jones [Tue, 11 Mar 2014 11:13:31 +0000 (11:13 +0000)] 
Make SetLevels do substitution properly (fixes Trac #8714)

Nowadays SetLevels floats case expressions as well as let-bindings,
and case expressions bind type variables.  We need to clone all such
floated binders, to avoid accidental name capture.  But I'd forgotten
to substitute for the cloned type variables, causing #8714.  (In the
olden days only Ids were cloned, from let-bindings.)

This patch fixes the bug and does quite a bit of clean-up refactoring
as well, by putting the context level in the LvlEnv.

There is no effect on performance, except that nofib 'rewrite' improves
allocations by 3%.  On investigation I think it was a fluke to do with
loop-cutting in big letrec nests.  But at least it's a fluke in the
right direction.

        Program           Size    Allocs   Runtime   Elapsed  TotalMem
--------------------------------------------------------------------------------
            Min          -0.4%     -3.0%    -19.4%    -19.4%    -26.7%
            Max          -0.0%     +0.0%    +17.9%    +17.9%      0.0%
 Geometric Mean          -0.1%     -0.0%     -0.7%     -0.7%     -0.4%

5 years agoComments only
Simon Peyton Jones [Thu, 6 Mar 2014 11:54:33 +0000 (11:54 +0000)] 
Comments only

5 years agoFix copy-paste error in build system comment
Johan Tibell [Mon, 10 Mar 2014 17:59:21 +0000 (18:59 +0100)] 
Fix copy-paste error in build system comment

5 years agoAdd "bench" build flavour to build system
Johan Tibell [Mon, 10 Mar 2014 17:54:47 +0000 (18:54 +0100)] 
Add "bench" build flavour to build system

This build generates the same code as the "perf" build and is thus
good for compiling benchmarks and inspecting the generated
code. However, it compiles the stage2 compiler faster at the expense
of compiler user programs more slowly.

5 years agoUnify, rather than match, in GND processing (fixes Trac #8865)
Simon Peyton Jones [Mon, 10 Mar 2014 11:10:21 +0000 (11:10 +0000)] 
Unify, rather than match, in GND processing (fixes Trac #8865)

Yet another small way in which polymorphic kinds needs a bit of care
See Note [Unify kinds in deriving] in TcDeriv

5 years agoImprove documentation of standalone deriving (c.f. Trac #8851)
Simon Peyton Jones [Mon, 10 Mar 2014 11:08:37 +0000 (11:08 +0000)] 
Improve documentation of standalone deriving (c.f. Trac #8851)

5 years agoAlso allow http://github.com (#8824)
Joachim Breitner [Sat, 8 Mar 2014 00:11:42 +0000 (01:11 +0100)] 
Also allow http://github.com (#8824)

5 years agoTest Trac #8856
Simon Peyton Jones [Fri, 7 Mar 2014 17:15:15 +0000 (17:15 +0000)] 
Test Trac #8856

5 years agoFix the treatment of lexically scoped kind variables (Trac #8856)
Simon Peyton Jones [Fri, 7 Mar 2014 16:50:17 +0000 (16:50 +0000)] 
Fix the treatment of lexically scoped kind variables (Trac #8856)

The issue here is described in Note [Binding scoped type variables] in
TcPat.  When implementing this fix I was able to make things quite a
bit simpler:
 * The type variables in a type signature now never unify
   with each other, and so can be straightfoward skolems.
 * We only need the SigTv stuff for signatures in patterns,
   and for kind variables.

5 years agoMake -XDeriveFunctor more generous about non-last arguments (Trac #8678)
Simon Peyton Jones [Fri, 7 Mar 2014 16:45:55 +0000 (16:45 +0000)] 
Make -XDeriveFunctor more generous about non-last arguments (Trac #8678)

When deriving Functor, Foldable, Traversable, we need only look at the
way that the last type argument is treated.  It's fine for there to
be existentials etc, provided they don't affect the last type argument.

See Note [Check that the type variable is truly universal] in TcDeriv.

5 years agoMake sync-all handle all github protocols correctly
Joachim Breitner [Fri, 7 Mar 2014 15:50:43 +0000 (16:50 +0100)] 
Make sync-all handle all github protocols correctly

This fixes #8824.

5 years agoRun testcase for 8124 only with threaded ways
Joachim Breitner [Fri, 7 Mar 2014 15:05:39 +0000 (16:05 +0100)] 
Run testcase for 8124 only with threaded ways

5 years agoTest #8851.
Richard Eisenberg [Fri, 7 Mar 2014 04:44:57 +0000 (23:44 -0500)] 
Test #8851.

5 years agoTrac #8569 fixed
Simon Peyton Jones [Thu, 6 Mar 2014 12:13:17 +0000 (12:13 +0000)] 
Trac #8569 fixed

5 years agoTest for Trac #8841 now works
Simon Peyton Jones [Thu, 6 Mar 2014 12:13:05 +0000 (12:13 +0000)] 
Test for Trac #8841 now works

5 years agoAttach the right location to pattern synonym error message (fixes Trac #8841)
Simon Peyton Jones [Thu, 6 Mar 2014 11:32:55 +0000 (11:32 +0000)] 
Attach the right location to pattern synonym error message (fixes Trac #8841)

5 years agoMake the demand on a binder compatible with type (fixes Trac #8569)
Simon Peyton Jones [Thu, 6 Mar 2014 11:31:47 +0000 (11:31 +0000)] 
Make the demand on a binder compatible with type (fixes Trac #8569)

Because of GADTs and casts we were getting binders whose
demand annotation was more deeply nested than made sense
for its type.

See Note [Trimming a demand to a type], in Demand.lhs,
which I reproduce here:

   Note [Trimming a demand to a type]
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   Consider this:

     f :: a -> Bool
     f x = case ... of
             A g1 -> case (x |> g1) of (p,q) -> ...
             B    -> error "urk"

   where A,B are the constructors of a GADT.  We'll get a U(U,U) demand
   on x from the A branch, but that's a stupid demand for x itself, which
   has type 'a'. Indeed we get ASSERTs going off (notably in
   splitUseProdDmd, Trac #8569).

   Bottom line: we really don't want to have a binder whose demand is more
   deeply-nested than its type.  There are various ways to tackle this.
   When processing (x |> g1), we could "trim" the incoming demand U(U,U)
   to match x's type.  But I'm currently doing so just at the moment when
   we pin a demand on a binder, in DmdAnal.findBndrDmd.

5 years agoAdd some debug tracing
Simon Peyton Jones [Thu, 6 Mar 2014 10:50:32 +0000 (10:50 +0000)] 
Add some debug tracing

5 years agoTypos in comments
Gabor Greif [Wed, 5 Mar 2014 20:13:31 +0000 (21:13 +0100)] 
Typos in comments

5 years agoMajor Call Arity rework
Joachim Breitner [Fri, 21 Feb 2014 09:57:34 +0000 (10:57 +0100)] 
Major Call Arity rework

This patch improves the call arity analysis in various ways.

Most importantly, it enriches the analysis result information so that
when looking at a call, we do not have to make a random choice about
what side we want to take the information from. Instead we can combine
the results in a way that does not lose valuable information.

To do so, besides the incoming arities, we store remember "what can be
called with what", i.e. an undirected graph between the (interesting)
free variables of an expression. Of course it makes combining the
results a bit more tricky (especially mutual recursion), but still
doable.

The actually implemation of the graph structure is abstractly put away
in a module of its own (UnVarGraph.hs)

The implementation is geared towards efficiently representing the graphs
that we need (which can contain large complete and large complete
bipartite graphs, which would be huge in other representations). If
someone feels like designing data structures: There is surely some
speed-up to be obtained by improving that data structure.

Additionally, the analysis now takes into account that if a RHS stays a
thunk, then its calls happen only once, even if the variables the RHS is
bound to is evaluated multiple times, or is part of a recursive group.

5 years agoUpdate `Cabal` to 1.18.1.3 release
Herbert Valerio Riedel [Tue, 4 Mar 2014 21:19:37 +0000 (22:19 +0100)] 
Update `Cabal` to 1.18.1.3 release

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoUpdate time to 1.4.2 release
Herbert Valerio Riedel [Mon, 3 Mar 2014 08:25:45 +0000 (09:25 +0100)] 
Update time to 1.4.2 release

Note: The only visible change in `time-1.4.2` is at the SafeHaskell level

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agofix copy/pasto
Simon Marlow [Sat, 1 Mar 2014 07:16:44 +0000 (07:16 +0000)] 
fix copy/pasto

5 years agoadd missing files (#8124)
Simon Marlow [Sat, 1 Mar 2014 07:14:47 +0000 (07:14 +0000)] 
add missing files (#8124)

5 years agobinary-dist: when using xz, use extreme compression.
Austin Seipp [Fri, 28 Feb 2014 23:13:21 +0000 (17:13 -0600)] 
binary-dist: when using xz, use extreme compression.

When building a binary distribution with TAR_COMP=xz, using the -9e flag
(extremely high compression) results in substantial savings: for the
Mavericks builds, bzip2 scores in at about 120mb, while xz at level 9
scores about 60mb - a huge reduction!

This of course takes significantly longer - but it does not affect
decompression speed for end users, so it's certainly worth it.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoNote that we need Cabal-1.18 in the release notes
Austin Seipp [Fri, 28 Feb 2014 22:40:27 +0000 (16:40 -0600)] 
Note that we need Cabal-1.18 in the release notes

Thanks to George Colpitts for helping us remember this!

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoFix binary-dist target with xz/gzip
Austin Seipp [Fri, 28 Feb 2014 22:28:28 +0000 (16:28 -0600)] 
Fix binary-dist target with xz/gzip

This was harmless but annoying: we forgot to take the compression
extention into account when copying the binary dist out of bindistprep

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoDocumentation updates for 7.8.1 release
Austin Seipp [Fri, 28 Feb 2014 22:23:17 +0000 (16:23 -0600)] 
Documentation updates for 7.8.1 release

Notably, GND is now usable with Safe Haskell. Also, Coercible now is in
Data.Coerce canonically, and we added some more instances.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoBump T6048 tests.
Austin Seipp [Fri, 28 Feb 2014 21:40:12 +0000 (15:40 -0600)] 
Bump T6048 tests.

It seems as though my changes in base to add instances for
Monoid/Applicative had some slight impact on the allocations in this
test...

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoPPC: Fix loads of PIC data with > 16 bit offsets (#7830).
Erik de Castro Lopo [Fri, 28 Feb 2014 07:33:13 +0000 (18:33 +1100)] 
PPC: Fix loads of PIC data with > 16 bit offsets (#7830).

Loads should now handle up to 32 bit offsets.

5 years agoAdd hs_thread_done() (#8124)
Simon Marlow [Thu, 27 Feb 2014 14:07:29 +0000 (14:07 +0000)] 
Add hs_thread_done() (#8124)

See documentation for details.

5 years agofix comment on allocate() (#8254)
Simon Marlow [Thu, 27 Feb 2014 12:37:32 +0000 (12:37 +0000)] 
fix comment on allocate() (#8254)

5 years agoFix a bug in codegen for non-updatable selector thunks (#8817)
Simon Marlow [Thu, 27 Feb 2014 09:41:19 +0000 (09:41 +0000)] 
Fix a bug in codegen for non-updatable selector thunks (#8817)

To evaluate most non-updatable thunks, we can jump directly to the
entry code if we know what it is.  But not for a selector thunk: these
might be updated by the garbage collector, so we have to enter the
closure with an indirect jump through its info pointer.

5 years agoFollow-up to 32f41c79
Herbert Valerio Riedel [Wed, 26 Feb 2014 22:51:23 +0000 (23:51 +0100)] 
Follow-up to 32f41c79

These parts were forgotten to be committed together with the rest of
32f41c79960ffc1d04c4573acb37756109d279a5

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoMake distribution tarball compression format configurable
Herbert Valerio Riedel [Wed, 26 Feb 2014 21:20:52 +0000 (22:20 +0100)] 
Make distribution tarball compression format configurable

By default, bzip2 compression is selected (which is what has been used
till now). Additionally, by setting the TAR_COMP make variable to one of
the values "bzip2", "gzip", or "xz", an explicit compression format can
be requested for the distribution tarballs. For instance, invoking

  make TAR_COMP=xz sdist-ghc

will result in a tarball `./sdistprep/ghc-7.9.20140226-src.tar.xz`

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoFix #8807.
Richard Eisenberg [Wed, 26 Feb 2014 15:17:45 +0000 (10:17 -0500)] 
Fix #8807.

It turns out that the enhanced repPred function in DsMeta assumed
that the head of any constraint would be a tycon. This assumption
is false. Happily, the solution involved *deleting* code. I
just removed repPred in favor of repTy, and added the HsEqTy case
to repTy, where it should be anyway.

5 years agoUse U+2018 instead of U+201B quote mark in compiler messages
Herbert Valerio Riedel [Sun, 23 Feb 2014 21:00:57 +0000 (22:00 +0100)] 
Use U+2018 instead of U+201B quote mark in compiler messages

This matches GCC's choice of Unicode quotation marks (i.e. U+2018 and U+2019)
and therefore looks more familiar on the console. This addresses #2507.

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoMake Outputable instance for HsDocString useful
Mateusz Kowalczyk [Tue, 25 Feb 2014 06:35:10 +0000 (06:35 +0000)] 
Make Outputable instance for HsDocString useful

Seeing "<document comment>" when trying to debug things in Haddock is
utterly useless and because this instance exists, we can't even make our
own. No instance at all would be better than what it was!

Admittedly, this doesn't produce the nicest output. Perhaps wrapping the
comments in {- -} would be in order but I think it's fine until someone
complains.

5 years agoFix Haddock formatting
Mateusz Kowalczyk [Mon, 24 Feb 2014 22:58:09 +0000 (22:58 +0000)] 
Fix Haddock formatting

5 years agoFix #8696 - don't generate static intra-package references.
Austin Seipp [Mon, 24 Feb 2014 19:03:34 +0000 (13:03 -0600)] 
Fix #8696 - don't generate static intra-package references.

See the comments in Packages.lhs and the ticket for some more explanation.

This is a temporary fix while we consider a way to re-enable intra-package
references in the mean time.

Authored-by: Reid Barton <rwbarton@gmail.com>
Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoFix installation of ghc-split (#8760)
Austin Seipp [Thu, 20 Feb 2014 13:15:32 +0000 (07:15 -0600)] 
Fix installation of ghc-split (#8760)

The rules weren't correctly setting INSTALL_TOPDIRS, and on top of that
the dependencies were wrong when BINDIST=YES.

Authored-by: Evan Hauck <khyperia@live.com>
Authored-by: Austin Seipp <austin@well-typed.com>
Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoAdd VERSION file to gitignore.
Austin Seipp [Thu, 20 Feb 2014 13:16:31 +0000 (07:16 -0600)] 
Add VERSION file to gitignore.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoFix #8754 again.
Austin Seipp [Thu, 20 Feb 2014 12:41:02 +0000 (06:41 -0600)] 
Fix #8754 again.

This time, we carefully initialize the GC stats only if they're not
already initialized - this way the user can override them (e.g. `+RTS -t
--machine-readable`).

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoAdd a test for d3af980 (#5682)
Austin Seipp [Thu, 20 Feb 2014 12:12:06 +0000 (06:12 -0600)] 
Add a test for d3af980 (#5682)

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoAdd test case for #8806.
Erik de Castro Lopo [Thu, 20 Feb 2014 07:13:50 +0000 (18:13 +1100)] 
Add test case for #8806.

GHC 7.6.3 and earlier should fail to type check this but don't.
This was fixed some time between the 7.6.3 and the 7.8rc1 release, so
we're just adding a test to prevent future regressions.

5 years agoUpdate to primitive-0.5.2.1 (again)
Herbert Valerio Riedel [Thu, 20 Feb 2014 09:59:02 +0000 (10:59 +0100)] 
Update to primitive-0.5.2.1 (again)

This was already performed via
47d725f29376fa1be726e913cdf3dd69c46327c2

However, it was accidently reverted as a side-effect of
2b34947b60069e51abfcada9c45a6d7b590f5a2b

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoRetainerProfile.c: include missing header (#8810)
Sergei Trofimovich [Thu, 20 Feb 2014 09:17:27 +0000 (03:17 -0600)] 
RetainerProfile.c: include missing header (#8810)

Found by clang:

  rts_dist_HC rts/dist/build/RetainerProfile.p_o

  rts/RetainerProfile.c:1779:5:
     error: implicit declaration of function 'markStableTables' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        markStableTables(retainRoot, NULL);

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoReally fix #5682 (parsing of promoted datacons)
Austin Seipp [Thu, 20 Feb 2014 07:28:00 +0000 (01:28 -0600)] 
Really fix #5682 (parsing of promoted datacons)

Patch submitted by an anonymous friend on the bug tracker.

This also fixes TH_RichKinds2 which had a slight message output wibble
(it uses the qualified name of the promoted datacon)

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoFix #8801: exclude extra packages from the sdist.
Austin Seipp [Thu, 20 Feb 2014 07:17:57 +0000 (01:17 -0600)] 
Fix #8801: exclude extra packages from the sdist.

This is special cased a little since it's cleaner, and we don't
necessarily want to remove nofib anyway - just the extra packages.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoClear up docs regarding LLVM backend (#8792)
Austin Seipp [Wed, 19 Feb 2014 22:39:50 +0000 (16:39 -0600)] 
Clear up docs regarding LLVM backend (#8792)

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoSwitch on -dynamic-too with QuasiQuotes as well.
Austin Seipp [Wed, 19 Feb 2014 12:31:53 +0000 (06:31 -0600)] 
Switch on -dynamic-too with QuasiQuotes as well.

As pointed out by Albert Y. C. Lai on glasgow-haskell-users.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agofix sed expression in build dependencies rules to work well with non-GNU sed (fixes...
Karel Gardas [Tue, 18 Feb 2014 08:22:59 +0000 (09:22 +0100)] 
fix sed expression in build dependencies rules to work well with non-GNU sed (fixes #8764)

The patch is provided by Christian Maeder <Christian.Maeder@dfki.de>

Signed-off-by: Karel Gardas <karel.gardas@centrum.cz>
Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoadd more information about the nature of support of prefetch primops on none x86...
Carter Tazio Schonwald [Thu, 30 Jan 2014 17:27:35 +0000 (12:27 -0500)] 
add more information about the nature of support of prefetch primops on none x86/AMD64 -fasm platforms (and -fvia)
to the 7.8 release notes

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agofix build failure on Solaris 10 due to RANLIB being set to ':' by configure (#8795)
Karel Gardas [Mon, 17 Feb 2014 09:24:05 +0000 (10:24 +0100)] 
fix build failure on Solaris 10 due to RANLIB being set to ':' by configure (#8795)

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoadd omitted FP_PROG_AR_SUPPORTS_ATFILE into the distribution configure.ac (fixes...
Karel Gardas [Tue, 18 Feb 2014 08:18:07 +0000 (09:18 +0100)] 
add omitted FP_PROG_AR_SUPPORTS_ATFILE into the distribution configure.ac (fixes #8794)

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoUpdate to primitive-0.5.2.1
Herbert Valerio Riedel [Wed, 19 Feb 2014 22:26:30 +0000 (23:26 +0100)] 
Update to primitive-0.5.2.1

This contains a compile-fix for Solaris

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
5 years agoCall Arity refactoring: fakeBoringCalls
Joachim Breitner [Tue, 18 Feb 2014 19:02:24 +0000 (19:02 +0000)] 
Call Arity refactoring: fakeBoringCalls

5 years agoCall Arity: Update compiler perf number changes
Joachim Breitner [Tue, 18 Feb 2014 18:18:47 +0000 (18:18 +0000)] 
Call Arity: Update compiler perf number changes

Lots of improvements, one regression in max bytes allocated.

5 years agoCall arity testcase for #3924
Joachim Breitner [Tue, 18 Feb 2014 12:02:11 +0000 (12:02 +0000)] 
Call arity testcase for #3924

nice numbers coming from these micro-benchmarks.

5 years agoSupport mutual recursion
Joachim Breitner [Tue, 18 Feb 2014 11:50:19 +0000 (11:50 +0000)] 
Support mutual recursion

5 years agoCall arity: Handle type application correctly
Joachim Breitner [Tue, 18 Feb 2014 14:11:11 +0000 (14:11 +0000)] 
Call arity: Handle type application correctly

5 years agoMove unit call arity unittests into subdirectory
Joachim Breitner [Tue, 18 Feb 2014 12:01:06 +0000 (12:01 +0000)] 
Move unit call arity unittests into subdirectory

5 years agoCall Arity: Now also done on Top-Level binds
Joachim Breitner [Tue, 18 Feb 2014 10:53:22 +0000 (10:53 +0000)] 
Call Arity: Now also done on Top-Level binds

5 years agoCall Arity refactoring: instance Outputable Count
Joachim Breitner [Tue, 18 Feb 2014 10:53:15 +0000 (10:53 +0000)] 
Call Arity refactoring: instance Outputable Count

5 years agoCall Arity refactoring: Factor out callArityBound
Joachim Breitner [Tue, 18 Feb 2014 09:29:05 +0000 (09:29 +0000)] 
Call Arity refactoring: Factor out callArityBound

5 years agoCall Arity refactoring: Use a product domain
Joachim Breitner [Tue, 18 Feb 2014 09:10:55 +0000 (09:10 +0000)] 
Call Arity refactoring: Use a product domain

5 years agoMake CallArity make more use of many-calls
Joachim Breitner [Mon, 17 Feb 2014 17:30:07 +0000 (17:30 +0000)] 
Make CallArity make more use of many-calls

by elaborating the domain a bit.

5 years agoRevert "Fix #8754 in a round-about way."
Austin Seipp [Tue, 18 Feb 2014 11:20:25 +0000 (05:20 -0600)] 
Revert "Fix #8754 in a round-about way."

This reverts commit 5023c91780e90947680fe0640f7564a4f6448bea.

5 years agoRevert "Add comments explaining #8754"
Austin Seipp [Tue, 18 Feb 2014 11:20:15 +0000 (05:20 -0600)] 
Revert "Add comments explaining #8754"

This reverts commit b626c3d4ce0e66216705ba8355c914dc809e3fe7.

5 years agoKeep kind-inconsistent Given type equalities (fixes Trac #8705)
Simon Peyton Jones [Tue, 18 Feb 2014 11:07:36 +0000 (11:07 +0000)] 
Keep kind-inconsistent Given type equalities (fixes Trac #8705)

I was too eager when fixing Trac #8566, and dropped too many
equalities on the floor, thereby causing Trac #8705.

The fix is easy: delete code.  Lots of new comments!

5 years agoAdd some more traceTcS calls
Simon Peyton Jones [Tue, 18 Feb 2014 11:06:12 +0000 (11:06 +0000)] 
Add some more traceTcS calls

5 years agoAllow ($) to return an unlifted type (Trac #8739)
Simon Peyton Jones [Tue, 18 Feb 2014 08:46:14 +0000 (08:46 +0000)] 
Allow ($) to return an unlifted type (Trac #8739)

Since ($) simply returns its result, via a tail call, it can
perfectly well have an unlifted result type; e.g.
    foo $ True    where  foo :: Bool -> Int#
should be perfectly fine.

This used to work in GHC 7.2, but caused a Lint failure.  This patch
makes it work again (which involved removing code in TcExpr), but fixing
the Lint failure meant I had to make ($) into a wired-in Id.  Which
is not hard to do (in MkId).

5 years agoUse NoGen plan for unboxed-tuple bindings
Simon Peyton Jones [Tue, 18 Feb 2014 08:37:21 +0000 (08:37 +0000)] 
Use NoGen plan for unboxed-tuple bindings

There was a small mixup here, exposed by Trac #8762.
Now clarified with better function names and comments.

5 years agoMore liberally eta-expand a case-expression
Joachim Breitner [Mon, 17 Feb 2014 11:47:22 +0000 (11:47 +0000)] 
More liberally eta-expand a case-expression

at least with -fno-pedantic-bottoms. This fixes #2915, and undoes some
of a522c3b, on the grounds that with a flag `-fpedantic-bottoms`
around, we can be a bit more liberal when the flag is off..

5 years agoAdd comments explaining #8754
Austin Seipp [Mon, 17 Feb 2014 12:48:04 +0000 (06:48 -0600)] 
Add comments explaining #8754

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoFix #8770
Austin Seipp [Thu, 13 Feb 2014 13:17:30 +0000 (07:17 -0600)] 
Fix #8770

As usual, Mac OS X is extremely annoying (or the software is, anyway),
because not only does it load dynamic libraries with the .dylib
extension, but also the .so extension. For whatever reason. At least
it's easy to fix.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoFix #8745 - GND is now -XSafe compatible.
Austin Seipp [Mon, 17 Feb 2014 01:14:36 +0000 (19:14 -0600)] 
Fix #8745 - GND is now -XSafe compatible.

As discussed in the ticket, after the landing of #8773, GND is now
-XSafe compatible.

This fixes the test fallout as well. In particular SafeLang07 was
removed following in the steps of SafeLang06, since it no longer failed
from GND, but failed due to roles and was thus invalid.

The other tests were tweaked to use TemplateHaskell instead of GND in
order to trigger safety warnings.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoFix #8754 in a round-about way.
Austin Seipp [Mon, 17 Feb 2014 01:10:16 +0000 (19:10 -0600)] 
Fix #8754 in a round-about way.

For some reason on OS X, it seems like -Bsymbolic (which we use for
hooks into the RTS) isn't working, which results in #8754, where stats
don't work because defaultHooks doesn't initialize the stats flag. This
seems to work on Linux static/dynamically, but only on OS X statically.

After talking with Simon, really, the entire hooks thing is a bit
fragile. For now, we just work around it (since GHCi is dynamically
linked) by calling into the defaultHooks ourselves when GHC starts.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoFix check for TLS support in Storage.c
Austin Seipp [Mon, 17 Feb 2014 00:49:43 +0000 (18:49 -0600)] 
Fix check for TLS support in Storage.c

This should have manifested earlier, but for some reason it only seemed
to trigger on Mavericks.

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoFix installation of hpc (#8735)
Austin Seipp [Thu, 13 Feb 2014 13:19:39 +0000 (07:19 -0600)] 
Fix installation of hpc (#8735)

Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agomk/config.mk.in: lower -O2 optimization down to -O1 on UNREG
Sergei Trofimovich [Thu, 13 Feb 2014 13:29:50 +0000 (07:29 -0600)] 
mk/config.mk.in: lower -O2 optimization down to -O1 on UNREG

Disable -O2 optimization. Otherwise amount of generated C code makes
things very slow to compile (~5 minutes on core-i7 for 'compiler/hsSyn/HsExpr.lhs')

And sometimes not compile at all (powerpc64 overflows something
on 'compiler/hsSyn/HsExpr.lhs').

Issue #8748

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agorts/package.conf.in: fix UNREG on --with-system-libffi when include-dir is passed...
Sergei Trofimovich [Thu, 13 Feb 2014 13:29:14 +0000 (07:29 -0600)] 
rts/package.conf.in: fix UNREG on --with-system-libffi when include-dir is passed explicitely

Issue #8748

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agoincludes/Stg.h: add declarations for hs_popcnt and frinds
Sergei Trofimovich [Thu, 13 Feb 2014 13:27:46 +0000 (07:27 -0600)] 
includes/Stg.h: add declarations for hs_popcnt and frinds

This fixes most of implicit function declarations emitted
C codegen in UNREG mode. Found by adding the following to
mk/build.mk:

    SRC_CC_OPTS += -Werror=implicit-function-declaration
    SRC_HC_OPTS += -optc-Werror=implicit-function-declaration

Issue #8748

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Signed-off-by: Austin Seipp <austin@well-typed.com>
5 years agorts/Capability.c: fix crash in -threaded mode on UNREG build
Sergei Trofimovich [Thu, 13 Feb 2014 13:26:05 +0000 (07:26 -0600)] 
rts/Capability.c: fix crash in -threaded mode on UNREG build

UNREG mode has quite nasty invariant to maintain:
    capabilities[0] == &MainCapability

and it's a non-heap memory, while other
capabilities are dynamically allocated.

Issue #8748

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Signed-off-by: Austin Seipp <austin@well-typed.com>