ghc.git
7 years agoMerge branch 'tc-untouchables', remote branch 'origin' into tc-untouchables
Simon Peyton Jones [Sat, 1 Sep 2012 19:51:51 +0000 (20:51 +0100)] 
Merge branch 'tc-untouchables', remote branch 'origin' into tc-untouchables

7 years agoA bunch more simplification and refactoring to the constraint solver
Simon Peyton Jones [Sat, 1 Sep 2012 10:25:47 +0000 (11:25 +0100)] 
A bunch more simplification and refactoring to the constraint solver

* Instead of Untouchables being a [Unique], it is simply an Int
  indicating the depth of nesting.  This works fine now that
  floatEqualities is promoting the floated unification variables
  to the outer level

* Remove the inert_tv_eqs (InScopeSet) from InertCans.  It wasn't
  being used.  See Note [Shadowing in a constraint] in TcRnTypes

* Rename inert_frozen to inert_insols

* Some simple refactoring in
     TcErrors.reportFlatsAndInsols
     TcInteract.kickOutRewritable
     TsSimplify.floatEqualities

7 years agoMore simplifications to the constraint solver
Simon Peyton Jones [Fri, 31 Aug 2012 09:05:03 +0000 (10:05 +0100)] 
More simplifications to the constraint solver

* inert_solved becomes dictionaries-only, inert_solved_dicts

* inert_solved_dicts is used only to cache the result of uses
  of a top level instance declaration, just like inert_solved_funeqs

* That in turn simplifies xCtFlavor and rewriteCtFlavor, because
  they no longer need a "should I cache" parameter.  (Moreover the
  settings for this parameter were very subtle; it's easy to get
  loops if you cache too much.  Caching only top-level instance
  uses is much safer, and eliminates all these subtle cases.)

7 years agoA raft more changes,
Simon Peyton Jones [Thu, 30 Aug 2012 13:38:10 +0000 (14:38 +0100)] 
A raft more changes,
 * simplifying and tidying up canonicalisation,
 * removing the flat cache altogether
 * making the FunEq worklist into a deque

7 years agomake sure to remove the right link before calling 'ln -s' (could we use 'ln -sf'?)
Gabor Greif [Thu, 30 Aug 2012 13:02:56 +0000 (15:02 +0200)] 
make sure to remove the right link before calling 'ln -s' (could we use 'ln -sf'?)

7 years agoMerge remote-tracking branch 'origin/HEAD' into tc-untouchables
Simon Peyton Jones [Wed, 29 Aug 2012 14:35:27 +0000 (15:35 +0100)] 
Merge remote-tracking branch 'origin/HEAD' into tc-untouchables

7 years agoMinor fixes, mostly simplificaitons
Simon Peyton Jones [Wed, 29 Aug 2012 14:34:59 +0000 (15:34 +0100)] 
Minor fixes, mostly simplificaitons

7 years agov7.4.1 is required for building, so we can drop the v7.2.1 workaround
Gabor Greif [Wed, 29 Aug 2012 12:47:02 +0000 (14:47 +0200)] 
v7.4.1 is required for building, so we can drop the v7.2.1 workaround

7 years agoFail earlier if there's an error in a type declaration
Simon Peyton Jones [Wed, 29 Aug 2012 10:33:33 +0000 (11:33 +0100)] 
Fail earlier if there's an error in a type declaration

This change means that we don't recover from erroneous type
declarations, thereby reporting fewer errors.  But trying to
recover confused GHC (leading to a pattern match failure in
the compiler Trac #7175), and it turned out to be tricky
to fix that.

So this patch takes the more conservative path of failing
earlier, perhaps reporting fewer real errors.

7 years agoMerge branch 'tc-untouchables' of http://darcs.haskell.org/ghc into tc-untouchables
Dimitrios.Vytiniotis [Wed, 29 Aug 2012 10:29:35 +0000 (11:29 +0100)] 
Merge branch 'tc-untouchables' of darcs.haskell.org/ghc into tc-untouchables

7 years agoAvoid emitting Given constraints for spontaneous unifications. Instead
Dimitrios.Vytiniotis [Wed, 29 Aug 2012 10:29:06 +0000 (11:29 +0100)] 
Avoid emitting Given constraints for spontaneous unifications. Instead
keep spontaneous unifications /only/ in the TcS tybinds. Relevant note
is Note [Spontaneously solved in TyBinds] in TcInteract.

7 years agoFix Trac #7196 by adding a case to the desugarer
Simon Peyton Jones [Wed, 29 Aug 2012 09:57:48 +0000 (10:57 +0100)] 
Fix Trac #7196 by adding a case to the desugarer

Pls merge to 7.6

7 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Simon Peyton Jones [Wed, 29 Aug 2012 06:35:23 +0000 (07:35 +0100)] 
Merge branch 'master' of darcs.haskell.org/ghc

7 years agoRemove CPP from coreSyn/CoreUtils.lhs
Ian Lynagh [Tue, 28 Aug 2012 23:10:44 +0000 (00:10 +0100)] 
Remove CPP from coreSyn/CoreUtils.lhs

7 years agoAdd DynFlags to the CorePrepEnv
Ian Lynagh [Tue, 28 Aug 2012 23:01:57 +0000 (00:01 +0100)] 
Add DynFlags to the CorePrepEnv

7 years agoRemove CPP from cmm/CmmParse.y
Ian Lynagh [Tue, 28 Aug 2012 22:40:16 +0000 (23:40 +0100)] 
Remove CPP from cmm/CmmParse.y

7 years agoWhitespace only in cmm/CmmParse.y
Ian Lynagh [Tue, 28 Aug 2012 22:33:50 +0000 (23:33 +0100)] 
Whitespace only in cmm/CmmParse.y

7 years agoRemove some CPP from nativeGen/X86/Instr.hs
Ian Lynagh [Tue, 28 Aug 2012 22:26:40 +0000 (23:26 +0100)] 
Remove some CPP from nativeGen/X86/Instr.hs

7 years agoRemove some CPP from compiler/ghci/Linker.lhs
Ian Lynagh [Tue, 28 Aug 2012 22:22:28 +0000 (23:22 +0100)] 
Remove some CPP from compiler/ghci/Linker.lhs

7 years agoRemove Util.{isDarwinTarget,isWindowsTarget}
Ian Lynagh [Tue, 28 Aug 2012 21:46:31 +0000 (22:46 +0100)] 
Remove Util.{isDarwinTarget,isWindowsTarget}

7 years agoRemove some CPP from llvmGen/LlvmCodeGen/Ppr.hs
Ian Lynagh [Tue, 28 Aug 2012 20:27:02 +0000 (21:27 +0100)] 
Remove some CPP from llvmGen/LlvmCodeGen/Ppr.hs

I changed the behaviour slightly, e.g. i386/FreeBSD will no longer
fall through and use the Linux "i386-pc-linux-gnu", but will get the
final empty case instead. I assume that that's the right thing to do.

7 years agoRemove some CPP from nativeGen/PPC/Regs.h
Ian Lynagh [Tue, 28 Aug 2012 20:07:15 +0000 (21:07 +0100)] 
Remove some CPP from nativeGen/PPC/Regs.h

7 years agoRemove some old commented-out code
Ian Lynagh [Tue, 28 Aug 2012 19:57:11 +0000 (20:57 +0100)] 
Remove some old commented-out code

7 years agoMove more code into codeGen/CodeGen/Platform.hs
Ian Lynagh [Tue, 28 Aug 2012 19:52:44 +0000 (20:52 +0100)] 
Move more code into codeGen/CodeGen/Platform.hs

HaskellMachRegs.h is no longer included in anything under compiler/

Also, includes/CodeGen.Platform.hs now includes "stg/MachRegs.h"
rather than <stg/MachRegs.h> which means that we always get the file
from the tree, rather than from the bootstrapping compiler.

7 years agoWhen floating constraints outwards, promote the floated type variables
Simon Peyton Jones [Tue, 28 Aug 2012 17:02:06 +0000 (18:02 +0100)] 
When floating constraints outwards, promote the floated type variables

The work is done by the (remarkably simple) TcSimplify.promoteFloatedUnificationVars

7 years agoBig changes on tc-untouchables branch
Simon Peyton Jones [Tue, 28 Aug 2012 13:38:36 +0000 (14:38 +0100)] 
Big changes on tc-untouchables branch

(Before merging to HEAD we need to tidy up and write a proper commit message.)

7 years agoMerge branch 'master' of darcs.haskell.org:/home/darcs/ghc
Simon Peyton Jones [Tue, 28 Aug 2012 12:37:13 +0000 (13:37 +0100)] 
Merge branch 'master' of darcs.haskell.org:/home/darcs/ghc

7 years agoFix pretty-printing for GADTs in infix form
Simon Peyton Jones [Tue, 28 Aug 2012 12:36:17 +0000 (13:36 +0100)] 
Fix pretty-printing for GADTs in infix form

7 years agoComments in CoreSyn only
Simon Peyton Jones [Tue, 28 Aug 2012 12:33:47 +0000 (13:33 +0100)] 
Comments in CoreSyn only

7 years agoFix Trac #7092, involving Template Hsakell and name shadowing
Simon Peyton Jones [Tue, 28 Aug 2012 12:32:55 +0000 (13:32 +0100)] 
Fix Trac #7092, involving Template Hsakell and name shadowing

All the mechanism was there, but it wasn't being use for the
name-shadowing test.

7 years agogeneralise the type of eqStableName#
Simon Marlow [Fri, 24 Aug 2012 10:51:09 +0000 (11:51 +0100)] 
generalise the type of eqStableName#

Now the StableName#s don't need to have the same type parameters:

eqStableName# :: StableName# a -> StableName# b -> Int#

7 years agoFix -fPIC with the new code generator
Simon Marlow [Fri, 24 Aug 2012 10:42:21 +0000 (11:42 +0100)] 
Fix -fPIC with the new code generator

The CmmBlocks inside CmmExprs were not getting the PIC treatment

7 years agoFix callerSaves, activeStgRegs, haveRegBase when unregisterised
Simon Marlow [Fri, 24 Aug 2012 09:02:35 +0000 (10:02 +0100)] 
Fix callerSaves, activeStgRegs, haveRegBase when unregisterised

7 years agoFix return type of FUN_INFO_PTR_TO_STRUCT.
Erik de Castro Lopo [Mon, 27 Aug 2012 18:47:30 +0000 (04:47 +1000)] 
Fix return type of FUN_INFO_PTR_TO_STRUCT.

Return type was correct when TABLES_NEXT_TO_CODE was defined.

7 years agoUpdate documentation for -fwarn-dodgy-imports.
Paolo Capriotti [Sat, 25 Aug 2012 19:33:36 +0000 (20:33 +0100)] 
Update documentation for -fwarn-dodgy-imports.

7 years agoMake badImportItem into a warning (#7167)
Paolo Capriotti [Thu, 23 Aug 2012 11:54:45 +0000 (12:54 +0100)] 
Make badImportItem into a warning (#7167)

Also fix a bug where a dodgy import warning was emitted for data
families with a single constructor.

7 years agoMore CPP macros -> inline functions
Ian Lynagh [Sat, 25 Aug 2012 14:42:20 +0000 (15:42 +0100)] 
More CPP macros -> inline functions

All the wibble seem to have cancelled out, and (non-debug) object sizes
are back to where they started.

I'm not 100% sure that the types are optimal, but at least now the
functions have types and we can fix them if necessary.

7 years agoMore CPP macros -> inline functions
Ian Lynagh [Sat, 25 Aug 2012 12:32:50 +0000 (13:32 +0100)] 
More CPP macros -> inline functions

7 years agoMore CPP macro -> inline function
Ian Lynagh [Sat, 25 Aug 2012 12:03:31 +0000 (13:03 +0100)] 
More CPP macro -> inline function

7 years agoConvert a couple more macros to inline functions
Ian Lynagh [Sat, 25 Aug 2012 11:49:47 +0000 (12:49 +0100)] 
Convert a couple more macros to inline functions

This caused a couple of .o files to change size. I had a look at one,
and it seems to be caused by the difference in size of these two
instructions:
    49 8b 5d 08            mov    0x8(%r13),%rbx
    49 8b 5c 24 08         mov    0x8(%r12),%rbx
(with a few nops being added or removed later in the file, presumably
for alignment reasons).

7 years agoMake a function for get_itbl, rather than using a CPP macro
Ian Lynagh [Sat, 25 Aug 2012 10:31:50 +0000 (11:31 +0100)] 
Make a function for get_itbl, rather than using a CPP macro

This has several advantages:
* It can be called from gdb
* There is more type information for the user, and type checking
  for the compiler
* Less opportunity for things to go wrong, e.g. due to missing
  parentheses or repeated execution

The sizes of the non-debug .o files hasn't changed (other than
Inlines.o), so I'm pretty sure the compiled code is identical.

7 years agoFix build with FreeBSD versions earlier than 9.0
Gabor Pali [Thu, 9 Aug 2012 22:45:42 +0000 (00:45 +0200)] 
Fix build with FreeBSD versions earlier than 9.0

7 years agoMerge branch 'master' of darcs.haskell.org:/srv/darcs//ghc
Ian Lynagh [Thu, 23 Aug 2012 16:05:13 +0000 (17:05 +0100)] 
Merge branch 'master' of darcs.haskell.org:/srv/darcs//ghc

7 years agoMerge branch 'master' of http://darcs.haskell.org/ghc
Simon Peyton Jones [Thu, 23 Aug 2012 15:36:08 +0000 (16:36 +0100)] 
Merge branch 'master' of darcs.haskell.org/ghc

7 years agoDon't specialise on implicit-parameter arguments in Specalise
Simon Peyton Jones [Thu, 23 Aug 2012 15:35:55 +0000 (16:35 +0100)] 
Don't specialise on implicit-parameter arguments in Specalise

This is a fix for Trac #7101

7 years agoTwo small fixes to SpecConstr for functions with equality-proof args
Simon Peyton Jones [Thu, 23 Aug 2012 15:35:11 +0000 (16:35 +0100)] 
Two small fixes to SpecConstr for functions with equality-proof args

First, make Rules.match_co able to deal wit some modest coercions
Second, make SpecConstr use wild-card for coercion arguments

This is the rest of the fix for Trac #7165

7 years agoFix to-iface conversion of RULES involving coercions in argument pattterns
Simon Peyton Jones [Thu, 23 Aug 2012 15:33:36 +0000 (16:33 +0100)] 
Fix to-iface conversion of RULES involving coercions in argument pattterns

This is part of the fix to Trac #7165

7 years agoFollow changes in Cabal
Ian Lynagh [Thu, 23 Aug 2012 14:20:33 +0000 (15:20 +0100)] 
Follow changes in Cabal

7 years agoMerge ../HEAD
Simon Peyton Jones [Thu, 23 Aug 2012 14:30:38 +0000 (15:30 +0100)] 
Merge ../HEAD

7 years agoFix for optimizer bug on linux-powerpc (#6156).
Erik de Castro Lopo [Thu, 23 Aug 2012 10:39:47 +0000 (20:39 +1000)] 
Fix for optimizer bug on linux-powerpc (#6156).

7 years agoDon't assume that coercion variables have (~) types
Simon Peyton Jones [Thu, 23 Aug 2012 10:04:22 +0000 (11:04 +0100)] 
Don't assume that coercion variables have (~) types

The constraint solver doesn't zonk the types of coercion variables
so we can't assume that a coercion variable will have a (~) type.

Fixes Trac #7090.

7 years agoEmit a warning for -rtsopts -shared, as well as -rtsopts -no-hs-main
Simon Marlow [Thu, 23 Aug 2012 08:49:12 +0000 (09:49 +0100)] 
Emit a warning for -rtsopts -shared, as well as -rtsopts -no-hs-main

-rtsopts has no effect with -shared, so we should emit a warning.  See
 #5373 and #7177.

7 years agoMinor refactoring
Simon Peyton Jones [Thu, 23 Aug 2012 09:17:19 +0000 (10:17 +0100)] 
Minor refactoring

7 years agoFix :issafe command (#7172).
David Terei [Thu, 23 Aug 2012 08:59:05 +0000 (01:59 -0700)] 
Fix :issafe command (#7172).

7 years agoImprove Safe Haskell warn/error output.
David Terei [Thu, 23 Aug 2012 07:29:02 +0000 (00:29 -0700)] 
Improve Safe Haskell warn/error output.

7 years agoAdd mapTM to TrieMap
Simon Peyton Jones [Wed, 22 Aug 2012 15:15:17 +0000 (16:15 +0100)] 
Add mapTM to TrieMap

7 years agoTab elimination
Simon Peyton Jones [Wed, 22 Aug 2012 15:15:04 +0000 (16:15 +0100)] 
Tab elimination

7 years agoA bit more debug output
Simon Peyton Jones [Wed, 22 Aug 2012 15:14:30 +0000 (16:14 +0100)] 
A bit more debug output

7 years agoFix missing case in coVarsOfTcCo
Simon Peyton Jones [Wed, 22 Aug 2012 15:13:56 +0000 (16:13 +0100)] 
Fix missing case in coVarsOfTcCo

Reported by Ganesh, Trac #7178.  Fix is easy.

7 years agoMore CPP removal in nativeGen/X86/Regs.hs
Ian Lynagh [Tue, 21 Aug 2012 23:51:09 +0000 (00:51 +0100)] 
More CPP removal in nativeGen/X86/Regs.hs

7 years agoMore CPP removal in nativeGen/X86/Regs.hs
Ian Lynagh [Tue, 21 Aug 2012 23:43:41 +0000 (00:43 +0100)] 
More CPP removal in nativeGen/X86/Regs.hs

7 years agoRemove some CPP in nativeGen/X86/Regs.hs
Ian Lynagh [Tue, 21 Aug 2012 23:40:58 +0000 (00:40 +0100)] 
Remove some CPP in nativeGen/X86/Regs.hs

7 years agoMake the PPC globalRegMaybe more similar to the other platforms'
Ian Lynagh [Tue, 21 Aug 2012 20:50:59 +0000 (21:50 +0100)] 
Make the PPC globalRegMaybe more similar to the other platforms'

7 years agoWhitespace only in compiler/nativeGen/PPC/Regs.hs
Ian Lynagh [Tue, 21 Aug 2012 20:48:40 +0000 (21:48 +0100)] 
Whitespace only in compiler/nativeGen/PPC/Regs.hs

7 years agoWhitespace only in nativeGen/RegAlloc/Linear/X86/FreeRegs.hs
Ian Lynagh [Tue, 21 Aug 2012 18:53:04 +0000 (19:53 +0100)] 
Whitespace only in nativeGen/RegAlloc/Linear/X86/FreeRegs.hs

7 years agoRemove unused 'targetWordSize'
Ian Lynagh [Tue, 21 Aug 2012 18:51:58 +0000 (19:51 +0100)] 
Remove unused 'targetWordSize'

7 years agoPass platform down to lastint
Ian Lynagh [Tue, 21 Aug 2012 18:50:32 +0000 (19:50 +0100)] 
Pass platform down to lastint

7 years agoPass platform down to lastxmm
Ian Lynagh [Tue, 21 Aug 2012 18:39:20 +0000 (19:39 +0100)] 
Pass platform down to lastxmm

7 years agoStgCmmUtils no longer needs to include HaskellMachRegs.h
Ian Lynagh [Tue, 21 Aug 2012 18:08:31 +0000 (19:08 +0100)] 
StgCmmUtils no longer needs to include HaskellMachRegs.h

7 years agoUse haveRegBase in StgCmmUtils too
Ian Lynagh [Tue, 21 Aug 2012 18:04:57 +0000 (19:04 +0100)] 
Use haveRegBase in StgCmmUtils too

7 years agoWhitespace only in StgCmmUtils
Ian Lynagh [Tue, 21 Aug 2012 17:57:56 +0000 (18:57 +0100)] 
Whitespace only in StgCmmUtils

7 years agoCgUtils no longer needs to #include HaskellMachRegs.h
Ian Lynagh [Tue, 21 Aug 2012 17:52:11 +0000 (18:52 +0100)] 
CgUtils no longer needs to #include HaskellMachRegs.h

7 years agoAdd haveRegBase to CodeGen.Platform
Ian Lynagh [Tue, 21 Aug 2012 17:44:31 +0000 (18:44 +0100)] 
Add haveRegBase to CodeGen.Platform

7 years agoMove activeStgRegs into CodeGen.Platform
Ian Lynagh [Tue, 21 Aug 2012 16:44:38 +0000 (17:44 +0100)] 
Move activeStgRegs into CodeGen.Platform

7 years agoMerge branch 'master' of darcs.haskell.org:/srv/darcs//ghc
Ian Lynagh [Tue, 21 Aug 2012 15:45:53 +0000 (16:45 +0100)] 
Merge branch 'master' of darcs.haskell.org:/srv/darcs//ghc

7 years agoFix the generation of CallerSaves; fixes #7163
Ian Lynagh [Tue, 21 Aug 2012 15:41:30 +0000 (16:41 +0100)] 
Fix the generation of CallerSaves; fixes #7163

Simon Marlow spotted that we were #include'ing MachRegs.h several times,
but that doesn't work as (a) it uses ifdeffery to avoid being included
multiple times, and (b) even if we work around that, then the #define's
from previous inclusions are still defined when we #include it again.

So we now put the platform code for each platform in a separate .hs file.

7 years agoOS X: use mmap() instead of malloc for allocating the bss (#7040)
Simon Marlow [Mon, 20 Aug 2012 12:14:47 +0000 (13:14 +0100)] 
OS X: use mmap() instead of malloc for allocating the bss (#7040)

7 years agofix warning
Simon Marlow [Tue, 21 Aug 2012 14:02:34 +0000 (15:02 +0100)] 
fix warning

7 years agoAnnotate code in {-# LINE #-} pragmas as well
Peter Wortmann [Wed, 8 Aug 2012 15:52:15 +0000 (16:52 +0100)] 
Annotate code in {-# LINE #-} pragmas as well

I suppose this was a good idea for HPC, as it assumed that source code
annotations coming from a source file could only talk about the same
source file (by how Mix files are saved).

I don't see a reason why cost-centres or source annotations would want
that kind of behaviour. I introduced a flag for toggling the behaviour
per tickish.

(plus some minor refactoring, as well as making sure that the same check
applies to binary tick boxes, where they had apparently been forgotten.)

7 years agoRefactor the way we infer types for functions in a mutually recursive group
Simon Peyton Jones [Tue, 21 Aug 2012 13:37:20 +0000 (14:37 +0100)] 
Refactor the way we infer types for functions in a mutually recursive group

See Note [Impedence matching] in TcBinds.
Fixes Trac #7173

7 years agoRe-jig the reporting of names bound multiple times
Simon Peyton Jones [Tue, 21 Aug 2012 13:35:12 +0000 (14:35 +0100)] 
Re-jig the reporting of names bound multiple times

Fixes Trac #7164

7 years agoReduce the likelihood of x64/x86-64 changes breaking the build on other arches (...
Erik de Castro Lopo [Tue, 7 Aug 2012 20:44:00 +0000 (06:44 +1000)] 
Reduce the likelihood of x64/x86-64 changes breaking the build on other arches (#7083).

Code that needs to differentiate between i386 and x86-64 should now
be written as if x86-64 is the default and i386 is the special case.
Eg:

    # if i386_TARGET_ARCH
    someFuncion = .....
    # else
    someFuncion = .....
    # endif

7 years agoFix inverted test for platformUnregisterised (should fix the optllvm breakage)
Simon Marlow [Tue, 21 Aug 2012 11:48:34 +0000 (12:48 +0100)] 
Fix inverted test for platformUnregisterised (should fix the optllvm breakage)

7 years agotidy up
Simon Marlow [Tue, 21 Aug 2012 11:26:16 +0000 (12:26 +0100)] 
tidy up

7 years agoImprove compile times by enabling +RTS -H for GHC (only when bootstrapped)
Simon Marlow [Tue, 21 Aug 2012 10:57:55 +0000 (11:57 +0100)] 
Improve compile times by enabling +RTS -H for GHC (only when bootstrapped)

7 years agoReduce fragmentation when using +RTS -H (with or without a size)
Simon Marlow [Tue, 21 Aug 2012 10:39:06 +0000 (11:39 +0100)] 
Reduce fragmentation when using +RTS -H (with or without a size)

7 years agoimprove debug output
Simon Marlow [Tue, 21 Aug 2012 10:37:18 +0000 (11:37 +0100)] 
improve debug output

7 years agoFix a discrepancy between two calculations of which generation to collect
Simon Marlow [Tue, 21 Aug 2012 08:58:35 +0000 (09:58 +0100)] 
Fix a discrepancy between two calculations of which generation to collect

The calculation should be done in one place, of course.

7 years agomove startProfTimer() and stopProfTimer() to the public headers
Simon Marlow [Tue, 21 Aug 2012 08:48:22 +0000 (09:48 +0100)] 
move startProfTimer() and stopProfTimer() to the public headers

7 years agoadd X86_64_GOTTPOFF relocation for errno
Simon Marlow [Mon, 20 Aug 2012 14:13:45 +0000 (15:13 +0100)] 
add X86_64_GOTTPOFF relocation for errno

Submitted by: Markus Pfeiffer <markus.pfeiffer@morphism.de> on cvs-ghc

7 years agoRetain ordering of finalizers during GC (#7160)
Simon Marlow [Mon, 20 Aug 2012 12:52:07 +0000 (13:52 +0100)] 
Retain ordering of finalizers during GC (#7160)

This came up since the addition of C finalizers, since Haskell
finalizers are already stored in an explicit list.  C finalizers on
the other hand get a WEAK object each, so in order to run them in the
right order we have to make sure that list stays in the correct
order.  I hate adding new invariants, but this is the quickest way to
fix the bug for now.  A better way to fix it would be to have a single
WEAK object with a list of finaliers attached to it, and a primop
for adding finalizers to the list.

7 years agoremove tabs
Simon Marlow [Thu, 9 Aug 2012 10:05:28 +0000 (11:05 +0100)] 
remove tabs

7 years agoremove tabs
Simon Marlow [Thu, 9 Aug 2012 10:04:57 +0000 (11:04 +0100)] 
remove tabs

7 years agoremove tabs
Simon Marlow [Thu, 9 Aug 2012 10:04:15 +0000 (11:04 +0100)] 
remove tabs

7 years agoAvoid the quadratic append trap in flattenCmmAGraph
Simon Marlow [Thu, 9 Aug 2012 09:43:59 +0000 (10:43 +0100)] 
Avoid the quadratic append trap in flattenCmmAGraph

Fixes a perf problem in perf/compiler/T783

7 years agoExport startProfTimer and stopProfTimer symbols.
Paolo Capriotti [Mon, 20 Aug 2012 15:25:49 +0000 (16:25 +0100)] 
Export startProfTimer and stopProfTimer symbols.

This fixes unresolved symbols error when dynamically linking base.

7 years agoProfiling: open .prof when -hr<cc> is specified
Takano Akio [Wed, 15 Aug 2012 02:16:40 +0000 (11:16 +0900)] 
Profiling: open .prof when -hr<cc> is specified

The code for retainer profiling is used with e.g. +RTS -hc -hrfoo -RTS,
as well as with +RTS -hr -RTS.

7 years agoWhen pattern matching against a constructor with equalities,
Simon Peyton Jones [Mon, 20 Aug 2012 13:28:00 +0000 (14:28 +0100)] 
When pattern matching against a constructor with equalities,
require either -XGADTs *or* -XTypeFamilies (rather than only the former)

Fixes Trac #7156

7 years agoImprove documentation for rank-1 types (Trac #7137)
Simon Peyton Jones [Mon, 20 Aug 2012 13:26:08 +0000 (14:26 +0100)] 
Improve documentation for rank-1 types (Trac #7137)

7 years agoAllow a vew pattern or bang pattern in a record pattern.
Takano Akio [Thu, 16 Aug 2012 10:13:47 +0000 (11:13 +0100)] 
Allow a vew pattern or bang pattern in a record pattern.

e.g.
        data T = MkT { x,y :: Int }

        f (MkT { x = !v, y = negate -> w }) = v + w