ghc-hetmet.git
13 years agoAdd "darcs-all upstreampull"
Ian Lynagh [Sun, 22 Aug 2010 16:34:19 +0000 (16:34 +0000)]
Add "darcs-all upstreampull"
This pulls from the upstream repos, for those packages which have
upstreams

13 years agoGenerate the bit in the user guide where we say what -fglasgow-exts does
Ian Lynagh [Sun, 22 Aug 2010 15:55:14 +0000 (15:55 +0000)]
Generate the bit in the user guide where we say what -fglasgow-exts does
Stops the docs going out of sync with the code.

13 years agoFactor out the packages file parsing in darcs-all
Ian Lynagh [Sun, 22 Aug 2010 15:48:13 +0000 (15:48 +0000)]
Factor out the packages file parsing in darcs-all

13 years agoDocument --supported-extensions
Ian Lynagh [Sun, 22 Aug 2010 13:45:30 +0000 (13:45 +0000)]
Document --supported-extensions

13 years agofix extraction of command stack of arguments of arrow "forms" (fixes #4236)
Ross Paterson [Sun, 22 Aug 2010 09:00:22 +0000 (09:00 +0000)]
fix extraction of command stack of arguments of arrow "forms" (fixes #4236)

The command stack was being extracted (by unscramble) with the outermost
type first, contrary to the comment on the function.

13 years agominor fix to comment
Ross Paterson [Sun, 22 Aug 2010 08:58:38 +0000 (08:58 +0000)]
minor fix to comment

13 years agoAdd the RTS library path to the library search path
Ian Lynagh [Fri, 20 Aug 2010 15:55:23 +0000 (15:55 +0000)]
Add the RTS library path to the library search path
In case the RTS is being explicitly linked in. For #3807.

13 years agoRemove some duplication of C flags
Ian Lynagh [Thu, 19 Aug 2010 23:37:43 +0000 (23:37 +0000)]
Remove some duplication of C flags
We now use the CONF_CC_OPTS_STAGEn C flags in machdepCCOpts, rather than
repeating them there.

13 years agoSet -fno-stack-protector in CONF_CC_OPTS_STAGE* rathre than extra-gcc-opts
Ian Lynagh [Thu, 19 Aug 2010 23:30:31 +0000 (23:30 +0000)]
Set -fno-stack-protector in CONF_CC_OPTS_STAGE* rathre than extra-gcc-opts
The latter is only used when compiling .hc files, whereas we need it for
.c files too.

13 years agoGive clearer errors for bad input in the packages file; suggested by pejo
Ian Lynagh [Thu, 19 Aug 2010 23:24:20 +0000 (23:24 +0000)]
Give clearer errors for bad input in the packages file; suggested by pejo

13 years agoSet -march=i686 on OS X x86 in the configure variables
Ian Lynagh [Thu, 19 Aug 2010 23:09:39 +0000 (23:09 +0000)]
Set -march=i686 on OS X x86 in the configure variables
We used to set it only in machdepCCOpts, so this is more consistent

13 years agoGive each stage its own Config.hs
Ian Lynagh [Thu, 19 Aug 2010 22:47:09 +0000 (22:47 +0000)]
Give each stage its own Config.hs
This also means the file is generated in a dist directory, not a
source directory.

13 years agoFix cleaning when GhcProfiled = YES
Ian Lynagh [Thu, 19 Aug 2010 13:13:46 +0000 (13:13 +0000)]
Fix cleaning when GhcProfiled = YES
We need to include the DPH cleaning rules, even though we don't build DPH
when GhcProfiled = YES.

13 years agostgReallocBytes(DEBUG): don't fail when the ptr passed in is NULL
Simon Marlow [Tue, 17 Aug 2010 15:08:36 +0000 (15:08 +0000)]
stgReallocBytes(DEBUG): don't fail when the ptr passed in is NULL

13 years agoUse make-command in rules/bindist.mk
Ian Lynagh [Wed, 18 Aug 2010 19:12:43 +0000 (19:12 +0000)]
Use make-command in rules/bindist.mk
Rather than it having its own specialised version

13 years agoUse make-command when installing packages
Ian Lynagh [Wed, 18 Aug 2010 19:06:00 +0000 (19:06 +0000)]
Use make-command when installing packages

13 years agoAdd _DATA_FILES to package-data.mk files
Ian Lynagh [Wed, 18 Aug 2010 18:58:01 +0000 (18:58 +0000)]
Add _DATA_FILES to package-data.mk files

13 years agoAdd a "make-command" utility Makefile function
Ian Lynagh [Wed, 18 Aug 2010 18:30:55 +0000 (18:30 +0000)]
Add a "make-command" utility Makefile function

13 years agoLLVM: Nicer format for lack of shared lib warning
David Terei [Tue, 17 Aug 2010 14:52:07 +0000 (14:52 +0000)]
LLVM: Nicer format for lack of shared lib warning

13 years agofix FP_CHECK_ALIGNMENT for autoconf 2.66 (fixes #4252)
Ross Paterson [Mon, 16 Aug 2010 14:24:42 +0000 (14:24 +0000)]
fix FP_CHECK_ALIGNMENT for autoconf 2.66 (fixes #4252)

Recent versions of AS_LITERAL_IF don't like *'s.  Fix from

http://blog.gmane.org/gmane.comp.sysutils.autoconf.general/month=20100701

13 years agoRefactor the command-line argument parsing (again)
simonpj@microsoft.com [Mon, 16 Aug 2010 07:44:53 +0000 (07:44 +0000)]
Refactor the command-line argument parsing (again)

This change allows the client of CmdLineParser a bit more flexibility,
by giving him an arbitrary computation (not just a deprecation
message) for each flag.

There are several clients, so there are lots of boilerplate changes.

Immediate motivation: if RTS is not profiled, we want to make
Template Haskell illegal.  That wasn't with the old setup.

13 years agoAdd upstream repo to the packages file
Ian Lynagh [Sun, 15 Aug 2010 15:47:41 +0000 (15:47 +0000)]
Add upstream repo to the packages file

13 years agoMake the "tag" column of the packages file always present
Ian Lynagh [Sun, 15 Aug 2010 15:16:57 +0000 (15:16 +0000)]
Make the "tag" column of the packages file always present
It makes the parsing simpler if we always have the same number of columns

13 years agoDisable object splitting on OSX; works around #4013
Ian Lynagh [Sun, 15 Aug 2010 13:47:59 +0000 (13:47 +0000)]
Disable object splitting on OSX; works around #4013

13 years agoReturn memory to the OS; trac #698
Ian Lynagh [Fri, 13 Aug 2010 17:04:02 +0000 (17:04 +0000)]
Return memory to the OS; trac #698

13 years agoReduce the xargs -s value we use on Windows
Ian Lynagh [Thu, 12 Aug 2010 22:37:21 +0000 (22:37 +0000)]
Reduce the xargs -s value we use on Windows
With 30000 I was getting:
    xargs: value for -s option should be < 28153

13 years agoLLVM: Enable shared lib support on Linux x64
David Terei [Fri, 13 Aug 2010 19:15:34 +0000 (19:15 +0000)]
LLVM: Enable shared lib support on Linux x64

13 years agoRe-do the arity calculation mechanism again (fix Trac #3959)
simonpj@microsoft.com [Fri, 13 Aug 2010 16:11:51 +0000 (16:11 +0000)]
Re-do the arity calculation mechanism again (fix Trac #3959)

After rumination, yet again, on the subject of arity calculation,
I have redone what an ArityType is (it's purely internal to the
CoreArity module), and documented it better.  The result should
fix #3959, and I hope the related #3961, #3983.

There is lots of new documentation: in particular
 * Note [ArityType]
   describes the new datatype for arity info

 * Note [State hack and bottoming functions]
   says how bottoming functions are dealt with, particularly
   covering catch# and Trac #3959

I also found I had to be careful not to eta-expand single-method
class constructors; see Note [Newtype classes and eta expansion].
I think this part could be done better, but it works ok.

13 years agoComments only
simonpj@microsoft.com [Fri, 13 Aug 2010 16:10:19 +0000 (16:10 +0000)]
Comments only

13 years agoModify FloatOut to fix Trac #4237
simonpj@microsoft.com [Fri, 13 Aug 2010 16:31:20 +0000 (16:31 +0000)]
Modify FloatOut to fix Trac #4237

The problem was that a strict binding was getting floated
out into a letrec. This only happened when profiling was
on.  It exposed a fragility in the floating strategy.  This
patch makes it more robust.  See
      Note [Avoiding unnecessary floating]

13 years agoFix egregious bug in SetLevels.notWorthFloating
simonpj@microsoft.com [Fri, 13 Aug 2010 16:14:29 +0000 (16:14 +0000)]
Fix egregious bug in SetLevels.notWorthFloating

This bug just led to stupid code, which would
later be optimised away, but better not to generate
stupid code in the first place.

13 years agoDelete GhcLibProfiled
simonpj@microsoft.com [Fri, 13 Aug 2010 14:01:52 +0000 (14:01 +0000)]
Delete GhcLibProfiled

Simon M and I looked at this, and we think GhcLibProfiled is
(a) not needed (b) confusing.

Ian should review.

Really, if GhcProfiled is on we should also
check that 'p' is in the GhcLibWays

13 years agoDo not build DPH when GhcProfiled (fixes #4172)
simonpj@microsoft.com [Fri, 13 Aug 2010 14:00:21 +0000 (14:00 +0000)]
Do not build DPH when GhcProfiled (fixes #4172)

Reason: DPH uses Template Haskell and TH doesn't work
in a profiled compiler

13 years agoFix Trac #4220
simonpj@microsoft.com [Thu, 12 Aug 2010 13:13:19 +0000 (13:13 +0000)]
Fix Trac #4220

For deriving Functor, Foldable, Traversable with empty
data cons I just generate a null equation
   f _ = error "urk"

There are probably more lurking (eg Enum) but this will do for now.

13 years agoImprove the Specialiser, fixing Trac #4203
simonpj@microsoft.com [Thu, 12 Aug 2010 13:11:33 +0000 (13:11 +0000)]
Improve the Specialiser, fixing Trac #4203

Simply fixing #4203 is a tiny fix: in case alterantives we should
do dumpUDs *including* the case binder.

But I realised that we can do better and wasted far too much time
implementing the idea.  It's described in
    Note [Floating dictionaries out of cases]

13 years agoComments
simonpj@microsoft.com [Thu, 12 Aug 2010 10:14:56 +0000 (10:14 +0000)]
Comments

13 years agoComments only
simonpj@microsoft.com [Thu, 12 Aug 2010 10:14:39 +0000 (10:14 +0000)]
Comments only

13 years agoFix bug in linting of shadowed case-alternative binders
simonpj@microsoft.com [Thu, 12 Aug 2010 10:14:13 +0000 (10:14 +0000)]
Fix bug in linting of shadowed case-alternative binders

13 years agoComments and spacing only
simonpj@microsoft.com [Thu, 12 Aug 2010 10:13:47 +0000 (10:13 +0000)]
Comments and spacing only

13 years agoAdd more info to more parse error messages (#3811)
Ian Lynagh [Mon, 9 Aug 2010 23:31:08 +0000 (23:31 +0000)]
Add more info to more parse error messages (#3811)

13 years agoRun finalizers *after* updating the stable pointer table (#4221)
Simon Marlow [Tue, 10 Aug 2010 13:37:39 +0000 (13:37 +0000)]
Run finalizers *after* updating the stable pointer table (#4221)
Silly bug really, we were running the C finalizers while the StablePtr
table was still in a partially-updated state during GC, but finalizers
are allowed to call freeStablePtr() (via hs_free_fun_ptr(), for
example), and chaos ensues.

13 years agoDo the dependency-omitting for 'make 1' in a slightly different way
Simon Marlow [Tue, 10 Aug 2010 09:34:46 +0000 (09:34 +0000)]
Do the dependency-omitting for 'make 1' in a slightly different way

I encountered a couple of things that broke after Ian's previous
patch: one was my nightly build scripts that use 'make stage=2' at the
top level, and the other is 'make fast' in libraries/base, which uses
'stage=0' to avoid building any compilers.

So my version of this patch is more direct: it just turns off the
appropriate dependencies using a variable set by 'make 1', 'make 2',
etc.

13 years agoIntegrate new I/O manager, with signal support
Johan Tibell [Sat, 24 Jul 2010 10:23:55 +0000 (10:23 +0000)]
Integrate new I/O manager, with signal support

13 years agoAdd DoAndIfThenElse support
Ian Lynagh [Sun, 8 Aug 2010 19:46:25 +0000 (19:46 +0000)]
Add DoAndIfThenElse support

13 years agoMake another parse error more informative
Ian Lynagh [Sun, 8 Aug 2010 19:33:40 +0000 (19:33 +0000)]
Make another parse error more informative

13 years agoMake a parse error say what it is failing to parse; part of #3811
Ian Lynagh [Sun, 8 Aug 2010 15:57:32 +0000 (15:57 +0000)]
Make a parse error say what it is failing to parse; part of #3811

13 years agoSend ghc progress output to stdout; fixes #3636
Ian Lynagh [Sun, 8 Aug 2010 14:25:42 +0000 (14:25 +0000)]
Send ghc progress output to stdout; fixes #3636

13 years agoFix the HsColour test in the build system
Ian Lynagh [Thu, 5 Aug 2010 15:53:19 +0000 (15:53 +0000)]
Fix the HsColour test in the build system

13 years agoFix the -lm configure test; fixes #4155
Ian Lynagh [Thu, 5 Aug 2010 14:25:08 +0000 (14:25 +0000)]
Fix the -lm configure test; fixes #4155

13 years agoDon't restrict filenames in line pragmas to printable characters; fixes #4207
Ian Lynagh [Thu, 5 Aug 2010 13:50:11 +0000 (13:50 +0000)]
Don't restrict filenames in line pragmas to printable characters; fixes #4207
"printable" is ASCII-only, whereas in other locales we can get things like
# 1 "<lĂ­nea-de-orden>"

13 years agoEnsure extension flags are flattened in the Cmm phase
Ian Lynagh [Thu, 5 Aug 2010 13:36:14 +0000 (13:36 +0000)]
Ensure extension flags are flattened in the Cmm phase
If we start with a .cmmcpp file then they don't get flattened in
the CmmCpp phase, as we don't run that phase.

13 years agoAdd "cmmcpp" as a Haskellish source suffix
Ian Lynagh [Thu, 5 Aug 2010 13:25:55 +0000 (13:25 +0000)]
Add "cmmcpp" as a Haskellish source suffix

13 years agoOn amd64/OSX we don't need to be given memory in the first 31bits
Ian Lynagh [Thu, 5 Aug 2010 12:06:00 +0000 (12:06 +0000)]
On amd64/OSX we don't need to be given memory in the first 31bits
as PIC is always on

13 years agoNCG: Don't worry about trying to re-freeze missing coalescences
benl@ouroborus.net [Fri, 2 Jul 2010 05:33:19 +0000 (05:33 +0000)]
NCG: Don't worry about trying to re-freeze missing coalescences

13 years agoMake -rtsopts more flexible
Ian Lynagh [Thu, 5 Aug 2010 01:11:37 +0000 (01:11 +0000)]
Make -rtsopts more flexible
The default is a new "some" state, which allows only known-safe flags
that we want on by default. Currently this is only "--info".

13 years agoTest for (fd < 0) before trying to FD_SET it
Ian Lynagh [Wed, 4 Aug 2010 17:36:36 +0000 (17:36 +0000)]
Test for (fd < 0) before trying to FD_SET it

13 years agoRemove "On by default" comments in DynFlags
Ian Lynagh [Mon, 2 Aug 2010 11:08:03 +0000 (11:08 +0000)]
Remove "On by default" comments in DynFlags
These make less sense now we support multiple languges. The
"languageExtensions" function gives the defaults.

13 years agoFix build: Add newline to end of ghc-pkg/Main.hs
Ian Lynagh [Sun, 1 Aug 2010 18:32:06 +0000 (18:32 +0000)]
Fix build: Add newline to end of ghc-pkg/Main.hs

13 years agoAdd a versions haddock binary for Windows
Ian Lynagh [Sun, 1 Aug 2010 18:09:17 +0000 (18:09 +0000)]
Add a versions haddock binary for Windows

13 years agoghc-pkg: don't fail, if a file is already removed
ich@christoph-bauer.net [Sun, 25 Jul 2010 16:26:06 +0000 (16:26 +0000)]
ghc-pkg: don't fail, if a file is already removed

13 years agoRemove push-all from file list in boot script (push-all no longer exists)
Ian Lynagh [Sun, 1 Aug 2010 12:18:41 +0000 (12:18 +0000)]
Remove push-all from file list in boot script (push-all no longer exists)

13 years agoAdd error checking to boot-pkgs script
Ian Lynagh [Sun, 1 Aug 2010 12:14:32 +0000 (12:14 +0000)]
Add error checking to boot-pkgs script

13 years agoAdd more error checking to the boot script
Ian Lynagh [Sun, 1 Aug 2010 11:36:28 +0000 (11:36 +0000)]
Add more error checking to the boot script

13 years agoRemove libHSrtsmain.a before creating it
Ian Lynagh [Sun, 1 Aug 2010 00:54:32 +0000 (00:54 +0000)]
Remove libHSrtsmain.a before creating it
Otherwise it isn't updated properly if rts/Main.c changes

13 years agoExpose the functions haddock needs even when haddock is disabled; #3558
Ian Lynagh [Sat, 31 Jul 2010 11:55:06 +0000 (11:55 +0000)]
Expose the functions haddock needs even when haddock is disabled; #3558

13 years agoAlways haddock by default
Ian Lynagh [Fri, 30 Jul 2010 23:50:01 +0000 (23:50 +0000)]
Always haddock by default
Revert this patch:
    Matthias Kilian <kili@outback.escape.de>**20090920181319
    Don't build haddock if HADDOC_DOCS = NO, and disable HADDOC_DOCS
        if GhcWithInterpreter = NO
    Haddock uses TcRnDriver.tcRnGetInfo, which is only available if
    GHCI is built. Set HADDOC_DOCS to NO if GhcWithInterpreter is NO,
    and disable the haddock build if HADDOC_DOCS = NO.

13 years agoAdd a debugTrace for the phases that we run
Ian Lynagh [Thu, 29 Jul 2010 20:15:03 +0000 (20:15 +0000)]
Add a debugTrace for the phases that we run

13 years ago* Add StringPrimL as a constructor for Template Haskell (Trac #4168)
simonpj@microsoft.com [Fri, 30 Jul 2010 13:19:22 +0000 (13:19 +0000)]
* Add StringPrimL as a constructor for Template Haskell (Trac #4168)

There are already constructors for IntPrim, FloatPrim etc,
so this makes it more uniform.

There's a corresponding patch for the TH library

13 years agoAdd thread affinity support for FreeBSD
Gabor Pali [Tue, 20 Jul 2010 00:14:09 +0000 (00:14 +0000)]
Add thread affinity support for FreeBSD
- Implement missing functions for setting thread affinity and getting real
  number of processors.
- It is available starting from 7.1-RELEASE, which includes a native support
  for managing CPU sets.
- Add __BSD_VISIBLE, since it is required for certain types to be visible in
  addition to POSIX & C99.

13 years agoDisable symbol visibility pragmas for FreeBSD
Ian Lynagh [Thu, 29 Jul 2010 01:25:07 +0000 (01:25 +0000)]
Disable symbol visibility pragmas for FreeBSD
Do not use GCC pragmas for controlling visibility, because it causes
"undefined reference" errors at link-time.  The true reasons are
unknown, however FreeBSD 8.x includes GCC 4.2.1 in the base system,
which might be buggy.

13 years agoFix numeric escape sequences parsing
Anton Nikishaev [Wed, 21 Jul 2010 19:42:08 +0000 (19:42 +0000)]
Fix numeric escape sequences parsing
This fixes trac bug #1344

13 years agoExplicitly give the right path to perl when making the OS X installer; #4183
Ian Lynagh [Wed, 28 Jul 2010 16:30:30 +0000 (16:30 +0000)]
Explicitly give the right path to perl when making the OS X installer; #4183

13 years agoSet -fno-stack-protector in extra-gcc-opts; fixes #4206
Ian Lynagh [Wed, 28 Jul 2010 16:19:57 +0000 (16:19 +0000)]
Set -fno-stack-protector in extra-gcc-opts; fixes #4206
We were using it only when building the RTS, and only on certain
platforms. However, some versions of OS X need the flag, while others
don't support it, so we now test for it properly.

13 years agoMake PersistentLinkerState fields strict; fixes #4208
Ian Lynagh [Tue, 27 Jul 2010 20:19:11 +0000 (20:19 +0000)]
Make PersistentLinkerState fields strict; fixes #4208
We modify fields a lot, so we retain the old value if they aren't forced.

13 years agoDon't rebuild dependency files unnecessarily when doing "make 1" etc
Ian Lynagh [Mon, 26 Jul 2010 21:15:12 +0000 (21:15 +0000)]
Don't rebuild dependency files unnecessarily when doing "make 1" etc

13 years agoLLVM: If user specifies optlo, don't use '-O' levels
David Terei [Mon, 26 Jul 2010 10:56:50 +0000 (10:56 +0000)]
LLVM: If user specifies optlo, don't use '-O' levels

13 years agoFlatten flags for ghci's :show
Ian Lynagh [Sun, 25 Jul 2010 13:53:20 +0000 (13:53 +0000)]
Flatten flags for ghci's :show

13 years agoAdd support for Haskell98 and Haskell2010 "languages"
Ian Lynagh [Sat, 24 Jul 2010 23:01:21 +0000 (23:01 +0000)]
Add support for Haskell98 and Haskell2010 "languages"

13 years agoRename "language" varibles etc to "extension", and add --supported-extensions
Ian Lynagh [Sat, 24 Jul 2010 22:36:24 +0000 (22:36 +0000)]
Rename "language" varibles etc to "extension", and add --supported-extensions

13 years agoSeparate language option handling into 2 phases
Ian Lynagh [Sat, 24 Jul 2010 21:20:13 +0000 (21:20 +0000)]
Separate language option handling into 2 phases
We now first collect the option instructions (from the commandline,
from pragmas in source files, etc), and then later flatten them into
the list of enabled options. This will enable us to use different
standards (H98, H2010, etc) as a base upon which to apply the
instructions, when we don't know what the base will be when we start
collecting instructions.

13 years agoSeparate the language flags from the other DynFlag's
Ian Lynagh [Sat, 24 Jul 2010 13:31:03 +0000 (13:31 +0000)]
Separate the language flags from the other DynFlag's

13 years agoSet stage-specific CC/LD opts in the bindist configure.ac
Ian Lynagh [Sat, 24 Jul 2010 11:37:48 +0000 (11:37 +0000)]
Set stage-specific CC/LD opts in the bindist configure.ac

13 years agoUse different CC/LD options for different stages
Ian Lynagh [Fri, 23 Jul 2010 22:30:59 +0000 (22:30 +0000)]
Use different CC/LD options for different stages

13 years agoAdd some error belchs to the linker, when we find bad magic numbers
Ian Lynagh [Fri, 23 Jul 2010 20:08:22 +0000 (20:08 +0000)]
Add some error belchs to the linker, when we find bad magic numbers

13 years agoAdd some more linker debugging prints
Ian Lynagh [Fri, 23 Jul 2010 18:02:37 +0000 (18:02 +0000)]
Add some more linker debugging prints

13 years agoWhen (un)loading an object fails, say which object in teh panic
Ian Lynagh [Fri, 23 Jul 2010 16:26:49 +0000 (16:26 +0000)]
When (un)loading an object fails, say which object in teh panic

13 years agoAdd a release note: GHCi import syntax
Ian Lynagh [Wed, 21 Jul 2010 19:36:47 +0000 (19:36 +0000)]
Add a release note: GHCi import syntax

13 years agoDeprecate NewQualifiedOperators extension (rejected by H')
Ian Lynagh [Mon, 19 Jul 2010 15:09:09 +0000 (15:09 +0000)]
Deprecate NewQualifiedOperators extension (rejected by H')

13 years agoLLVM: Allow optlc and optlo to override default params for these systools
David Terei [Thu, 22 Jul 2010 18:16:31 +0000 (18:16 +0000)]
LLVM: Allow optlc and optlo to override default params for these systools

13 years agoLLVM: Code and speed improvement to dominateAllocs pass.
David Terei [Wed, 21 Jul 2010 14:36:54 +0000 (14:36 +0000)]
LLVM: Code and speed improvement to dominateAllocs pass.

13 years agoComments only
simonpj@microsoft.com [Wed, 21 Jul 2010 14:42:57 +0000 (14:42 +0000)]
Comments only

13 years agoFix inlining for default methods
simonpj@microsoft.com [Wed, 21 Jul 2010 14:42:48 +0000 (14:42 +0000)]
Fix inlining for default methods

This was discombobulated by a patch a week ago;
now fixed, quite straightforwardly.  See
Note [Default methods and instances]

13 years agoAllow reification of existentials and GADTs
simonpj@microsoft.com [Wed, 21 Jul 2010 09:04:37 +0000 (09:04 +0000)]
Allow reification of existentials and GADTs

It turns out that TH.Syntax is rich enough to express even GADTs,
provided we express them in equality-predicate form.  So for
example

  data T a where
     MkT1 :: a -> T [a]
     MkT2 :: T Int

will appear in TH syntax like this

  data T a = forall b. (a ~ [b]) => MkT1 b
           | (a ~ Int) => MkT2

While I was at it I also improved the reification of types,
so that we use TH.TupleT and TH.ListT when we can.

13 years agoadd numSparks# primop (#4167)
Simon Marlow [Tue, 20 Jul 2010 15:37:46 +0000 (15:37 +0000)]
add numSparks# primop (#4167)

13 years agoLLVM: Decrease max opt level used under OSX to avoid bug
David Terei [Tue, 20 Jul 2010 16:09:38 +0000 (16:09 +0000)]
LLVM: Decrease max opt level used under OSX to avoid bug

Currently, many programs compiled with GHC at -O2 and LLVM
set to -O3 will segfault (only under OSX). Until this issue
is fixed I have simply 'solved' the segfault by lowering
the max opt level for LLVM used to -O2 under OSX.

All these recent changes to OSX should mean its finally as
stable as Linux and Windows.

13 years agoLLVM: Fix OSX to work again with TNTC disabled.
David Terei [Tue, 20 Jul 2010 16:08:45 +0000 (16:08 +0000)]
LLVM: Fix OSX to work again with TNTC disabled.

13 years agoLLVM: Fix printing of local vars so LLVM works with -fnew-codegen
David Terei [Tue, 20 Jul 2010 16:03:02 +0000 (16:03 +0000)]
LLVM: Fix printing of local vars so LLVM works with -fnew-codegen

13 years agoUse a separate mutex to protect all_tasks, avoiding a lock-order-reversal
Simon Marlow [Fri, 16 Jul 2010 15:08:32 +0000 (15:08 +0000)]
Use a separate mutex to protect all_tasks, avoiding a lock-order-reversal
In GHC 6.12.x I found a rare deadlock caused by this
lock-order-reversal:

AQ cap->lock
  startWorkerTask
    newTask
      AQ sched_mutex

scheduleCheckBlackHoles
  AQ sched_mutex
   unblockOne_
    wakeupThreadOnCapabilty
      AQ cap->lock

so sched_mutex and cap->lock are taken in a different order in two
places.

This doesn't happen in the HEAD because we don't have
scheduleCheckBlackHoles, but I thought it would be prudent to make
this less likely to happen in the future by using a different mutex in
newTask.  We can clearly see that the all_tasks mutex cannot be
involved in a deadlock, becasue we never call anything else while
holding it.

13 years ago'make fast' in a package does not build any compilers
Simon Marlow [Thu, 15 Jul 2010 12:59:04 +0000 (12:59 +0000)]
'make fast' in a package does not build any compilers

13 years agoLLVM: Fix up botched last commit
David Terei [Mon, 19 Jul 2010 10:48:23 +0000 (10:48 +0000)]
LLVM: Fix up botched last commit