ghc.git
7 years agoSet configure.ac to build the 7.2.2 release ghc-7.2.2-release
Ian Lynagh [Tue, 8 Nov 2011 18:47:31 +0000 (18:47 +0000)] 
Set configure.ac to build the 7.2.2 release

7 years agoUpdate ANNOUNCE for 7.2.2
Ian Lynagh [Tue, 8 Nov 2011 18:46:48 +0000 (18:46 +0000)] 
Update ANNOUNCE for 7.2.2

7 years agoAdd haddock versino to release notes
Ian Lynagh [Tue, 8 Nov 2011 18:43:18 +0000 (18:43 +0000)] 
Add haddock versino to release notes

7 years agoAdd a release note about package trust
Ian Lynagh [Tue, 8 Nov 2011 18:28:16 +0000 (18:28 +0000)] 
Add a release note about package trust

7 years agotrust packages when they're installed
Ian Lynagh [Tue, 8 Nov 2011 17:59:48 +0000 (17:59 +0000)] 
trust packages when they're installed

For 7.2 we ignore the trust value in the package info we get given,
and always trust packages

7 years agoMerged: Fix two bugs in caes-floating (fixes Trac #5453)
Ian Lynagh [Thu, 3 Nov 2011 13:38:23 +0000 (13:38 +0000)] 
Merged: Fix two bugs in caes-floating (fixes Trac #5453)

Changeset bd6f5de7bb41f868522c6db2ad2793477840297e
Author: Simon Peyton Jones <simonpj@microsoft.com>

Fix two bugs in caes-floating (fixes Trac #5453)

The problem is documented in the ticket. The patch
does two things

1. Make exprOkForSpeculation return False for a non-exhaustive case

2. In SetLevels?.lvlExpr, look at the *result* scrutinee, not the
    *input* scrutinee, when testing for evaluated-ness

7 years agoAdd release notes for 7.2.2.
Ian Lynagh [Wed, 2 Nov 2011 22:12:04 +0000 (22:12 +0000)] 
Add release notes for 7.2.2.

7 years agoIn instance declarations, the method names are *occurrences* not *binders*
Simon Peyton Jones [Mon, 15 Aug 2011 07:41:02 +0000 (08:41 +0100)] 
In instance declarations, the method names are *occurrences* not *binders*

A long standing bug. The patch fixes Trac #5410

7 years agoFix Trac #5404: looking up signature binders in RnEnv
Simon Peyton Jones [Mon, 15 Aug 2011 07:41:55 +0000 (08:41 +0100)] 
Fix Trac #5404: looking up signature binders in RnEnv

See Note [Looking up Exact RdrNames] in RnEnv

7 years agomake shutdownHaskellAndExit() shut down the RTS and exit immediately
Simon Marlow [Fri, 12 Aug 2011 13:26:34 +0000 (14:26 +0100)] 
make shutdownHaskellAndExit() shut down the RTS and exit immediately
(#5402)

7 years agoFix #4988: we were wrongly running exception handlers in the
Simon Marlow [Wed, 31 Aug 2011 21:45:01 +0000 (22:45 +0100)] 
Fix #4988: we were wrongly running exception handlers in the
maskUninterruptible state instead of ordinary mask, due to a
misinterpretation of the way the TSO_INTERRUPTIBLE flag works.

Remarkably this must have been broken for quite some time.  Indeed we
even had a test that demonstrated the wrong behaviour (conc015a) but
presumably I didn't look hard enough at the output to notice that it
was wrong.

7 years agofix race condition in yieldCapability() (#5552)
Simon Marlow [Mon, 24 Oct 2011 12:29:32 +0000 (13:29 +0100)] 
fix race condition in yieldCapability() (#5552)

See comment for details.  I've tried quite hard, but haven't been able
to make a small test case that reproduces the bug.

7 years agoFix an x86 code generation bug (#5393). In fact, there were two bugs
Simon Marlow [Tue, 9 Aug 2011 11:31:03 +0000 (12:31 +0100)] 
Fix an x86 code generation bug (#5393).  In fact, there were two bugs
in X86.CodeGen.getNonClobberedOperand: two code fragments were the
wrong way around, and we were using the wrong size on an
instruction (32 bits instead of the word size).  This bit of the code
generator must have never worked!

7 years agoTell sync-all about the "tag" command
Ian Lynagh [Tue, 9 Aug 2011 20:45:06 +0000 (21:45 +0100)] 
Tell sync-all about the "tag" command

7 years agoSet RELEASE back to NO
Ian Lynagh [Tue, 9 Aug 2011 20:44:52 +0000 (21:44 +0100)] 
Set RELEASE back to NO

7 years agoExpand on the unicode changes in the release notes ghc-7.2.1-release
Ian Lynagh [Sun, 7 Aug 2011 14:10:34 +0000 (15:10 +0100)] 
Expand on the unicode changes in the release notes

7 years agoSet version number to 7.2.1 and RELEASE to YES
Ian Lynagh [Sun, 7 Aug 2011 13:10:34 +0000 (14:10 +0100)] 
Set version number to 7.2.1 and RELEASE to YES

7 years agoAdd a case for kfreebsdgnu in Platforms.hs
Ian Lynagh [Sun, 7 Aug 2011 12:57:08 +0000 (13:57 +0100)] 
Add a case for kfreebsdgnu in Platforms.hs

7 years agoWibble to "Fix a long-standing bug in HsUtils.hsTyClDeclBinders"
Simon Peyton Jones [Fri, 5 Aug 2011 16:40:29 +0000 (17:40 +0100)] 
Wibble to "Fix a long-standing bug in HsUtils.hsTyClDeclBinders"

7 years agoFix a long-standing bug in HsUtils.hsTyClDeclBinders
Simon Peyton Jones [Fri, 5 Aug 2011 14:26:31 +0000 (15:26 +0100)] 
Fix a long-standing bug in HsUtils.hsTyClDeclBinders

We were returning the tycon of a type family *instance*
as a binder, and it just isn't!

Consequential tidy-ups follow.  I tripped over this on
the way to something else.  I'm not sure it was causing
a problem, but it is Plainly Wrong.

7 years agoAnother run at binders in Template Haskell (fixes Trac #5379)
Simon Peyton Jones [Fri, 5 Aug 2011 14:29:44 +0000 (15:29 +0100)] 
Another run at binders in Template Haskell (fixes Trac #5379)

TH quotation was using mkName rather than newName for
top-level definitions, which is plain wrong as #5379
points out.

7 years agotypo
Simon Marlow [Thu, 4 Aug 2011 11:07:30 +0000 (12:07 +0100)] 
typo

7 years agoAdd a release note about TypeSynonymInstances change of behaviour
Ian Lynagh [Fri, 5 Aug 2011 19:28:49 +0000 (20:28 +0100)] 
Add a release note about TypeSynonymInstances change of behaviour

As discussed in #5377

7 years agoAdd plugin documentation for reinitializeGlobals
Austin Seipp [Sun, 31 Jul 2011 15:26:52 +0000 (10:26 -0500)] 
Add plugin documentation for reinitializeGlobals

7 years agoRevert "Stop using -Wl,-no_pie on OS X"
Ian Lynagh [Thu, 4 Aug 2011 15:36:17 +0000 (16:36 +0100)] 
Revert "Stop using -Wl,-no_pie on OS X"

This reverts commit d02a1979d5c5eacd2c5daea7f5852a98988b4d97.

Apparently there are still problems with gmp. See #5293 for more details.

7 years agoDon't duplicate files in bindists; trac #5356
Ian Lynagh [Thu, 4 Aug 2011 15:24:30 +0000 (16:24 +0100)] 
Don't duplicate files in bindists; trac #5356

We were putting
    includes/ghcautoconf.h
    includes/ghcconfig.h
    includes/ghcplatform.h
into bindists twice.

7 years agoChange the representation of export lists in .hi files
Simon Peyton Jones [Tue, 2 Aug 2011 09:43:57 +0000 (10:43 +0100)] 
Change the representation of export lists in .hi files

Currently export list in .hi files are partitioned by module
  export M T(C1,C2)
         N f,g
In each list we only have OccNames, all assumed to come from
the parent module M or N resp.

This patch changes the representatation so that export lists
have full Names:
  export M.T(M.C1,M.C2), N.f, N.g

Numerous advatages
  * AvailInfo no longer needs to be parameterised; it always
    contains Names

  * Fixes Trac #5306.  This was the main provocation

  * Less to-and-fro conversion when reading interface files

It's all generally simpler.  Interface files should not get bigger,
becuase they have a nice compact representation for Names.

7 years agoAdd CoreMonad.reinitializeGlobals so plugins can work around linker issues
Max Bolingbroke [Fri, 29 Jul 2011 11:05:46 +0000 (12:05 +0100)] 
Add CoreMonad.reinitializeGlobals so plugins can work around linker issues

When a plugin is loaded, it currently gets linked against a *newly loaded* copy
of the GHC package. This would not be a problem, except that the new copy has its
own mutable state that is not shared with that state that has already been initialized by
the original GHC package.

This leads to loaded plugins calling GHC code which pokes the static flags,
and then dying with a panic because the static flags *it* sees are uninitialized.

There are two possible solutions:
  1. Export the symbols from the GHC executable from the GHC library and link
     against this existing copy rather than a new copy of the GHC library
  2. Carefully ensure that the global state in the two copies of the GHC
     library matches

I tried 1. and it *almost* works (and speeds up plugin load times!) except
on Windows. On Windows the GHC library tends to export more than 65536 symbols
(see #5292) which overflows the limit of what we can export from the EXE and
causes breakage.

(Note that if the GHC exeecutable was dynamically linked this wouldn't be a problem,
because we could share the GHC library it links to.)

We are going to try 2. instead. Unfortunately, this means that every plugin
will have to say `reinitializeGlobals` before it does anything, but never mind.

I've threaded the cr_globals through CoreM rather than giving them as an
argument to the plugin function so that we can turn this function into
(return ()) without breaking any plugins when we eventually get 1. working.

7 years agoWe no longer need to mark Entry as local or not
Max Bolingbroke [Fri, 29 Jul 2011 09:08:33 +0000 (10:08 +0100)] 
We no longer need to mark Entry as local or not

7 years agoRemove last use of entryLblToInfoLbl
Max Bolingbroke [Fri, 29 Jul 2011 08:32:58 +0000 (09:32 +0100)] 
Remove last use of entryLblToInfoLbl

7 years agoCommon up uses of entryLblToInfoLbl in CmmProcPoint
Max Bolingbroke [Fri, 29 Jul 2011 08:18:38 +0000 (09:18 +0100)] 
Common up uses of entryLblToInfoLbl in CmmProcPoint

7 years agoEliminate cvtToSRTLbl (dead code)
Max Bolingbroke [Thu, 28 Jul 2011 22:58:39 +0000 (23:58 +0100)] 
Eliminate cvtToSRTLbl (dead code)

7 years agoEliminate localiseLabel
Max Bolingbroke [Thu, 28 Jul 2011 22:57:55 +0000 (23:57 +0100)] 
Eliminate localiseLabel

7 years agoEliminate infoLblToEntryLbl
Max Bolingbroke [Thu, 28 Jul 2011 22:52:31 +0000 (23:52 +0100)] 
Eliminate infoLblToEntryLbl

7 years agoThere is only one flavour of LFBlackHole: make that explicit
Max Bolingbroke [Thu, 28 Jul 2011 22:40:36 +0000 (23:40 +0100)] 
There is only one flavour of LFBlackHole: make that explicit

7 years agoPut the info CLabel in CmmInfoTable rather than a localness flag, tidy up some info...
Max Bolingbroke [Thu, 28 Jul 2011 22:37:55 +0000 (23:37 +0100)] 
Put the info CLabel in CmmInfoTable rather than a localness flag, tidy up some info<->entry conversions

Conflicts:

compiler/cmm/CmmDecl.hs

7 years agoRepair sanity of infoTableLabelFromCI in old code generator
Max Bolingbroke [Thu, 28 Jul 2011 18:57:27 +0000 (19:57 +0100)] 
Repair sanity of infoTableLabelFromCI in old code generator

7 years agoStop using -Wl,-no_pie on OS X
Ian Lynagh [Wed, 3 Aug 2011 19:25:52 +0000 (20:25 +0100)] 
Stop using -Wl,-no_pie on OS X

Now that the in-tree gmp has been upgraded, it should no longer be
necessary, according to #5293.

7 years agoOn OS X x86_64, use "-Wl,-no_pie" and "-Wl,-no_compact_unwind" to avoid linker warnings
Manuel M T Chakravarty [Wed, 27 Jul 2011 13:05:01 +0000 (23:05 +1000)] 
On OS X x86_64, use "-Wl,-no_pie" and "-Wl,-no_compact_unwind" to avoid linker warnings

- "-Wl,-no_pie" can be removed once GMP gets updated

7 years agoAdd a few release note highlights
Ian Lynagh [Wed, 3 Aug 2011 20:34:59 +0000 (21:34 +0100)] 
Add a few release note highlights

7 years agoUpdate 7.2.1 ANNOUNCE
Ian Lynagh [Wed, 3 Aug 2011 18:47:16 +0000 (19:47 +0100)] 
Update 7.2.1 ANNOUNCE

7 years agoFix a grevious error in InstEnv: Trac #5095
Simon Peyton Jones [Wed, 3 Aug 2011 15:22:06 +0000 (16:22 +0100)] 
Fix a grevious error in InstEnv: Trac #5095

An claimed short-cut optimisation was actually an error.
The optimisation was this: when looking up (C a b), where
'a' and 'b' are type variables, we were returning [] immediately
if the instance environment had no instances of form (C a b).
Why? Because the thing being looked up definitely won't match
(C Int Bool), say.

BUT it will *unify* with (C Int Bool) and we care very much
about things it might unify with.  If we neglect them we may
silently allow incoherent instance selection, and that is
exactly what happened in #5095.

The fix is easy: remove the "optimisation".

7 years agoFix Trac #5372: a panic caused by over-eager error recovery
Simon Peyton Jones [Wed, 3 Aug 2011 15:16:09 +0000 (16:16 +0100)] 
Fix Trac #5372: a panic caused by over-eager error recovery

7 years agoInclude the instances of associated types in the "extras" of a class
Simon Peyton Jones [Wed, 3 Aug 2011 06:46:50 +0000 (07:46 +0100)] 
Include the instances of associated types in the "extras" of a class

This fixes Trac #5147, which was going wrong because
the class ABI fingerprint wasn't changing when we added
or removed a Show instance to the associated type.

7 years agoRefactor configure.ac's: Define FIND_GCC() in aclocal.m4
Ian Lynagh [Tue, 2 Aug 2011 23:53:57 +0000 (00:53 +0100)] 
Refactor configure.ac's: Define FIND_GCC() in aclocal.m4

7 years agoRefactor configure.ac's: Put XCODE_VERSION() in aclocal.m4
Ian Lynagh [Tue, 2 Aug 2011 23:49:10 +0000 (00:49 +0100)] 
Refactor configure.ac's: Put XCODE_VERSION() in aclocal.m4

7 years agoSmall configure.ac refactoring
Ian Lynagh [Tue, 2 Aug 2011 23:37:24 +0000 (00:37 +0100)] 
Small configure.ac refactoring

7 years agoAvoid confusing Haddock in comment
Simon Peyton Jones [Tue, 2 Aug 2011 21:03:21 +0000 (22:03 +0100)] 
Avoid confusing Haddock in comment

7 years agoFix path to Cabal library, corrects documentation.
Lennart Kolmodin [Wed, 20 Jul 2011 13:14:03 +0000 (15:14 +0200)] 
Fix path to Cabal library, corrects documentation.

7 years agoFix reversed test in OccurAnal (introduced in recent commit 428f8c3d)
Simon Peyton Jones [Tue, 2 Aug 2011 17:03:46 +0000 (18:03 +0100)] 
Fix reversed test in OccurAnal (introduced in recent commit 428f8c3d)

7 years agoComment wibble (hash at start of line confused CPP)
Simon Peyton Jones [Tue, 2 Aug 2011 13:27:44 +0000 (14:27 +0100)] 
Comment wibble (hash at start of line confused CPP)

7 years agoDon't bleat about non-External names in mkUsageInfo
Simon Peyton Jones [Tue, 2 Aug 2011 13:06:12 +0000 (14:06 +0100)] 
Don't bleat about non-External names in mkUsageInfo

See Note [Internal used_names].  Fixes Trac #5362.

7 years agoFurther simplification to OccurAnal, concerning "weak loop breakers"
Simon Peyton Jones [Mon, 1 Aug 2011 14:27:39 +0000 (15:27 +0100)] 
Further simplification to OccurAnal, concerning "weak loop breakers"

Fixes Trac #5359.

7 years agoDon't run a splice if there are preceding type errors
Simon Peyton Jones [Mon, 1 Aug 2011 14:23:02 +0000 (15:23 +0100)] 
Don't run a splice if there are preceding type errors

Fixes Trac #5358.

7 years agoOs X: With Xcode 4, check for gcc-4.2 also in the setup for binary distributions
Manuel M T Chakravarty [Mon, 1 Aug 2011 01:57:43 +0000 (11:57 +1000)] 
Os X: With Xcode 4, check for gcc-4.2 also in the setup for binary distributions

7 years agoOn OS X, use gcc-4.2 with Xcode 4 and up
Manuel M T Chakravarty [Wed, 27 Jul 2011 04:59:22 +0000 (14:59 +1000)] 
On OS X, use gcc-4.2 with Xcode 4 and up

7 years agoExchange noinline/inlanable links to match text
Daniel Fischer [Wed, 27 Jul 2011 19:39:44 +0000 (21:39 +0200)] 
Exchange noinline/inlanable links to match text

7 years agoAdd a comment about how to do validate while capturing a debug log,
Simon Peyton Jones [Mon, 20 Jun 2011 16:06:07 +0000 (17:06 +0100)] 
Add a comment about how to do validate while capturing a debug log,
for debugging the build system.

7 years agoFix the permissions of all the package.conf.d files when installing
Ian Lynagh [Thu, 28 Jul 2011 15:03:13 +0000 (16:03 +0100)] 
Fix the permissions of all the package.conf.d files when installing

Fixes trac #5311.

7 years agoDon't fail validate due to warnings in Cabal
Ian Lynagh [Wed, 27 Jul 2011 14:00:21 +0000 (15:00 +0100)] 
Don't fail validate due to warnings in Cabal

Duncan says that Cabal isn't guaranteed to be warning-free.

7 years agoFix let-floating out of Rec blocks
Simon Peyton Jones [Wed, 27 Jul 2011 05:25:45 +0000 (06:25 +0100)] 
Fix let-floating out of Rec blocks

This fixes Trac #5341 and #5342.  The question is about
what to do when floating out of the RHS of a Rec-bound
function, when there's a FloatCase involved.  For FloatLets
they can join the Rec block, but FloatCases can't.  But
we don't want to mess with the arity (that was the bug).
So in this (rather exotic case) we push the FloatCase
back inside any lambdas.

See Note [Floating out of Rec rhss]. It's a slightly ugly fix, but I
can't think of anything better, and I don't think it has any practical
impact.

7 years agoFix comments and documentation on monad comprehensions
Simon Peyton Jones [Wed, 27 Jul 2011 05:22:26 +0000 (06:22 +0100)] 
Fix comments and documentation on monad comprehensions

7 years agoThe implementation of "weak loop breakers" was being too clever
Simon Peyton Jones [Mon, 25 Jul 2011 17:01:59 +0000 (18:01 +0100)] 
The implementation of "weak loop breakers" was being too clever

The too-clever-ness meant that a variable could just go out
of scope; this happened in building System.Consol.Haskeline.Backend.Terminfo
in the haskeline library.

This patch makes the weak-loopbreaker computation simpler, and a bit
more conserative; which fixes the bug, and doesn't make any difference
to the code in the end.

7 years agoImprove the documentation of the new generic programming mechanism.
Jose Pedro Magalhaes [Mon, 25 Jul 2011 08:57:41 +0000 (10:57 +0200)] 
Improve the documentation of the new generic programming mechanism.

Thanks to David Terei for the comments.

7 years agoUpdate release notes
Ian Lynagh [Sun, 24 Jul 2011 22:20:06 +0000 (23:20 +0100)] 
Update release notes

7 years agoFix docbook syntax in user guide
Ian Lynagh [Sun, 24 Jul 2011 21:34:11 +0000 (22:34 +0100)] 
Fix docbook syntax in user guide

7 years agoImprove debug printing for simplifier counts
Simon Peyton Jones [Thu, 21 Jul 2011 10:09:18 +0000 (11:09 +0100)] 
Improve debug printing for simplifier counts

7 years agoFix build in 7.2 branch
Ian Lynagh [Sun, 24 Jul 2011 15:45:47 +0000 (16:45 +0100)] 
Fix build in 7.2 branch

Merge the part of

    commit 2329833d4f3143d781db3448785fd395e8dba71c
    Author: David Terei <davidterei@gmail.com>
    Date:   Wed Jul 20 16:27:28 2011 -0700

        Format fixes

that defines typInstErr.

7 years agoSimplify the treatment of RULES in OccurAnal
Simon Peyton Jones [Thu, 21 Jul 2011 11:52:01 +0000 (12:52 +0100)] 
Simplify the treatment of RULES in OccurAnal

I realised that my recently-added cunning stuff about
RULES for imported Ids was simply wrong, so this patch
removes it.   See Note [Rules for imported functions],
which explains it all.

This patch also does quite a bit of refactoring in
the treatment of loop breakers.

7 years agoDon't subtract HC_tot_time when calculating mut_user_time
Ian Lynagh [Sun, 24 Jul 2011 12:14:20 +0000 (13:14 +0100)] 
Don't subtract HC_tot_time when calculating mut_user_time

Heap census now happens during GC, so that time is already accounted
for in GC_tot_cpu.

7 years agoFix heap profiling times
Ian Lynagh [Sat, 23 Jul 2011 23:01:54 +0000 (00:01 +0100)] 
Fix heap profiling times

Now that the heap census runs in the middle of garbage collections,
the "CPU time" it was calculating included any CPU time used so far
in the current GC. This could cause CPU time to appear to go down,
which means hp2ps complained about "samples out of sequence".

I'm not sure if this is the nicest way to solve this (maybe resurrecting
mut_user_time_during_GC would be better?) but it gets things working again.

7 years agoTweak the typeable fingerprinting
Ian Lynagh [Fri, 22 Jul 2011 22:17:56 +0000 (23:17 +0100)] 
Tweak the typeable fingerprinting

Put spaces inbetween the values, so e.g.
    p:Foobar.baz
    p:Foo.barbaz
will hash differently.

7 years agoSync the typeable fingerprinting with base
Ian Lynagh [Fri, 22 Jul 2011 21:57:16 +0000 (22:57 +0100)] 
Sync the typeable fingerprinting with base

7 years agoComments only
Simon Peyton Jones [Fri, 22 Jul 2011 07:57:09 +0000 (08:57 +0100)] 
Comments only

7 years agoImplement a findCycle function in Digraph,
Simon Peyton Jones [Fri, 22 Jul 2011 07:56:42 +0000 (08:56 +0100)] 
Implement a findCycle function in Digraph,
and use it to report module loops nicely

This fixes Trac #5307. Now we get

    Module imports form a cycle:
             module `M8' (.\M8.hs)
            imports `M1' (M1.hs)
      which imports `M9' (.\M9.hs-boot)
      which imports `M8' (.\M8.hs)

And the algorithm is linear time.

7 years agoUpdate safe haskell doc about Data.Typeable
David Terei [Fri, 22 Jul 2011 00:29:18 +0000 (17:29 -0700)] 
Update safe haskell doc about Data.Typeable

7 years agoshow warning flags in :set (lost in the recent dopt->wopt change,
Simon Marlow [Thu, 21 Jul 2011 13:55:20 +0000 (14:55 +0100)] 
show warning flags in :set (lost in the recent dopt->wopt change,
noticed by test ghci024)

7 years agoneed to release the SM lock around heapCensus() to avoid deadlock with
Simon Marlow [Thu, 21 Jul 2011 13:29:58 +0000 (14:29 +0100)] 
need to release the SM lock around heapCensus() to avoid deadlock with
+RTS -hT and -threaded.

7 years agoone more instance of the 64-bit constant bug I noticed
Simon Marlow [Thu, 21 Jul 2011 13:29:26 +0000 (14:29 +0100)] 
one more instance of the 64-bit constant bug I noticed

7 years agoEta expand partial applications
Simon Peyton Jones [Thu, 21 Jul 2011 11:54:51 +0000 (12:54 +0100)] 
Eta expand partial applications

When we have
     x = \v -> map g
we want to eta-expand to
     x = \v y -> map g y

We weren't doing so, and that led to worse code and,
perhaps, #5285.  I need to check the latter, but I
was certainly seeing one similar error.  Anyway
this looks like a definite improvement

7 years agoWhen specialising recursive functions, mark the specialised function NOINLINE
Simon Peyton Jones [Thu, 21 Jul 2011 11:45:51 +0000 (12:45 +0100)] 
When specialising recursive functions, mark the specialised function NOINLINE

This fixes Trac #4903.  See Note [Specialising imported functions] in OccurAnal.

7 years agoChange loop breaker terminology
Simon Peyton Jones [Thu, 21 Jul 2011 11:38:23 +0000 (12:38 +0100)] 
Change loop breaker terminology

We used to have "loop breaker" and "non-rule loop breaker", but
the unqualified version in particualr was pretty confusing.  So
now we have "strong loop breaker" and "weak loop breaker";
comments in BasicTypes and OccurAnal.

7 years agoComments and white space
Simon Peyton Jones [Thu, 21 Jul 2011 11:32:32 +0000 (12:32 +0100)] 
Comments and white space

7 years agoGeneralise the type of minusVarEnv slightly
Simon Peyton Jones [Thu, 21 Jul 2011 11:25:39 +0000 (12:25 +0100)] 
Generalise the type of minusVarEnv slightly

7 years agoAdd an unregisterised config to build.mk
David Terei [Wed, 20 Jul 2011 23:45:58 +0000 (16:45 -0700)] 
Add an unregisterised config to build.mk

7 years agoEnable derived but not hand crafted Typeable instances in Safe Haskell
Ian Lynagh [Sun, 24 Jul 2011 15:04:57 +0000 (16:04 +0100)] 
Enable derived but not hand crafted Typeable instances in Safe Haskell

Conflicts:

compiler/typecheck/TcInstDcls.lhs

7 years agoFix 'make test' command for new testsuite location
David Terei [Wed, 20 Jul 2011 21:53:40 +0000 (14:53 -0700)] 
Fix 'make test' command for new testsuite location

7 years agoUpdate some files for new testsuite tests location
David Terei [Wed, 20 Jul 2011 21:46:54 +0000 (14:46 -0700)] 
Update some files for new testsuite tests location

7 years agoMove the call to heapCensus() into GarbageCollect(), just before
Ian Lynagh [Wed, 20 Jul 2011 20:35:49 +0000 (21:35 +0100)] 
Move the call to heapCensus() into GarbageCollect(), just before
calling resurrectThreads() (fixes #5314).

This avoids a lot of problems, because resurrectThreads() may
overwrite some closures in the heap, leaving slop behind.  The bug in
instances, this fix avoids them all in one go.

Conflicts:

rts/Schedule.c

7 years agocomment updates
Simon Marlow [Wed, 20 Jul 2011 14:26:11 +0000 (15:26 +0100)] 
comment updates

7 years agofix an assertion failure, and possibly some bogosity (see comment)
Simon Marlow [Wed, 20 Jul 2011 14:25:58 +0000 (15:25 +0100)] 
fix an assertion failure, and possibly some bogosity (see comment)

7 years agoImprove semantics of wild-card expansion (fixes #5334)
Simon Peyton Jones [Wed, 20 Jul 2011 14:38:58 +0000 (15:38 +0100)] 
Improve semantics of wild-card expansion (fixes #5334)

When expanding the {..} stuff in an *expression*, take
account of which variables are in scope.

I updated the documentation, and in doing so found that
part of the previously-documented semantics wasn't implemented
(namely the stuff about fields in scope), so I fixed that too.

7 years agoReport on unused type variables (fixes #5331)
Simon Peyton Jones [Wed, 20 Jul 2011 14:31:40 +0000 (15:31 +0100)] 
Report on unused type variables (fixes #5331)

We were doing this already for explicit types like
   f :: forall a. Int
but not for constructor declarations.  This patch
makes it consistent.

7 years agoComments only
Simon Peyton Jones [Wed, 20 Jul 2011 14:30:05 +0000 (15:30 +0100)] 
Comments only

7 years agoFix #481: use a safe recompilation check when Template Haskell is
Simon Marlow [Wed, 20 Jul 2011 08:37:54 +0000 (09:37 +0100)] 
Fix #481: use a safe recompilation check when Template Haskell is
being used.

We now track whether a module used any TH splices in the ModIface (and
at compile time in the TcGblEnv and ModGuts).  If a module used TH
splices last time it was compiled, then we ignore the results of the
normal recompilation check and recompile anyway, *unless* the module
is "stable" - that is, none of its dependencies (direct or indirect)
have changed.  The stability test is pretty important - otherwise ghc
--make would always recompile TH modules even if nothing at all had
changed, but it does require some extra plumbing to get this
information from GhcMake into HscMain.

test in driver/recomp009

7 years agonote that we don't understand a comment (#5249)
Simon Marlow [Tue, 19 Jul 2011 15:05:17 +0000 (16:05 +0100)] 
note that we don't understand a comment (#5249)

7 years agoFactor the GHC version into the hash generated by --abi-hash (#5328)
Simon Marlow [Tue, 19 Jul 2011 14:55:40 +0000 (15:55 +0100)] 
Factor the GHC version into the hash generated by --abi-hash (#5328)

7 years agoFix #5332 (more): unboxed singleton tuples are fine
Simon Peyton Jones [Wed, 20 Jul 2011 09:15:52 +0000 (10:15 +0100)] 
Fix #5332 (more): unboxed singleton tuples are fine

This patch fixes the unboxed singleton tuples in types and patterns

7 years agofix warning
Simon Marlow [Tue, 19 Jul 2011 10:04:42 +0000 (11:04 +0100)] 
fix warning

7 years agoFix a bug in the code generation for 64-bit literals on 32-bit x86: we
Simon Marlow [Tue, 19 Jul 2011 14:30:15 +0000 (15:30 +0100)] 
Fix a bug in the code generation for 64-bit literals on 32-bit x86: we
were accidentally zeroing out the high 32 bits.

This bug must have been here for ages, it was only just exposed by the
new Typeable code which uses two 64-bit values to store a 128-bit
hash, and so exercises the code generation for 64-bit stuff.