ghc-hetmet.git
9 years agoupdate hetmet submodule pointer
Adam Megacz [Mon, 14 Mar 2011 10:39:26 +0000 (03:39 -0700)]
update hetmet submodule pointer

9 years agoeliminate reliance on -XRebindableSyntax
Adam Megacz [Mon, 14 Mar 2011 10:39:10 +0000 (03:39 -0700)]
eliminate reliance on -XRebindableSyntax

9 years agothird attempt at getting submodules to work properly
Adam Megacz [Sun, 13 Mar 2011 00:00:21 +0000 (16:00 -0800)]
third attempt at getting submodules to work properly

9 years agoupdate compiler/hetmet/ submodule pointer
Adam Megacz [Sat, 12 Mar 2011 22:47:51 +0000 (14:47 -0800)]
update compiler/hetmet/ submodule pointer

9 years agoupdate coq-hetmet submodule pointer
Adam Megacz [Sat, 12 Mar 2011 13:51:03 +0000 (05:51 -0800)]
update coq-hetmet submodule pointer

9 years agosecond attempt at updating submodules; I seem to have trouble with this...
Adam Megacz [Sat, 12 Mar 2011 13:46:49 +0000 (05:46 -0800)]
second attempt at updating submodules; I seem to have trouble with this...

9 years agochange hetmet directory to compiler/hetmet/, update to new git url
Adam Megacz [Fri, 11 Mar 2011 08:27:27 +0000 (00:27 -0800)]
change hetmet directory to compiler/hetmet/, update to new git url

9 years agomake exports/imports of depth>0 identifiers work correctly
Adam Megacz [Wed, 9 Mar 2011 00:06:50 +0000 (16:06 -0800)]
make exports/imports of depth>0 identifiers work correctly

9 years agofix compiler/coq submodule reference
Adam Megacz [Tue, 8 Mar 2011 05:48:54 +0000 (21:48 -0800)]
fix compiler/coq submodule reference

9 years agohandle stage-(n+1) literals properly by expanding them in the typechecker
Adam Megacz [Tue, 8 Mar 2011 04:35:15 +0000 (20:35 -0800)]
handle stage-(n+1) literals properly by expanding them in the typechecker

9 years agoupdate reference to compiler/coq subproject
Adam Megacz [Mon, 7 Mar 2011 20:29:30 +0000 (12:29 -0800)]
update reference to compiler/coq subproject

9 years agouse compiler/coq/Makefile to decide if "git submodule update" is required
Adam Megacz [Mon, 7 Mar 2011 19:35:53 +0000 (11:35 -0800)]
use compiler/coq/Makefile to decide if "git submodule update" is required

9 years agoadd code for -dcoqpass, -fcoqpass, -ddump-coqpass
Adam Megacz [Mon, 7 Mar 2011 13:48:48 +0000 (05:48 -0800)]
add code for -dcoqpass, -fcoqpass, -ddump-coqpass

9 years agoMerge branch 'master' of /tmp/ghc-garrows; branch 'master' of http://git.megacz.com...
Adam Megacz [Thu, 3 Mar 2011 02:56:39 +0000 (18:56 -0800)]
Merge branch 'master' of /tmp/ghc-garrows; branch 'master' of git.megacz.com/ghc-garrows

9 years agorebase to ghc main repo
Adam Megacz [Thu, 3 Mar 2011 01:56:21 +0000 (17:56 -0800)]
rebase to ghc main repo

9 years agofix compile error due to erroneous import
Adam Megacz [Wed, 2 Mar 2011 23:33:28 +0000 (15:33 -0800)]
fix compile error due to erroneous import

9 years agoInitial checkin of HetMet / -XModalTypes modifications
Adam Megacz [Wed, 2 Mar 2011 21:35:00 +0000 (13:35 -0800)]
Initial checkin of HetMet / -XModalTypes modifications

9 years agoRestore SPECIALISE INSTANCE pragmas
simonpj@microsoft.com [Tue, 22 Feb 2011 17:31:12 +0000 (17:31 +0000)]
Restore SPECIALISE INSTANCE pragmas

For some reason I'd commented out this code, which
meant that we weren't getting the the goodness of
the SPECIALISE INSTANCE pragamas in GHC.Real. And
that in turn killed performance in nofib 'power'

9 years agoGHC.Prim.threadStatus# now returns the cap number, and the value of TSO_LOCKED
Simon Marlow [Tue, 1 Mar 2011 10:10:25 +0000 (10:10 +0000)]
GHC.Prim.threadStatus# now returns the cap number, and the value of TSO_LOCKED

9 years agoImprove GHCi line numbers in errors
Ian Lynagh [Sun, 27 Feb 2011 17:20:12 +0000 (17:20 +0000)]
Improve GHCi line numbers in errors
When running commands from the user (as opposed to from a file), reset
the line number to 1 at the start of each command.

9 years ago:script file scripts in GHCi #1363
Vivian McPhail [Sat, 26 Feb 2011 07:31:33 +0000 (07:31 +0000)]
:script file scripts in GHCi #1363
This patch adds the script command in GHCi

A file is read and executed as a series of GHCi commands.

Execution terminates on the first error.  The filename and
line number are included in the error.

9 years agoTurn off split objects on Darwin if XCode < 3.2 (#4013)
Ian Lynagh [Fri, 25 Feb 2011 18:43:58 +0000 (18:43 +0000)]
Turn off split objects on Darwin if XCode < 3.2 (#4013)

9 years agoAllow TH brackets to contain things of any kind
Ian Lynagh [Wed, 9 Feb 2011 18:44:59 +0000 (18:44 +0000)]
Allow TH brackets to contain things of any kind
You can now quasi-quote things with unboxed types, and unboxed tuples.

9 years agoSimpify constraints from a TH bracket eagerly
simonpj@microsoft.com [Wed, 9 Feb 2011 17:50:03 +0000 (17:50 +0000)]
Simpify constraints from a TH bracket eagerly

See Trac #4949, where having a TH bracket implication
was messing things up.  Better to get rid of it right away.

9 years agoTypo in comment
simonpj@microsoft.com [Wed, 9 Feb 2011 17:49:14 +0000 (17:49 +0000)]
Typo in comment

9 years agolibffi: backport incorrect detection of selinux
Sergei Trofimovich [Tue, 8 Feb 2011 21:21:40 +0000 (21:21 +0000)]
libffi: backport incorrect detection of selinux

This patch unbreaks ghci on GRSEC kernels hardened with
TPE (Trusted Path Execution) protection.

TPE forbids mmap('rwx') files opened for writes:
    fd = open (a_file_in_tmp, O_RDWR);
    mmap (...,               PROT_READ | PROT_WRITE | PROT_EXEC, fd);

while allows anonymous RWX mappings:
    mmap (...MAP_ANONYMOUS , PROT_READ | PROT_WRITE | PROT_EXEC, -1);

Thanks to klondike for finding it out.

The result of a horrible typo.

(unreleased yet) upstream also has the patch:

http://github.com/atgreen/libffi/commit/eaf444eabc4c78703c0f98ac0197b1619c1b1bef

9 years agoGenerate the OS X installer from a bindist, rather than from a source tree
Ian Lynagh [Wed, 23 Feb 2011 17:00:16 +0000 (17:00 +0000)]
Generate the OS X installer from a bindist, rather than from a source tree

9 years agoUse -h rather than -soname; fixes dynlibs on Solaris 10; trac #4973
Ian Lynagh [Tue, 22 Feb 2011 15:26:56 +0000 (15:26 +0000)]
Use -h rather than -soname; fixes dynlibs on Solaris 10; trac #4973

9 years agoFix another fundep error (fixes Trac #4969)
simonpj@microsoft.com [Mon, 21 Feb 2011 15:32:39 +0000 (15:32 +0000)]
Fix another fundep error (fixes Trac #4969)

If I had a pound for every hour Dimitrios and I have spent
making functional dependencies work right, we'd be rich!

We had stupidly caused a 'wanted' to be rewritten by a 'derived', with
resulting abject failure.  As well as fixing the bug, this patch
refactors some more, adds useful assert and comments.

9 years agoNew codegen: GC calling convention must use registers.
Edward Z. Yang [Fri, 18 Feb 2011 01:17:45 +0000 (01:17 +0000)]
New codegen: GC calling convention must use registers.

Previously, on register-deficient architectures like x86-32,
the new code generator would emit code for calls to stg_gc_l1,
stg_gc_d1 and stg_gc_f1 that pushed their single argument on
to the stack, while the functions themselves expected the
argument to live in L1, D1 and F1 (respectively).  This was
because cmmCall with the GC calling convention allocated real
registers, not virtual registers.

This patch modifies the code for assigning registers/stack slots
to use the right calling convention for GC and adds an assertion
to ensure it did it properly.

9 years agoAdded a VECTORISE pragma
Manuel M T Chakravarty [Sun, 20 Feb 2011 10:50:32 +0000 (10:50 +0000)]
Added a VECTORISE pragma
- Added a pragma {-# VECTORISE var = exp #-} that prevents
  the vectoriser from vectorising the definition of 'var'.
  Instead it uses the binding '$v_var = exp' to vectorise
  'var'.  The vectoriser checks that the Core type of 'exp'
  matches the vectorised Core type of 'var'.  (It would be
  quite complicated to perform that check in the type checker
  as the vectorisation of a type needs the state of the VM
  monad.)
- Added parts of a related VECTORISE SCALAR pragma
- Documented -ddump-vect
- Added -ddump-vt-trace
- Some clean up

9 years agoReenable object splitting on Darwin, now #4013 appears to be fixed
Ian Lynagh [Sat, 19 Feb 2011 19:14:09 +0000 (19:14 +0000)]
Reenable object splitting on Darwin, now #4013 appears to be fixed

9 years agoClarify the "object splitting" variable names
Ian Lynagh [Sat, 19 Feb 2011 16:15:08 +0000 (16:15 +0000)]
Clarify the "object splitting" variable names

9 years agoFix #4867 (updated; corrects address calculation)
gwright@antiope.com [Mon, 14 Feb 2011 15:09:24 +0000 (15:09 +0000)]
Fix #4867 (updated; corrects address calculation)

This is a corrected fix for ticket #4867, "ghci displays negative floats
incorrectly".  The previous patch sometimes gave incorrect offset to values
in the __const section of the __TEXT segment.  The new patch arranges a zero
fixup for non-external, not-global offset table signed relocations.  This
is apparently what is required, though documentation on this point is scarce.

With this change Doubles are negated properly, because the sign bit mask
is loaded from the correct offset.  This was tested both on HEAD and the 7.0
branch.

9 years agoScale columns in cost-centre-stack report to their contents
Max Bolingbroke [Wed, 16 Feb 2011 16:13:40 +0000 (16:13 +0000)]
Scale columns in cost-centre-stack report to their contents

9 years agoChange typechecker-trace output slightly
simonpj@microsoft.com [Thu, 17 Feb 2011 17:59:04 +0000 (17:59 +0000)]
Change typechecker-trace output slightly

9 years agoComments only
simonpj@microsoft.com [Thu, 17 Feb 2011 17:58:40 +0000 (17:58 +0000)]
Comments only

9 years agoFix Trac #4966
simonpj@microsoft.com [Thu, 17 Feb 2011 14:10:00 +0000 (14:10 +0000)]
Fix Trac #4966

This is just a program that exploits overlapping
instances in a delicate way. The fix makes GHC
a bit more friendly towards such programs.

See Note [Overlap and deriving] in TcSimplify

9 years agoUse "on the spot" solving for fundeps
simonpj@microsoft.com [Thu, 17 Feb 2011 14:09:21 +0000 (14:09 +0000)]
Use "on the spot" solving for fundeps

When we spot an equality arising from a functional dependency,
we now use that equality (a "wanted") to rewrite the work-item
constraint right away.  This avoids two dangers

 Danger 1: If we send the original constraint on down the pipeline
           it may react with an instance declaration, and in delicate
   situations (when a Given overlaps with an instance) that
   may produce new insoluble goals: see Trac #4952

 Danger 2: If we don't rewrite the constraint, it may re-react
           with the same thing later, and produce the same equality
           again --> termination worries.

To achieve this required some refactoring of FunDeps.lhs (nicer
now!).

This patch also contains a couple of unrelated improvements

* A bad bug in TcSMonad.nestImplicTcS whereby the Tcs tyvars
  of an outer implication were not untouchable inside

* Improved logging machinery for the type constraint solver;
  use -ddump-cs-trace (probably with a wider default line width
  -dppr-cols=200 or something)

9 years agoIncrease exprIsDupable threshold a bit
simonpj@microsoft.com [Tue, 15 Feb 2011 14:39:21 +0000 (14:39 +0000)]
Increase exprIsDupable threshold a bit

Now that exprIsDupable is less aggressive, test MethSharing wasn't
doing enough inlining.  Increasing the threshold fixes the problem
but the real fix is in Trac #4960.

9 years agoEnsure exprIsCheap/exprIsExpandable deal with Cast properly
simonpj@microsoft.com [Tue, 15 Feb 2011 14:36:55 +0000 (14:36 +0000)]
Ensure exprIsCheap/exprIsExpandable deal with Cast properly

This bug was causing a Lint error on the stable branch. For some
reason it doesn't show up in HEAD, but it's still worth fixing.

The point is that ((f `cast` co) a) is cheap if f has arity>1.
This was being gratuitously missed before.

9 years agoDo not treat absentError specially
simonpj@microsoft.com [Tue, 15 Feb 2011 14:35:04 +0000 (14:35 +0000)]
Do not treat absentError specially

(This was part of an experiment I abandoned.)

9 years agoFix exprIsDupable
simonpj@microsoft.com [Mon, 14 Feb 2011 11:15:12 +0000 (11:15 +0000)]
Fix exprIsDupable

It turns out that exprIsDupable would return True for an expression of
*arbitrary* size, provide it was a nested bunch of applications in
which no function had more than three arguments.  That was never the
intention, and could give rise to massive code duplication.

This patch makes it much less aggressive.

9 years agoBetter case-of-case transformation
simonpj@microsoft.com [Mon, 14 Feb 2011 11:11:51 +0000 (11:11 +0000)]
Better case-of-case transformation

The ThunkSplitting idea in WorkWrap wasn't working at all,
leading to Trac #4957.  The culprit is really the simplifier
which was combining the wrong case continuations. See
Note [Fusing case continuations] in Simplify.

9 years agoCleaned up Expr and Vectorise
keller@.cse.unsw.edu.au [Tue, 15 Feb 2011 01:44:34 +0000 (01:44 +0000)]
Cleaned up Expr and Vectorise

9 years agoFixed two syntax errors
keller@.cse.unsw.edu.au [Mon, 14 Feb 2011 02:05:31 +0000 (02:05 +0000)]
Fixed two syntax errors

9 years agoHandling of recursive scalar functions in isScalarLam
keller@cse.unsw.edu.au [Mon, 14 Feb 2011 00:29:45 +0000 (00:29 +0000)]
Handling of recursive scalar functions in isScalarLam

9 years agoAdded handling of non-recursive module global functions to isScalar check
keller@cse.unsw.edu.au [Wed, 9 Feb 2011 04:28:55 +0000 (04:28 +0000)]
Added handling of non-recursive module global functions to isScalar check

9 years agoCall the final build system phase "final" rather than ""
Ian Lynagh [Mon, 7 Feb 2011 14:20:46 +0000 (14:20 +0000)]
Call the final build system phase "final" rather than ""

9 years agoFix bug introduced in "Implement fuzzy matching for the Finder"
Simon Marlow [Tue, 8 Feb 2011 09:01:21 +0000 (09:01 +0000)]
Fix bug introduced in "Implement fuzzy matching for the Finder"
The finder was reporting a hidden package when it meant a hidden
module, and vice versa (looks like a typo).

9 years agoFix Trac #4945: another SpecConstr infelicity
simonpj@microsoft.com [Mon, 7 Feb 2011 10:25:37 +0000 (10:25 +0000)]
Fix Trac #4945: another SpecConstr infelicity

Well, more a plain bug really, which led to SpecConstr
missing some obvious opportunities for specialisation.

Thanks to Max Bolingbroke for spotting this.

9 years agoadd missing initialisation of ws->todo_large_objects
Simon Marlow [Fri, 4 Feb 2011 09:31:48 +0000 (09:31 +0000)]
add missing initialisation of ws->todo_large_objects
Found-by: Valgrind.  Thanks Julian!

9 years agoAdd -XNondecreasingIndentation to -XHaskell98 for backwards compatibility.
Simon Marlow [Fri, 4 Feb 2011 08:42:26 +0000 (08:42 +0000)]
Add -XNondecreasingIndentation to -XHaskell98 for backwards compatibility.
The final straw was when I learned today that Happy broke.

9 years agoonly the GHC repo is in git for now; add hoopl
Simon Marlow [Thu, 3 Feb 2011 20:57:05 +0000 (20:57 +0000)]
only the GHC repo is in git for now; add hoopl

9 years agoFix typo in SpecConstr that made it not work at all
simonpj@microsoft.com [Thu, 3 Feb 2011 17:27:56 +0000 (17:27 +0000)]
Fix typo in SpecConstr that made it not work at all

There was a terrible typo in this patch; I wrote "env"
instead of "env1".

   Mon Jan 31 11:35:29 GMT 2011  simonpj@microsoft.com
     * Improve Simplifier and SpecConstr behaviour

Anyway, this fix is essential to make it work properly.
Thanks to Max for spotting the problem (again).

9 years agofix compacting GC
Simon Marlow [Wed, 2 Feb 2011 17:00:36 +0000 (17:00 +0000)]
fix compacting GC

9 years agofix warning
Simon Marlow [Wed, 2 Feb 2011 16:04:15 +0000 (16:04 +0000)]
fix warning

9 years agoGC refactoring and cleanup
Simon Marlow [Wed, 2 Feb 2011 15:49:55 +0000 (15:49 +0000)]
GC refactoring and cleanup
Now we keep any partially-full blocks in the gc_thread[] structs after
each GC, rather than moving them to the generation.  This should give
us slightly better locality (though I wasn't able to measure any
difference).

Also in this patch: better sanity checking with THREADED.

9 years agoavoid adding HPC ticks to arrow constructs (fixes #1333)
Ross Paterson [Wed, 2 Feb 2011 21:14:25 +0000 (21:14 +0000)]
avoid adding HPC ticks to arrow constructs (fixes #1333)

9 years agoFix the profiling build
Simon Marlow [Wed, 2 Feb 2011 13:22:57 +0000 (13:22 +0000)]
Fix the profiling build

9 years agoA small GC optimisation
Simon Marlow [Wed, 2 Feb 2011 12:30:49 +0000 (12:30 +0000)]
A small GC optimisation
Store the *number* of the destination generation in the Bdescr struct,
so that in evacuate() we don't have to deref gen to get it.
This is another improvement ported over from my GC branch.

9 years agoscheduleProcessInbox: use non-blocking acquire, and take the whole queue
Simon Marlow [Wed, 2 Feb 2011 11:49:07 +0000 (11:49 +0000)]
scheduleProcessInbox: use non-blocking acquire, and take the whole queue
This is an improvement from my GC branch, that helps performance for
intensive message-passing communication between Capabilities.

9 years agodo a bit of by-hand CSE
Simon Marlow [Wed, 2 Feb 2011 11:44:17 +0000 (11:44 +0000)]
do a bit of by-hand CSE

9 years agoadd a const
Simon Marlow [Wed, 2 Feb 2011 11:43:45 +0000 (11:43 +0000)]
add a const

9 years agoadd TRY_ACQUIRE_LOCK()
Simon Marlow [Wed, 2 Feb 2011 11:32:42 +0000 (11:32 +0000)]
add TRY_ACQUIRE_LOCK()

9 years agoRemove the per-generation mutable lists
Simon Marlow [Wed, 2 Feb 2011 11:26:46 +0000 (11:26 +0000)]
Remove the per-generation mutable lists
Now that we use the per-capability mutable lists exclusively.

9 years ago(no commit message)
keller@cse.unsw.edu.au [Wed, 2 Feb 2011 05:14:08 +0000 (05:14 +0000)]

9 years agoRemoved minor bug
keller@cse.unsw.edu.au [Wed, 2 Feb 2011 04:08:26 +0000 (04:08 +0000)]
Removed minor bug

9 years ago+RTS -qw hasn't done anything since 7.0.1; remove the implementation & docs
Simon Marlow [Tue, 1 Feb 2011 16:37:27 +0000 (16:37 +0000)]
+RTS -qw hasn't done anything since 7.0.1; remove the implementation & docs
It is still (silently) accepted for backwards compatibility.

9 years agocomments
Simon Marlow [Tue, 1 Feb 2011 08:58:30 +0000 (08:58 +0000)]
comments

9 years agoadded handling of data constructors to vectLam
keller@cse.unsw.edu.au [Tue, 1 Feb 2011 04:28:07 +0000 (04:28 +0000)]
added handling of data constructors to vectLam

9 years agopruneSparkQueue: check for tagged pointers
Simon Marlow [Mon, 14 Feb 2011 12:38:58 +0000 (12:38 +0000)]
pruneSparkQueue: check for tagged pointers
This was a bug in 6.12.3.  I think the problem no longer occurs due to
the way sparks are treated as weak pointers, but it doesn't hurt to
test for tagged pointers anyway: better to do the test than have a
subtle invariant.

9 years agoFix Trac #4953: local let binders can have IdInfo with free names
simonpj@microsoft.com [Mon, 14 Feb 2011 14:03:34 +0000 (14:03 +0000)]
Fix Trac #4953: local let binders can have IdInfo with free names

Local let binders in IfaceExpr never used to have unfoldings,
but lately they can (becuase they can have an INLINE pragma).
We must take account of the variables mentioned in the pragma
when computing the fingerprint.

9 years agoComments only
simonpj@microsoft.com [Mon, 14 Feb 2011 09:07:03 +0000 (09:07 +0000)]
Comments only

9 years agoLLVM: Huge improvement to mangler speed.
David Terei [Sun, 13 Feb 2011 01:44:06 +0000 (01:44 +0000)]
LLVM: Huge improvement to mangler speed.

The old llvm mangler was horrible! Very slow
due to bad design and code. New version is
linear complexity as it should be and far
lower coefficients. This fixes trac 4838.

9 years agoFix platform detection in bindists
Ian Lynagh [Fri, 11 Feb 2011 18:42:44 +0000 (18:42 +0000)]
Fix platform detection in bindists
In a bindist, we generate files like the hsc2hs wrapper.
This means we need to have the right values for the variables like
CONF_GCC_LINKER_OPTS_STAGE1 which in turn means we need to know what
platform we're on.

9 years agoNew plan: push unsolved wanteds inwards
simonpj@microsoft.com [Fri, 11 Feb 2011 17:40:58 +0000 (17:40 +0000)]
New plan: push unsolved wanteds inwards

This fixes Trac #4935.  See Note [Preparing inert set for implications].
Lots of comments, but not a lot of code is changed!

9 years agoRemove unnecessary import, plus white space
simonpj@microsoft.com [Fri, 11 Feb 2011 17:39:25 +0000 (17:39 +0000)]
Remove unnecessary import, plus white space

9 years agoFix small but egregious error: using un-zonked constraints in simplifyRule
simonpj@microsoft.com [Fri, 11 Feb 2011 17:38:35 +0000 (17:38 +0000)]
Fix small but egregious error: using un-zonked constraints in simplifyRule

This resulted in double unifications.  Fix is trivial.

9 years agomakeSolvedByInst is only called on wanteds
simonpj@microsoft.com [Fri, 11 Feb 2011 17:34:15 +0000 (17:34 +0000)]
makeSolvedByInst is only called on wanteds

This patch just adds an assert error.

9 years agoEnable DTrace on Solaris; based on a patch from Karel Gardas
Ian Lynagh [Thu, 10 Feb 2011 15:52:17 +0000 (15:52 +0000)]
Enable DTrace on Solaris; based on a patch from Karel Gardas

9 years agoUse DTrace whenever it's available
Ian Lynagh [Thu, 10 Feb 2011 15:33:00 +0000 (15:33 +0000)]
Use DTrace whenever it's available
Now that we've stopped trying to support 64bit OS X 10.5, the DTrace
problems there don't matter.

9 years agoAnnotate thread stop events with the owner of the black hole
Simon Marlow [Thu, 27 Jan 2011 16:42:26 +0000 (16:42 +0000)]
Annotate thread stop events with the owner of the black hole

So we can now get these in ThreadScope:

  19487000: cap 1: stopping thread 6 (blocked on black hole owned by thread 4)

Note: needs an update to ghc-events.  Older ThreadScopes will just
ignore the new information.

9 years agoupdate debugging code for fragmentation
Simon Marlow [Tue, 25 Jan 2011 11:10:11 +0000 (11:10 +0000)]
update debugging code for fragmentation

9 years agoFix type checker error message
simonpj@microsoft.com [Tue, 1 Feb 2011 12:29:20 +0000 (12:29 +0000)]
Fix type checker error message

See Trac #4940. We had a message
     The lambda expression `\ x -> x' has one argument one argument,
repeating the "one argument" part.  Easy fix.

9 years agoSome refactoring of SpecConstr
simonpj@microsoft.com [Tue, 1 Feb 2011 12:28:41 +0000 (12:28 +0000)]
Some refactoring of SpecConstr

This was originally to improve the case when SpecConstr generated a
function with an unused argument (see Trac #4941), but I ended up
giving up on that.  But the refactoring is still an improvement.

In particular I got rid of BothOcc, which was unused.

9 years agoDon't make join points when the case has only one non-bottom alternative
simonpj@microsoft.com [Tue, 1 Feb 2011 12:26:37 +0000 (12:26 +0000)]
Don't make join points when the case has only one non-bottom alternative

This fixes Trac #4930.  See Note [Bottom alternatives] in Simplify.lhs

9 years agoImprove Simplifier and SpecConstr behaviour
simonpj@microsoft.com [Mon, 31 Jan 2011 11:35:29 +0000 (11:35 +0000)]
Improve Simplifier and SpecConstr behaviour

Trac #4908 identified a case where SpecConstr wasn't "seeing" a
specialisation it should easily get.  The solution was simple: see
Note [Add scrutinee to ValueEnv too] in SpecConstr.

Then it turned out that there was an exactly analogous infelicity in
the mighty Simplifer too; see Note [Add unfolding for scrutinee] in
Simplify. This fix is good for Simplify even in the absence of the
SpecConstr change.  (It arose when I moved the binder- swap stuff to
OccAnall, not realising that it *remains* valuable to record info
about the scrutinee of a case expression.  The Note says why.

Together these two changes are unconditionally good.  Better
simplification, better specialisation. Thank you Max.

9 years agofix warning
Simon Marlow [Mon, 31 Jan 2011 13:59:51 +0000 (13:59 +0000)]
fix warning

9 years agoreplace C++ comments with C comments (Solaris' DTrace fails on C++ comments)
Karel Gardas [Wed, 12 Jan 2011 05:18:29 +0000 (05:18 +0000)]
replace C++ comments with C comments (Solaris' DTrace fails on C++ comments)

9 years agoFix #4867, ghci displays negative floats incorrectly
gwright@antiope.com [Wed, 9 Feb 2011 22:24:23 +0000 (22:24 +0000)]
Fix #4867, ghci displays negative floats incorrectly

This patch fixes the erroneous relocations that caused
the bug in ticket #4867.  External addresses and global
offset table entries were relocated correctly, but all other
relocations were incorrectly calculated.  This caused, for
example, bad references to constants stored in the __const
section of the __TEXT segment.

This bug only affected OS X on 64-bit platforms.

9 years agoFix Array sizeof primops to use the correct offset (which happens to be 0, so it...
Daniel Peebles [Tue, 1 Feb 2011 06:30:17 +0000 (06:30 +0000)]
Fix Array sizeof primops to use the correct offset (which happens to be 0, so it worked before anyway). Makes us more future-proof, at least

9 years agoAdd sizeof(Mutable)Array# primitives
Daniel Peebles [Wed, 26 Jan 2011 05:15:54 +0000 (05:15 +0000)]
Add sizeof(Mutable)Array# primitives

9 years agofix TRY_ACQUIRE_LOCK on Windows.
Simon Marlow [Thu, 10 Feb 2011 15:00:35 +0000 (15:00 +0000)]
fix TRY_ACQUIRE_LOCK on Windows.

9 years agoconstant fold (a + N) - M and (a - N) + M
Simon Marlow [Thu, 10 Feb 2011 11:56:08 +0000 (11:56 +0000)]
constant fold  (a + N) - M  and  (a - N) + M

9 years agoRecursively call cmmMachOpFold on divides that we turned into shifts
Simon Marlow [Tue, 8 Feb 2011 10:43:45 +0000 (10:43 +0000)]
Recursively call cmmMachOpFold on divides that we turned into shifts
There might be more simplification to do.

9 years agoAdd unboxed tuple support to Template Haskell
Ian Lynagh [Thu, 10 Feb 2011 13:45:28 +0000 (13:45 +0000)]
Add unboxed tuple support to Template Haskell

9 years ago32-bit fix
Simon Marlow [Wed, 13 Oct 2010 15:42:00 +0000 (15:42 +0000)]
32-bit fix

9 years agoupdate to mingw gcc 4.5.2
Simon Marlow [Wed, 19 Jan 2011 13:50:53 +0000 (13:50 +0000)]
update to mingw gcc 4.5.2

9 years agocount fizzled and GC'd sparks separately
Simon Marlow [Thu, 11 Nov 2010 13:27:27 +0000 (13:27 +0000)]
count fizzled and GC'd sparks separately