5 years agotestsuite: add test for #8831
Austin Seipp [Fri, 21 Mar 2014 09:42:32 +0000 (04:42 -0500)] 
testsuite: add test for #8831

Signed-off-by: Austin Seipp <>
5 years agoTypos
Austin Seipp [Fri, 21 Mar 2014 09:36:23 +0000 (04:36 -0500)] 

Signed-off-by: Austin Seipp <>
5 years agoFlush after TH in #8884 test case
Joachim Breitner [Fri, 21 Mar 2014 12:46:15 +0000 (13:46 +0100)] 
Flush after TH in #8884 test case

(I recall that this was needed in some cases in the past, and might fix
the validate error on travis.)

5 years agoDon't use gcptr for interior pointers
Johan Tibell [Thu, 20 Mar 2014 06:58:10 +0000 (07:58 +0100)] 
Don't use gcptr for interior pointers

gcptr should only be used for pointers that the GC should
follow. While this didn't cause any bugs right now, since these
variables aren't live over a GC, it's clearer to use the right type.

5 years agoUpdate expected test outputs to match new format of pretty-printing
Dr. ERDI Gergo [Wed, 19 Mar 2014 13:44:38 +0000 (21:44 +0800)] 
Update expected test outputs to match new format of pretty-printing
interface contents

5 years agoisLexVarSym: check all characters of the name, not just the first one.
Dr. ERDI Gergo [Wed, 19 Mar 2014 12:07:47 +0000 (20:07 +0800)] 
isLexVarSym: check all characters of the name, not just the first one.

This is so that generated names like e.g. workers don't show up as
infix operators when using something like -ddump-simpl.

5 years agoImplement ordering comparisons for type-level naturals and symbols.
Iavor S. Diatchki [Wed, 19 Mar 2014 01:54:23 +0000 (18:54 -0700)] 
Implement ordering comparisons for type-level naturals and symbols.

This is done with two built-in type families: `CmpNat and `CmpSymbol`.
Both of these return a promoted `Ordering` type (EQ, LT, or GT).

5 years agoMake sure we occurrence-analyse unfoldings (fixes Trac #8892)
Simon Peyton Jones [Tue, 18 Mar 2014 17:10:18 +0000 (17:10 +0000)] 
Make sure we occurrence-analyse unfoldings (fixes Trac #8892)

For DFunUnfoldings we were failing to occurrence-analyse the unfolding,
and that meant that a loop breaker wasn't marked as such, which in turn
meant it was inlined away when it still had occurrence sites.  See
Note [Occurrrence analysis of unfoldings] in CoreUnfold.

This is a pretty long-standing bug, happily nailed by John Lato.

5 years agoUpdate submodule to Win32-
Herbert Valerio Riedel [Tue, 18 Mar 2014 10:06:57 +0000 (11:06 +0100)] 
Update submodule to Win32-

Signed-off-by: Herbert Valerio Riedel <>
5 years agoAdd some documentation about type-level literals.
Iavor S. Diatchki [Tue, 18 Mar 2014 06:19:16 +0000 (23:19 -0700)] 
Add some documentation about type-level literals.

I moved the "promoted literals" sub-section into a separate section,
as many folks were not finding the docs.  I also added some additional
paragraphs describing the current state of the feature.

5 years agoTest case: ghci059: Forgot stdout file
Joachim Breitner [Mon, 17 Mar 2014 14:34:54 +0000 (15:34 +0100)] 
Test case: ghci059: Forgot stdout file

5 years agoTest Trac #8889
Simon Peyton Jones [Mon, 17 Mar 2014 13:50:54 +0000 (13:50 +0000)] 
Test Trac #8889

5 years agoMore debug info
Simon Peyton Jones [Fri, 14 Mar 2014 13:50:29 +0000 (13:50 +0000)] 
More debug info

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

5 years agoFix validation issue due to Coercible move (#8894)
Joachim Breitner [Mon, 17 Mar 2014 13:43:31 +0000 (14:43 +0100)] 
Fix validation issue due to Coercible move (#8894)

5 years agoRevert ad15c2, which causes Windows seg-faults (Trac #8834)
Simon Peyton Jones [Fri, 14 Mar 2014 22:55:26 +0000 (22:55 +0000)] 
Revert ad15c2, which causes Windows seg-faults (Trac #8834)

We don't yet understand WHY commit ad15c2, which is to do with
CmmSink, causes seg-faults on Windows, but it certainly seems to.  So
reverting it is a stop-gap, but we need to un-block the 7.8 release.

Many thanks to awson for identifying the offending commit.

5 years agoUnflatten the constraints of an inferred types (Trac #8889)
Simon Peyton Jones [Fri, 14 Mar 2014 22:51:20 +0000 (22:51 +0000)] 
Unflatten the constraints of an inferred types (Trac #8889)

There was even a comment to warn about this possiblity,
and it finally showed up in practice!  This patch fixes
it quite nicely, with commens to explain.

5 years agoRemove support for "primclass"
Joachim Breitner [Sun, 16 Mar 2014 17:39:27 +0000 (18:39 +0100)] 
Remove support for "primclass"

This partly reverts commit e239753c349f925b576b72dc3445934cba8bcd50. Since
Coercible is exported via GHC.Types, so "primclass" is no longer
needed. The support for => in primops.pp is still required for coerce.

5 years agoCoercible is now exported from GHC.Types (#8894)
Joachim Breitner [Sun, 16 Mar 2014 17:35:28 +0000 (18:35 +0100)] 
Coercible is now exported from GHC.Types (#8894)

so do not export it in GHC.Prim, and also have the pseudo-code for
GHC.Prim import GHC.Types, so that haddock is happy.

5 years agoFix comment for ghci script files
Joachim Breitner [Sun, 16 Mar 2014 16:40:51 +0000 (17:40 +0100)] 
Fix comment for ghci script files

(Unchecked comment-only commits should better use the right commenting

5 years agoTest case: :info Coercible in GHCi
Joachim Breitner [Sun, 16 Mar 2014 16:12:58 +0000 (17:12 +0100)] 
Test case: :info Coercible in GHCi

This prepares against future breakage, especially if #8894 is tackled.

5 years agoRemove code reporting issues with Safe Haskell and coerce.
Richard Eisenberg [Fri, 14 Mar 2014 19:03:21 +0000 (15:03 -0400)] 
Remove code reporting issues with Safe Haskell and coerce.

This is a followup to the fix for #8827, and should be merged
with that change.

5 years agoCall Arity test case: Check what happens with unboxed lets
Joachim Breitner [Fri, 14 Mar 2014 18:16:58 +0000 (19:16 +0100)] 
Call Arity test case: Check what happens with unboxed lets

5 years agoCall Arity: Never eta-expand thunks in recursive groups
Joachim Breitner [Fri, 14 Mar 2014 17:25:07 +0000 (18:25 +0100)] 
Call Arity: Never eta-expand thunks in recursive groups

Even if the recursion is a nice tail-call only recusion, we'd stil be
calling the thunk multiple times and eta-expansion would be wrong.
Includes a [Note].

(Also shows the disadvantage of unit tests: They had the same bug.)

5 years agoAdd test case for #8776
Dr. ERDI Gergo [Fri, 14 Mar 2014 14:34:56 +0000 (22:34 +0800)] 
Add test case for #8776

5 years agoReinstate pretty-printing of AnIds via pprId (#8776)
Dr. ERDI Gergo [Fri, 14 Mar 2014 14:17:45 +0000 (22:17 +0800)] 
Reinstate pretty-printing of AnIds via pprId (#8776)

5 years agoUse prefix notation in pprIfaceDecl for IfaceIds
Dr. ERDI Gergo [Fri, 14 Mar 2014 13:35:30 +0000 (21:35 +0800)] 
Use prefix notation in pprIfaceDecl for IfaceIds

5 years agoHonor Op_PrintExplicitForalls setting in pprIfaceForAllPart
Dr. ERDI Gergo [Fri, 14 Mar 2014 11:50:15 +0000 (19:50 +0800)] 
Honor Op_PrintExplicitForalls setting in pprIfaceForAllPart

5 years agoDocument Coercible in the user guide
Joachim Breitner [Fri, 14 Mar 2014 11:51:37 +0000 (12:51 +0100)] 
Document Coercible in the user guide

as a subsection of "Equality constraints", containing references to the
module's haddock and to the paper. Fixes #8888

5 years agoAnother reference to Note [Kind-changing of (~) and Coercible]
Joachim Breitner [Fri, 14 Mar 2014 11:26:26 +0000 (12:26 +0100)] 
Another reference to Note [Kind-changing of (~) and Coercible]

5 years agoReference Note [Kind-changing of (~) and Coercible]
Joachim Breitner [Fri, 14 Mar 2014 10:28:48 +0000 (11:28 +0100)] 
Reference  Note [Kind-changing of (~) and Coercible]

5 years agoUpdate to containers-
Herbert Valerio Riedel [Fri, 14 Mar 2014 10:13:39 +0000 (11:13 +0100)] 
Update to containers-

This fixes a wrong #if around role annotations (see #8718)

Signed-off-by: Herbert Valerio Riedel <>
5 years agotestsuite: look for tests-ghc directories for libraries
Austin Seipp [Fri, 14 Mar 2014 09:26:50 +0000 (04:26 -0500)] 
testsuite: look for tests-ghc directories for libraries

Who knows how long the tests for containers have been broken. They
haven't bitrotted, however.

Signed-off-by: Austin Seipp <>
5 years agoRemove unused gHC_COERCIBLE
Joachim Breitner [Fri, 14 Mar 2014 08:23:15 +0000 (09:23 +0100)] 
Remove unused gHC_COERCIBLE

5 years agoCall Arity : Note about fakeBoringCalls
Joachim Breitner [Wed, 12 Mar 2014 14:48:21 +0000 (15:48 +0100)] 
Call Arity : Note about fakeBoringCalls

5 years agoFix typo in user's manual, changing "-j N" to "-jN".
Richard Eisenberg [Thu, 13 Mar 2014 21:20:50 +0000 (17:20 -0400)] 
Fix typo in user's manual, changing "-j N" to "-jN".

5 years agoFix #8884.
Richard Eisenberg [Thu, 13 Mar 2014 19:48:56 +0000 (15:48 -0400)] 
Fix #8884.

There were two unrelated errors fixed here:
 1) Make sure that only the *result kind* is reified when reifying
    a type family. Previously, the whole kind was reified, which
    defies the TH spec.

 2) Omit kind patterns in equations.

5 years agoRecharacterize test according to discussion in #8851.
Richard Eisenberg [Thu, 13 Mar 2014 19:12:27 +0000 (15:12 -0400)] 
Recharacterize test according to discussion in #8851.

5 years agoRemove "Safe mode" check for Coercible instances
Richard Eisenberg [Thu, 13 Mar 2014 18:16:37 +0000 (14:16 -0400)] 
Remove "Safe mode" check for Coercible instances

We assume that library authors supply correct role annotations
for their types, and therefore we do not need to check for
the availability of data constructors in Safe mode. See
discussion in #8725. This effectively fixes #8827 and #8826.

5 years agocodeGen: allocate small byte arrays of statically known size inline
Johan Tibell [Wed, 12 Mar 2014 06:20:19 +0000 (07:20 +0100)] 
codeGen: allocate small byte arrays of statically known size inline

This results in a 57% runtime decrease when allocating an array of 128
bytes on a 64-bit machine.

Fixes #8876.

5 years agoFix T2110 now that base has map/coerce rule.
Austin Seipp [Thu, 13 Mar 2014 22:56:18 +0000 (17:56 -0500)] 
Fix T2110 now that base has map/coerce rule.

Signed-off-by: Austin Seipp <>
5 years agoFix incorrect maxStkSize calculation (#8858)
Kyrill Briantsev [Thu, 13 Mar 2014 22:00:17 +0000 (17:00 -0500)] 
Fix incorrect maxStkSize calculation (#8858)

Signed-off-by: Austin Seipp <>
5 years agoDriverPipeline: Ensure -globalopt is passed to LLVM opt
Ben Gamari [Thu, 6 Mar 2014 20:20:02 +0000 (21:20 +0100)] 
DriverPipeline: Ensure -globalopt is passed to LLVM opt

While -O1 and -O2 both include -globalopt, the order in which the passes are
run means that aliases aren't resolved which then causes llc to fall over.
See GHC bug #8855.

Signed-off-by: Austin Seipp <>
5 years ARM now supports dynamic linking with the LLVM backend
Ben Gamari [Thu, 6 Mar 2014 20:22:28 +0000 (21:22 +0100)] ARM now supports dynamic linking with the LLVM backend

Signed-off-by: Austin Seipp <>
5 years agoFix incorrect blocksize calculation on Win64
Kyrill Briantsev [Wed, 12 Mar 2014 19:31:21 +0000 (14:31 -0500)] 
Fix incorrect blocksize calculation on Win64

Fixes #8839

Signed-off-by: Austin Seipp <>
5 years agodisable shared libs on sparc (linux/solaris) (fixes #8857)
Karel Gardas [Fri, 7 Mar 2014 10:36:37 +0000 (11:36 +0100)] 
disable shared libs on sparc (linux/solaris) (fixes #8857)

Signed-off-by: Austin Seipp <>
5 years agofix SHELL makefile variable to be set by the configure script (fixes #8783)
Karel Gardas [Wed, 12 Mar 2014 15:14:49 +0000 (16:14 +0100)] 
fix SHELL makefile variable to be set by the configure script (fixes #8783)

The patch provided by Christian Maeder <>
Signed-off-by: Karel Gardas <>
Signed-off-by: Austin Seipp <>
5 years agoFix two issues in stg_newArrayzh
Johan Tibell [Thu, 13 Mar 2014 21:24:24 +0000 (22:24 +0100)] 
Fix two issues in stg_newArrayzh

The implementations of newArray# and newArrayArray#, stg_newArrayzh
and stg_newArrayArrayzh, had three issues:

 * The condition for the loop that fills the array with the initial
   element was incorrect. It would write into the card table as
   well. The condition for the loop that filled the card table was
   never executed, as its condition was also wrong. In the end this
   didn't lead to any disasters as the value of the card table doesn't
   matter for newly allocated arrays.

 * The card table was unnecessarily initialized. The card table is
   only used when the array isn't copied, which new arrays always
   are. By not writing the card table at all we save some cycles.

 * The ticky allocation accounting was wrong. The second argument to
   TICK_ALLOC_PRIM is the size of the closure excluding the header
   size, but the header size was incorrectly included.

Fixes #8867.

5 years agoUpdate to containers-
Herbert Valerio Riedel [Thu, 13 Mar 2014 21:09:56 +0000 (22:09 +0100)] 
Update to containers-

This adds role annotations to Map and Set and therefore addresses #8718

Signed-off-by: Herbert Valerio Riedel <>
5 years agoImprove copy/clone array primop docs
Johan Tibell [Thu, 13 Mar 2014 17:10:41 +0000 (18:10 +0100)] 
Improve copy/clone array primop docs

Clarify the order of the arguments. Also, remove any use of # in the
comments, which would make the rest of that comment line disappear in
the docs, due to being treated as a comment by the preprocessor.

5 years agoPretty-print the following TyThings via their IfaceDecl counterpart:
Dr. ERDI Gergo [Thu, 13 Mar 2014 13:18:39 +0000 (21:18 +0800)] 
Pretty-print the following TyThings via their IfaceDecl counterpart:
 * AnId
 * ACoAxiom
 * AConLike

5 years agopprIfaceDecl for IfacePatSyn: use pprPatSynSig
Dr. ERDI Gergo [Wed, 12 Mar 2014 12:38:54 +0000 (20:38 +0800)] 
pprIfaceDecl for IfacePatSyn: use pprPatSynSig

5 years agopprIfaceContextArr: print a context including the "=>" arrow
Dr. ERDI Gergo [Wed, 12 Mar 2014 12:38:26 +0000 (20:38 +0800)] 
pprIfaceContextArr: print a context including the "=>" arrow

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 (#8824)
Joachim Breitner [Sat, 8 Mar 2014 00:11:42 +0000 (01:11 +0100)] 
Also allow (#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

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 release
Herbert Valerio Riedel [Tue, 4 Mar 2014 21:19:37 +0000 (22:19 +0100)] 
Update `Cabal` to release

Signed-off-by: Herbert Valerio Riedel <>
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 <>
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 <>
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 <>
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 <>
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 <>
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

Signed-off-by: Austin Seipp <>
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.