ghc.git
7 years agoAdd alpha, mips, mipseb, mipsel to the list of ArchUnknown arches
Ian Lynagh [Sat, 7 Jan 2012 22:16:41 +0000 (22:16 +0000)] 
Add alpha, mips, mipseb, mipsel to the list of ArchUnknown arches

7 years agoDoc fix
Ian Lynagh [Thu, 5 Jan 2012 13:44:42 +0000 (13:44 +0000)] 
Doc fix

7 years agoBe explicit about what we import from Data.Monoid
Johan Tibell [Wed, 4 Jan 2012 17:59:22 +0000 (09:59 -0800)] 
Be explicit about what we import from Data.Monoid

7 years agorefactoring
Simon Marlow [Fri, 6 Jan 2012 11:31:31 +0000 (11:31 +0000)] 
refactoring

7 years agosetNumCapabilities: don't barf() if it isn't supported, just print an error
Simon Marlow [Fri, 6 Jan 2012 11:26:31 +0000 (11:26 +0000)] 
setNumCapabilities: don't barf() if it isn't supported, just print an error

7 years agoEnable the threaded RTS when unregisterised too.
Simon Marlow [Fri, 6 Jan 2012 10:45:50 +0000 (10:45 +0000)] 
Enable the threaded RTS when unregisterised too.

It was disabled by me in 1a470c9404950cc6737853309d35798a98ad0c30 (May
2007), but the commit gave no explanation as to why.  Perhaps this was before
we had a separate knob for GhcWithSMP.

Anyway, it looks like threaded works fine with unregisterised, so I'm
enabling it again.

7 years agoFix a crash in STM when unregisterised
Simon Marlow [Fri, 6 Jan 2012 10:42:35 +0000 (10:42 +0000)] 
Fix a crash in STM when unregisterised

Fixes several test failures:
   ../../libraries/stm/tests       2411 [bad exit code] (normal,hpc,profasm,ghci,optllvm)
   ../../libraries/stm/tests       stm046 [bad exit code] (normal,hpc,profasm,ghci,optllvm)
   ../../libraries/stm/tests       stm061 [bad exit code] (normal,hpc,profasm,ghci,optllvm)

7 years agoupdate copyright, cite realistic version numbers, fix a smattering of typos
Gabor Greif [Thu, 5 Jan 2012 02:33:32 +0000 (03:33 +0100)] 
update copyright, cite realistic version numbers, fix a smattering of typos

7 years agoabstract away from the 'build-toolchain'-dependent sizeof(...) operator
Gabor Greif [Thu, 5 Jan 2012 18:41:36 +0000 (19:41 +0100)] 
abstract away from the 'build-toolchain'-dependent sizeof(...) operator

The sizes obtained this way do not work on a target system in general.
So in a future cross-compilable setup we need another way of obtaining
expansions for the macros OFFSET, FIELD_SIZE and TYPE_SIZE.

Guarded against accidental use of 'sizeof' by poisoning.

Verified that the generated *Constants.h/hs files are unchanged.

7 years agoFix crash with +RTS -xc (occasional cgrun057(profthreaded) failure)
Simon Marlow [Fri, 6 Jan 2012 10:19:37 +0000 (10:19 +0000)] 
Fix crash with +RTS -xc  (occasional cgrun057(profthreaded) failure)

Don't try to print a stack trace from raiseAsync() when there's no
exception - we might just be deleting the thread, or suspending
duplicate work.

7 years agoFix haddock validate problem.
David Terei [Fri, 6 Jan 2012 02:14:20 +0000 (18:14 -0800)] 
Fix haddock validate problem.

7 years agoFix validation warning
David Terei [Thu, 22 Dec 2011 23:24:48 +0000 (15:24 -0800)] 
Fix validation warning

7 years agoFormatting fixes
David Terei [Thu, 22 Dec 2011 22:58:10 +0000 (14:58 -0800)] 
Formatting fixes

7 years agoRemove unused arg field of CmmReturn
David Terei [Thu, 22 Dec 2011 22:48:56 +0000 (14:48 -0800)] 
Remove unused arg field of CmmReturn

7 years agoTabs -> Spaces
David Terei [Thu, 22 Dec 2011 22:41:53 +0000 (14:41 -0800)] 
Tabs -> Spaces

7 years agoFormatting wibble
David Terei [Thu, 22 Dec 2011 22:41:34 +0000 (14:41 -0800)] 
Formatting wibble

7 years agoRemove unused argument field on CmmJump
David Terei [Thu, 22 Dec 2011 22:40:22 +0000 (14:40 -0800)] 
Remove unused argument field on CmmJump

7 years agoFormatting fixes
David Terei [Thu, 22 Dec 2011 22:14:49 +0000 (14:14 -0800)] 
Formatting fixes

7 years agoTabs -> Spaces + formatting fixes
David Terei [Thu, 22 Dec 2011 13:11:52 +0000 (05:11 -0800)] 
Tabs -> Spaces + formatting fixes

7 years agoFixup to 4464c92badaedc45ce53d6349f6790f6d2298103
Simon Marlow [Wed, 4 Jan 2012 15:40:41 +0000 (15:40 +0000)] 
Fixup to 4464c92badaedc45ce53d6349f6790f6d2298103

Instead of enterLocalIdLabel we should get the label from the
ClosureInfo, because that knows better whether the label should be
local or not.

Needed by #5357

7 years agosmall refactoring
Simon Marlow [Thu, 5 Jan 2012 14:02:24 +0000 (14:02 +0000)] 
small refactoring

7 years agoWe must emit DELTA pseudo-instructions when moving %esp (#5747)
Simon Marlow [Thu, 5 Jan 2012 14:01:58 +0000 (14:01 +0000)] 
We must emit DELTA pseudo-instructions when moving %esp (#5747)

7 years agoGive the correct type to CCCS
Simon Marlow [Wed, 4 Jan 2012 15:23:27 +0000 (15:23 +0000)] 
Give the correct type to CCCS

Needed by #5357

7 years agoRename struct _CostCentreStack to struct CostCentreStack_ for consistency
Simon Marlow [Wed, 4 Jan 2012 15:23:15 +0000 (15:23 +0000)] 
Rename struct _CostCentreStack to struct CostCentreStack_ for consistency

Needed by #5357

7 years agoFix for unregisterised compilation: we want registers when defined(USE_MINIINTERPRETER)
Simon Marlow [Wed, 4 Jan 2012 15:14:31 +0000 (15:14 +0000)] 
Fix for unregisterised compilation: we want registers when defined(USE_MINIINTERPRETER)

Needed by #5357

7 years agoFix for unregisterised compilation: isStrangeTypeGlobal CCCS = True
Simon Marlow [Wed, 4 Jan 2012 15:13:56 +0000 (15:13 +0000)] 
Fix for unregisterised compilation: isStrangeTypeGlobal CCCS = True

Needed by #5357

7 years agoRename the CCCS field of StgTSO so as not to conflict with the CCCS pseudo-register
Simon Marlow [Wed, 4 Jan 2012 15:13:23 +0000 (15:13 +0000)] 
Rename the CCCS field of StgTSO so as not to conflict with the CCCS pseudo-register

Needed by #5357

7 years agoremove dead code
Simon Marlow [Wed, 4 Jan 2012 13:59:15 +0000 (13:59 +0000)] 
remove dead code

7 years agomkSlowEntryCode: enterLocalIdLabel should be enterIdLabel (#5357)
Simon Marlow [Wed, 4 Jan 2012 13:59:06 +0000 (13:59 +0000)] 
mkSlowEntryCode: enterLocalIdLabel should be enterIdLabel (#5357)

7 years agofix warning
Simon Marlow [Wed, 4 Jan 2012 13:45:35 +0000 (13:45 +0000)] 
fix warning

7 years agodsCImport (CLabel): drop foralls when checking for FunPtr
Simon Marlow [Wed, 4 Jan 2012 13:29:14 +0000 (13:29 +0000)] 
dsCImport (CLabel): drop foralls when checking for FunPtr

We were mislabelling some foreign imports as IsData rather than
IsFunction, because the type was forall a. FunPtr (... a ...).

Eventually this gave rise to these obscure error when compiling
unregisterised:

libraries/base/Foreign/Marshal/Alloc.hc:473:0:
     warning: built-in function ‘free’ declared as non-function

libraries/base/Foreign/Marshal/Alloc.hc:1004:0:
     error: ‘free’ redeclared as different kind of symbol

7 years agoKFreeBSD is also an ELF binary
Joachim Breitner [Sun, 1 Jan 2012 01:17:24 +0000 (02:17 +0100)] 
KFreeBSD is also an ELF binary

Fixes: #5733

7 years agoRestore printing of Rep type family instance with -ddump-deriving
Jose Pedro Magalhaes [Wed, 4 Jan 2012 11:39:03 +0000 (12:39 +0100)] 
Restore printing of Rep type family instance with -ddump-deriving

7 years agoRemove missing archs (mipseb, mipsel, alpha) (#5734)
Simon Marlow [Wed, 4 Jan 2012 11:44:02 +0000 (11:44 +0000)] 
Remove missing archs (mipseb, mipsel, alpha) (#5734)

It doesn't hurt to map these to ArchUnknown since we don't need to
know anything specific about them, and adding them would be a pain
(there are a bunch of places where we have to case-match on all the
arches to avoid warnings).

7 years agoosElfTarget should default to False (#5733)
Simon Marlow [Wed, 4 Jan 2012 11:39:55 +0000 (11:39 +0000)] 
osElfTarget should default to False (#5733)

Another portabilty regression: before Platform we used to use elf_OBJ_FORMAT:

 #if linux_TARGET_OS || freebsd_TARGET_OS || openbsd_TARGET_OS || solaris2_TARGET_OS
 #define elf_OBJ_FORMAT 1
 #endif

which defaults to undefined on unknown platforms.  Defaulting to
non-ELF is correct, it just means that we won't rely on ELF-specific
functionality.  I've added a comment to explain that.

7 years agoStore the word size as determined by configure, in the settings file (#5735)
Simon Marlow [Wed, 4 Jan 2012 11:37:47 +0000 (11:37 +0000)] 
Store the word size as determined by configure, in the settings file (#5735)

Now target32bit works for all targets without any manual intervention,
as it should do.  #5735 was a portability regression.

7 years agoFix the C backend after making CCCS an STG register
Simon Marlow [Tue, 3 Jan 2012 16:21:41 +0000 (16:21 +0000)] 
Fix the C backend after making CCCS an STG register

7 years agoIn the SIGTSTP handler, throw SIGSTOP instead of re-throwing SIGTSTP
Simon Marlow [Tue, 3 Jan 2012 15:35:19 +0000 (15:35 +0000)] 
In the SIGTSTP handler, throw SIGSTOP instead of re-throwing SIGTSTP

7 years agoFix minor bug introduced in e7e771d14ac671904a69abecf9e133d4647026c1
Simon Marlow [Tue, 3 Jan 2012 13:22:23 +0000 (13:22 +0000)] 
Fix minor bug introduced in e7e771d14ac671904a69abecf9e133d4647026c1

7 years agoRefer to Control.Concurrent instead of GHC.Conc
Simon Marlow [Tue, 3 Jan 2012 11:32:10 +0000 (11:32 +0000)] 
Refer to Control.Concurrent instead of GHC.Conc

Modified version of a patch by shelarcy <shelarcy@gmail.com>

7 years agoDon't record outputFile in the hashed flags
Simon Marlow [Tue, 3 Jan 2012 10:28:39 +0000 (10:28 +0000)] 
Don't record outputFile in the hashed flags

We don't want

    ghc --make M -o <file>

to force recompilation of all modules when <file> changes.  The -o
value is already taken into account by the recompilation machinery
when we check the modification time on the object file or the
executable.

7 years agoBe less verbose when printing out Vars
Simon Peyton Jones [Tue, 3 Jan 2012 10:35:46 +0000 (10:35 +0000)] 
Be less verbose when printing out Vars

For some reason we were printing every occurrence with its type
and that is far too much.

7 years agoMajor refactoring of CoAxioms
Simon Peyton Jones [Tue, 3 Jan 2012 10:35:08 +0000 (10:35 +0000)] 
Major refactoring of CoAxioms

This patch should have no user-visible effect.  It implements a
significant internal refactoring of the way that FC axioms are
handled.  The ultimate goal is to put us in a position to implement
"pattern-matching axioms".  But the changes here are only does
refactoring; there is no change in functionality.

Specifically:

 * We now treat data/type family instance declarations very,
   very similarly to types class instance declarations:

   - Renamed InstEnv.Instance as InstEnv.ClsInst, for symmetry with
     FamInstEnv.FamInst.  This change does affect the GHC API, but
     for the better I think.

   - Previously, each family type/data instance declaration gave rise
     to a *TyCon*; typechecking a type/data instance decl produced
     that TyCon.  Now, each type/data instance gives rise to
     a *FamInst*, by direct analogy with each class instance
     declaration giving rise to a ClsInst.

   - Just as each ClsInst contains its evidence, a DFunId, so each FamInst
     contains its evidence, a CoAxiom.  See Note [FamInsts and CoAxioms]
     in FamInstEnv.  The CoAxiom is a System-FC thing, and can relate any
     two types, whereas the FamInst relates directly to the Haskell source
     language construct, and always has a function (F tys) on the LHS.

   - Just as a DFunId has its own declaration in an interface file, so now
     do CoAxioms (see IfaceSyn.IfaceAxiom).

   These changes give rise to almost all the refactoring.

 * We used to have a hack whereby a type family instance produced a dummy
   type synonym, thus
      type instance F Int = Bool -> Bool
   translated to
      axiom FInt :: F Int ~ R:FInt
      type R:FInt = Bool -> Bool
   This was always a hack, and now it's gone.  Instead the type instance
   declaration produces a FamInst, whose axiom has kind
      axiom FInt :: F Int ~ Bool -> Bool
   just as you'd expect.

 * Newtypes are done just as before; they generate a CoAxiom. These
   CoAxioms are "implicit" (do not generate an IfaceAxiom declaration),
   unlike the ones coming from family instance declarations.  See
   Note [Implicit axioms] in TyCon

On the whole the code gets significantly nicer.  There were consequential
tidy-ups in the vectoriser, but I think I got them right.

7 years agoFix typo in Makefile
Ian Lynagh [Tue, 20 Dec 2011 17:36:25 +0000 (17:36 +0000)] 
Fix typo in Makefile

sdist output was being redirected to $src_log, which presumably
evaluated to rc_log.

7 years agoPrint more informative sizes in -dshow-passes,
Simon Peyton Jones [Thu, 29 Dec 2011 10:31:57 +0000 (10:31 +0000)] 
Print more informative sizes in -dshow-passes,
and add intWithCommas to Outputable for printing
large Int/Integers

7 years agoFix Trac #5721; type variables can be quoted in TH
Simon Peyton Jones [Thu, 29 Dec 2011 10:30:34 +0000 (10:30 +0000)] 
Fix Trac #5721; type variables can be quoted in TH

7 years agoDocumentation wibble: kind -> sort
Simon Peyton Jones [Wed, 28 Dec 2011 15:10:35 +0000 (15:10 +0000)] 
Documentation wibble: kind -> sort

7 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Simon Peyton Jones [Fri, 23 Dec 2011 17:57:13 +0000 (17:57 +0000)] 
Merge branch 'master' of darcs.haskell.org/ghc

7 years agoMake RnEnv.lookupBindGroupOcc work on Orig RdrNames
Simon Peyton Jones [Fri, 23 Dec 2011 17:27:24 +0000 (17:27 +0000)] 
Make RnEnv.lookupBindGroupOcc work on Orig RdrNames

Such names can come from Template Haskell; see Trac #5700
Easily fixed, happily.

I also renamed lookupSubBndr to lookupSubBndrOcc, which is
more descriptive.

7 years agoAdd an ASSERT on 'pick'
Simon Peyton Jones [Fri, 23 Dec 2011 17:25:36 +0000 (17:25 +0000)] 
Add an ASSERT on 'pick'

7 years agoImplemnt Trac #5712: show method for infix GADT constructors
Simon Peyton Jones [Fri, 23 Dec 2011 16:16:56 +0000 (16:16 +0000)] 
Implemnt Trac #5712: show method for infix GADT constructors

This is a tiny feature improvement; see the ticket.
I have updated the user manual too.

7 years agoUse HsTupleTy [] for unit tuples, uniformly
Simon Peyton Jones [Fri, 23 Dec 2011 16:05:48 +0000 (16:05 +0000)] 
Use HsTupleTy [] for unit tuples, uniformly

This is just a tidy-up triggered by #5719.  We were parsing () as a
type constructor, rather than as a HsTupleTy, but it's better dealt
with uniformly as the former, I think.  Somewhat a matter of taste.

7 years agoFix an outright bug in the implementation of default decls
Simon Peyton Jones [Fri, 23 Dec 2011 16:03:26 +0000 (16:03 +0000)] 
Fix an outright bug in the implementation of default decls
for associated types (fixes Trac #5719)

The bug was that we ended up quantifying the new AT instance
over the wrong set of type variables, and that led to confusing
chaos.

7 years agoFix the behaviour of the unit unboxed tuple (# #)
Simon Peyton Jones [Fri, 23 Dec 2011 16:01:51 +0000 (16:01 +0000)] 
Fix the behaviour of the unit unboxed tuple (# #)

See Trac #5720: make the unit unboxed tuple (# #) behave uniformly
with the unit boxed tuple ()

This is actually a change in behaviour, but in a very dark corner,
so I don't think this is going to hurt anyone, and the current
behaviour is deeply strange.

7 years agoImprove ASSERT error message
Simon Peyton Jones [Fri, 23 Dec 2011 15:52:32 +0000 (15:52 +0000)] 
Improve ASSERT error message

7 years agoFix :issafe safe haskell ghci command
David Terei [Wed, 21 Dec 2011 23:23:36 +0000 (15:23 -0800)] 
Fix :issafe safe haskell ghci command

7 years agoFix safe imports to work in GHCi.
David Terei [Wed, 21 Dec 2011 22:58:39 +0000 (14:58 -0800)] 
Fix safe imports to work in GHCi.

7 years agosimplify code.
David Terei [Wed, 21 Dec 2011 22:57:53 +0000 (14:57 -0800)] 
simplify code.

7 years agoDoc wibble
David Terei [Wed, 21 Dec 2011 00:09:10 +0000 (16:09 -0800)] 
Doc wibble

7 years agoMove function from where clause to top level
David Terei [Tue, 20 Dec 2011 23:15:21 +0000 (15:15 -0800)] 
Move function from where clause to top level

7 years agoMerge branch 'master' of http://darcs.haskell.org//ghc
Dimitrios Vytiniotis [Thu, 22 Dec 2011 12:09:27 +0000 (12:09 +0000)] 
Merge branch 'master' of darcs.haskell.org//ghc

7 years agoNow the constraint simplifier solves kind constraints as well.
Dimitrios Vytiniotis [Thu, 22 Dec 2011 11:46:53 +0000 (11:46 +0000)] 
Now the constraint simplifier solves kind constraints as well.

7 years agoIntroduced new form of TcEvidence for KindCasts, this patch also fixes a
Dimitrios Vytiniotis [Thu, 22 Dec 2011 11:41:08 +0000 (11:41 +0000)] 
Introduced new form of TcEvidence for KindCasts, this patch also fixes a
bug in zonking: we must zonk the kinds of existential variables even if
the variables themselves will not be affected.

7 years agoVery small tweaks to pave the way for solving kind constraints in the simplifier.
Dimitrios Vytiniotis [Thu, 22 Dec 2011 11:36:09 +0000 (11:36 +0000)] 
Very small tweaks to pave the way for solving kind constraints in the simplifier.

7 years agoImprove sync-all usage doc
David Terei [Wed, 21 Dec 2011 20:18:19 +0000 (12:18 -0800)] 
Improve sync-all usage doc

7 years agoIgnore -fpackage-trust if no other Safe Haskell flags
David Terei [Tue, 20 Dec 2011 02:37:47 +0000 (18:37 -0800)] 
Ignore -fpackage-trust if no other Safe Haskell flags

7 years agoTabs -> Spaces
David Terei [Fri, 16 Dec 2011 21:47:37 +0000 (13:47 -0800)] 
Tabs -> Spaces

7 years agoRefactor Safe Haskell check to provide hscCheckSafe GHC API
David Terei [Fri, 16 Dec 2011 21:45:53 +0000 (13:45 -0800)] 
Refactor Safe Haskell check to provide hscCheckSafe GHC API

7 years agoTabs -> Spaces
David Terei [Wed, 14 Dec 2011 00:39:03 +0000 (16:39 -0800)] 
Tabs -> Spaces

7 years agoTabs -> Spaces
David Terei [Wed, 14 Dec 2011 00:37:30 +0000 (16:37 -0800)] 
Tabs -> Spaces

7 years agoFix warnings
David Terei [Wed, 14 Dec 2011 00:37:03 +0000 (16:37 -0800)] 
Fix warnings

7 years agoTabs -> Spaces
David Terei [Tue, 13 Dec 2011 23:39:00 +0000 (15:39 -0800)] 
Tabs -> Spaces

7 years agoTabs -> Spaces
David Terei [Tue, 13 Dec 2011 23:38:27 +0000 (15:38 -0800)] 
Tabs -> Spaces

7 years agofix #5022: polymorphic definitions inside arrow rec
Ross Paterson [Mon, 19 Dec 2011 23:44:33 +0000 (23:44 +0000)] 
fix #5022: polymorphic definitions inside arrow rec

This is quite tricky, with examples like this:

import Control.Arrow

pRepeat :: a -> [a]
pRepeat =
    proc x -> do
      rec
        s <- returnA -< f_rec x:s       -- f_rec is monomorphic here
        let f_later y = y               -- f_later is polymorphic here
        _ <- returnA -< (f_later True, f_later 'a')
        let f_rec y = y                 -- f_rec is polymorphic here
      returnA -< f_later s              -- f_later is monomorphic here

Fixed the typechecking of arrow RecStmt to track changes to the monad
version.  It was simplest to add a field recS_later_rets corresponding
to recS_rec_rets.  It's only used for the arrow version, and always
empty for the monad version.  But I think it would be cleaner to put
the rec_ids and later_ids in a single list with supplementary info
saying how they're used.

Also fixed several glitches in the desugaring of arrow RecStmt.  The fact
that the monomorphic variables shadow their polymorphic counterparts is a
major pain.  Also a bit of general cleanup of DsArrows while I was there.

7 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Ian Lynagh [Mon, 19 Dec 2011 17:42:09 +0000 (17:42 +0000)] 
Merge branch 'master' of darcs.haskell.org/ghc

7 years agoMerge branch 'master' of http://darcs.haskell.org//ghc
Simon Peyton Jones [Mon, 19 Dec 2011 16:45:53 +0000 (16:45 +0000)] 
Merge branch 'master' of darcs.haskell.org//ghc

7 years agoTidy up pretty-printing for variables
Simon Peyton Jones [Mon, 19 Dec 2011 16:45:13 +0000 (16:45 +0000)] 
Tidy up pretty-printing for variables

We already have a class OutputableBndr; this patch adds
methods pprInfixOcc and pprPrefixOcc, so that we can get
rid of the hideous hack (the old) Outputable.pprHsVar.

The hack was exposed by Trac #5657, which is thereby fixed.

7 years agoMake getDynFlags* functions use HasDynFlags/getDynFlags too
Ian Lynagh [Mon, 19 Dec 2011 15:56:25 +0000 (15:56 +0000)] 
Make getDynFlags* functions use HasDynFlags/getDynFlags too

7 years agoAdd a class HasDynFlags(getDynFlags)
Ian Lynagh [Mon, 19 Dec 2011 15:50:47 +0000 (15:50 +0000)] 
Add a class HasDynFlags(getDynFlags)

We no longer have many separate, clashing getDynFlags functions

I've given each GhcMonad its own HasDynFlags instance, rather than
using UndecidableInstances to make a GhcMonad m => HasDynFlags m
instance.

7 years agoRemove an old hack for bad FilePath behaviour
Ian Lynagh [Sun, 18 Dec 2011 23:00:14 +0000 (23:00 +0000)] 
Remove an old hack for bad FilePath behaviour

We now require GHC >= 7.0, which has the behaviour we want.

7 years agoFix typo
Ian Lynagh [Sun, 18 Dec 2011 20:55:36 +0000 (20:55 +0000)] 
Fix typo

7 years agoHide STG register declarations for LLVM C compilers
David M Peixotto [Wed, 7 Dec 2011 14:20:47 +0000 (08:20 -0600)] 
Hide STG register declarations for LLVM C compilers

This commit swaps the import order of Rts.h and Stg.h in
StgCRun.c for non-SPARC architectures. Swapping the import
order prevents the declaration of the global registers thus
allowing the GHC runtime to be compiled by LLVM-based C
compilers.

LLVM-base C compilers cannot use the global register
declarations (for R1, R2, etc.) because they use
GCC-specific extensions. The declarations are not needed in
StgCRun.c except for the SPARC architecture. The other
architectures use hand-written assembly that accesses the
appropriate register directly.

7 years agoFix alignment in the CostCentre struct (#5710)
Simon Marlow [Mon, 19 Dec 2011 11:53:42 +0000 (11:53 +0000)] 
Fix alignment in the CostCentre struct (#5710)

7 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Ian Lynagh [Sun, 18 Dec 2011 14:15:29 +0000 (14:15 +0000)] 
Merge branch 'master' of darcs.haskell.org/ghc

7 years agoFix scalar vectorisation of superclasses and recursive dfuns
Manuel M T Chakravarty [Sun, 18 Dec 2011 06:12:54 +0000 (17:12 +1100)] 
Fix scalar vectorisation of superclasses and recursive dfuns

7 years agoFix a bug in TcCanonical (Dimitrios spotted)
Jose Pedro Magalhaes [Fri, 16 Dec 2011 14:56:39 +0000 (14:56 +0000)] 
Fix a bug in TcCanonical (Dimitrios spotted)

7 years agoBetter failure with promoted kinds in TH
Jose Pedro Magalhaes [Fri, 16 Dec 2011 12:46:16 +0000 (12:46 +0000)] 
Better failure with promoted kinds in TH

Makes #5612 fail in a more civilized way, at least.

7 years agoRemove some dead code
Ian Lynagh [Tue, 13 Dec 2011 22:27:04 +0000 (22:27 +0000)] 
Remove some dead code

7 years agoMerge branch 'master' of http://darcs.haskell.org//ghc
Dimitrios Vytiniotis [Thu, 15 Dec 2011 16:56:53 +0000 (16:56 +0000)] 
Merge branch 'master' of darcs.haskell.org//ghc

7 years agoFix a path, and strip out C++ comments too
Simon Marlow [Wed, 14 Dec 2011 13:56:22 +0000 (13:56 +0000)] 
Fix a path, and strip out C++ comments too

7 years agoSupport for reducing the number of Capabilities with setNumCapabilities
Simon Marlow [Tue, 13 Dec 2011 13:09:46 +0000 (13:09 +0000)] 
Support for reducing the number of Capabilities with setNumCapabilities

This patch allows setNumCapabilities to /reduce/ the number of active
capabilities as well as increase it.  This is particularly tricky to
do, because a Capability is a large data structure and ties into the
rest of the system in many ways.  Trying to clean it all up would be
extremely error prone.

So instead, the solution is to mark the extra capabilities as
"disabled".  This has the following consequences:

  - threads on a disabled capability are migrated away by the
    scheduler loop

  - disabled capabilities do not participate in GC
    (see scheduleDoGC())

  - No spark threads are created on this capability
    (see scheduleActivateSpark())

  - We do not attempt to migrate threads *to* a disabled
    capability (see schedulePushWork()).

So a disabled capability should do no work, and does not participate
in GC, although it remains alive in other respects.  For example, a
blocked thread might wake up on a disabled capability, and it will get
quickly migrated to a live capability.  A disabled capability can
still initiate GC if necessary.  Indeed, it turns out to be hard to
migrate bound threads, so we wait until the next GC to do this (see
comments for details).

7 years agoExposing a useful assertion which was hidden inside a lazyness cloud.
Dimitrios Vytiniotis [Thu, 15 Dec 2011 14:18:31 +0000 (14:18 +0000)] 
Exposing a useful assertion which was hidden inside a lazyness cloud.

7 years agoFix a memory allocation bug (rts_argv wasn't big enough)
Simon Marlow [Wed, 14 Dec 2011 10:42:47 +0000 (10:42 +0000)] 
Fix a memory allocation bug (rts_argv wasn't big enough)

7 years agoExport CoreModule(..) (#5698)
Simon Marlow [Wed, 14 Dec 2011 09:34:49 +0000 (09:34 +0000)] 
Export CoreModule(..) (#5698)

7 years agoBe more careful when deciding which functions are scalar
Manuel M T Chakravarty [Wed, 14 Dec 2011 04:37:56 +0000 (15:37 +1100)] 
Be more careful when deciding which functions are scalar

Although scalar functions can use any scalar data type, their arguments and functions may only involve primitive types at the moment.

7 years agoFix -ddump-tc-trace for recursively defined type constructors
Manuel M T Chakravarty [Wed, 14 Dec 2011 02:25:37 +0000 (13:25 +1100)] 
Fix -ddump-tc-trace for recursively defined type constructors

7 years agoRevert "vectoriser: workaround bug in classiftTyCons"
Manuel M T Chakravarty [Tue, 13 Dec 2011 23:52:03 +0000 (10:52 +1100)] 
Revert "vectoriser: workaround bug in classiftTyCons"

This reverts commit acbb3dba4490d53762b5aecfb9a45049dea15c79.

7 years agoFix users_guide markup
Ian Lynagh [Tue, 13 Dec 2011 20:59:37 +0000 (20:59 +0000)] 
Fix users_guide markup

7 years agoHEAD now requires GHC >= 7.0 to bootstrap
Ian Lynagh [Tue, 13 Dec 2011 19:54:08 +0000 (19:54 +0000)] 
HEAD now requires GHC >= 7.0 to bootstrap

7 years ago$(rts_H_FILES) should contain .h files in subdirectories of rts/ too
Simon Marlow [Tue, 13 Dec 2011 13:04:09 +0000 (13:04 +0000)] 
$(rts_H_FILES) should contain .h files in subdirectories of rts/ too