ghc.git
9 years agoUse eta-expansion to ensure that INLINE things have their expected arity 2009-11-15
simonpj@microsoft.com [Fri, 13 Nov 2009 14:57:11 +0000 (14:57 +0000)] 
Use eta-expansion to ensure that INLINE things have their expected arity

See Note [Eta-expanding INLINE things] in DsBinds

This is to fix a performance bug that Roman was encountering.

9 years agoSwitch EventThreadID back to 32 bits.
Simon Marlow [Thu, 12 Nov 2009 13:53:39 +0000 (13:53 +0000)] 
Switch EventThreadID back to 32 bits.
The log file format was still using 32 bits, this just updates the
header file to match; there should be no functional changes.

9 years agoThe rest of the #1185 patch (forkProcess and -threaded)
Simon Marlow [Fri, 13 Nov 2009 10:45:18 +0000 (10:45 +0000)] 
The rest of the #1185 patch (forkProcess and -threaded)
Due to darcs confusion, I managed to leave out part of the patch for
#1185.  This should make 1185(threaded1) go through now.

9 years agoMake the new ClassOp/DFun selection mechanism work for single-method classes
simonpj@microsoft.com [Fri, 13 Nov 2009 11:12:11 +0000 (11:12 +0000)] 
Make the new ClassOp/DFun selection mechanism work for single-method classes

I'd forgotten the case of single-method classes! I've also improved
the documentation. See
  Note [ClassOp/DFun selection]
  Note [Single-method classes]
both in TcInstDcls

9 years agoComments only
simonpj@microsoft.com [Thu, 12 Nov 2009 15:33:32 +0000 (15:33 +0000)] 
Comments only

9 years agoRemove old, redundant note
simonpj@microsoft.com [Thu, 12 Nov 2009 14:21:50 +0000 (14:21 +0000)] 
Remove old, redundant note

9 years agoFix bug when the combined package DB has duplicate package IDs
Simon Marlow [Thu, 12 Nov 2009 13:51:20 +0000 (13:51 +0000)] 
Fix bug when the combined package DB has duplicate package IDs
Someone on IRC reported that they were encountering a strange missing
module error from GHC, and it turned out that they had mtl-1.1.0.2
installed in both the global and local DB, with the same
InstalledPackageId.  The two packages should be interchangeable, but
we were forgetting to eliminate duplicates in part of the
package-processing phase in GHC.

Really I should switch this code over to use the new PackageIndex data
type in Cabal, which ought to make things simpler.

9 years agoHC bootstrapping fix: add -I$(GHC_INCLUDE_DIR) to SRC_CC_OPTS
Simon Marlow [Thu, 12 Nov 2009 09:45:14 +0000 (09:45 +0000)] 
HC bootstrapping fix: add -I$(GHC_INCLUDE_DIR) to SRC_CC_OPTS
And add a comment explaining why these options are here

9 years agoWindows-specific fix for #1185 patch
Simon Marlow [Thu, 12 Nov 2009 12:58:53 +0000 (12:58 +0000)] 
Windows-specific fix for #1185 patch

9 years agoSecond attempt to fix #1185 (forkProcess and -threaded)
Simon Marlow [Wed, 11 Nov 2009 14:28:22 +0000 (14:28 +0000)] 
Second attempt to fix #1185 (forkProcess and -threaded)

Patch 1/2: second part of the patch is to libraries/base

This time without dynamic linker hacks, instead I've expanded the
existing rts/Globals.c to cache more CAFs, specifically those in
GHC.Conc.  We were already using this trick for signal handlers, I
should have realised before.

It's still quite unsavoury, but we can do away with rts/Globals.c in
the future when we switch to a dynamically-linked GHCi.

9 years agoA radical overhaul of the coercion infrastucture
simonpj@microsoft.com [Thu, 12 Nov 2009 09:29:06 +0000 (09:29 +0000)] 
A radical overhaul of the coercion infrastucture

* Core Lint now does full checking of kinds and coercion terms
  which picks up kind errors in coercions that were previously
  simply not checked for

* Coercion.lhs now provides optCoercion which optimises coercion
  terms.  It implements all of Dimitrios's rules

* The constructors for coercion terms now make no attempt to be
  "smart"; instead we rely solely on the coercion optimiser

* CoercionTyCons in TyCon.lhs always had a "custom" kinding rule
  (the coKindFun field of CoercionTyCon) but its type was not
  clever enough to do both
     (a) *figure out the result kind*, assuming the whole thing
         is well-kinded in the first place
     (b) *check* the kinds of everything, failing gracefully if
         they aren't right.
  We need (b) for the new CoreLint stuff. The field now has type
        CoTyConKindChecker
  which does the job nicely.

9 years agoImprove warning message
simonpj@microsoft.com [Thu, 12 Nov 2009 09:23:23 +0000 (09:23 +0000)] 
Improve warning message

9 years agoAdd an ID monad to MonadUtils (used in kind checking)
simonpj@microsoft.com [Thu, 12 Nov 2009 09:22:54 +0000 (09:22 +0000)] 
Add an ID monad to MonadUtils (used in kind checking)

9 years agoLoop problems in native back ends, update to T3286 fix
dias@cs.tufts.edu [Thu, 5 Nov 2009 15:15:32 +0000 (15:15 +0000)] 
Loop problems in native back ends, update to T3286 fix
The native back ends had difficulties with loops;
in particular the code for branch-chain elimination
could run in infinite loops or drop basic blocks.
The old codeGen didn't expose these problems.

Also, my fix for T3286 in the new codegen was getting
applied to too many (some wrong) cases; a better pattern
match fixed that.

9 years agoMorguing dead code
dias@cs.tufts.edu [Fri, 18 Sep 2009 19:29:32 +0000 (19:29 +0000)] 
Morguing dead code

9 years agoMore sensible use of -fnew-codegen and less debugging output
dias@cs.tufts.edu [Fri, 18 Sep 2009 19:16:26 +0000 (19:16 +0000)] 
More sensible use of -fnew-codegen and less debugging output

9 years agoMinor refactoring and formatting
dias@cs.tufts.edu [Fri, 18 Sep 2009 19:14:17 +0000 (19:14 +0000)] 
Minor refactoring and formatting
Wrote a generic function to extend dataflow results for safe foreign calls.
Should be able to throw it away when we change the representation of safe foreign calls.

9 years agoKeep Touch'd variables live through the back end
dias@cs.tufts.edu [Fri, 18 Sep 2009 19:07:53 +0000 (19:07 +0000)] 
Keep Touch'd variables live through the back end
When we used derived pointers into the middle of an object,
we need to keep the pointer to the start of the object live.
We use a "fat machine instruction" with the primitive MO_Touch
to propagate this information through the back end.

9 years agoFixed calling convention for unboxed tuples
dias@cs.tufts.edu [Fri, 18 Sep 2009 18:34:15 +0000 (18:34 +0000)] 
Fixed calling convention for unboxed tuples
Apparently, the arguments should be sorted by pointerhood.
While we're at it, I rewrote the code that assigns registers
and stack space to function call and return parameters.

9 years agoFix for T3286 in new codegen (related to T3132); plus formatting
dias@cs.tufts.edu [Fri, 18 Sep 2009 18:31:22 +0000 (18:31 +0000)] 
Fix for T3286 in new codegen (related to T3132); plus formatting
If the scrutinee is bottom, the generated Cmm code could have a
type error when the case arm expected an unboxed floating-point
value (even though the arm should never be reached).
Now, we detect this case and avoid producing the type-incorrect
assignment.

9 years agoAdd gen_contents_index and prologue.txt to bindists
Ian Lynagh [Wed, 11 Nov 2009 19:28:21 +0000 (19:28 +0000)] 
Add gen_contents_index and prologue.txt to bindists

9 years agoUse relative paths for haddockHTMLs in the inplace package.conf
Ian Lynagh [Tue, 10 Nov 2009 22:36:32 +0000 (22:36 +0000)] 
Use relative paths for haddockHTMLs in the inplace package.conf
This means that the docs get built with the correct relative paths.
When installing, the absolute path will still be used.

9 years agoPut docs into versioned directory names; fixes trac #3532
Ian Lynagh [Sun, 8 Nov 2009 21:07:01 +0000 (21:07 +0000)] 
Put docs into versioned directory names; fixes trac #3532
You can now have multiple versions of a package installed, and
gen_contents_index will do the right thing.

9 years agoMake "./darcs-all optimize --relink" do the right thing
Simon Marlow [Wed, 11 Nov 2009 11:32:01 +0000 (11:32 +0000)] 
Make "./darcs-all optimize --relink" do the right thing

9 years agoSupport for DragonFly BSD
Simon Marlow [Wed, 11 Nov 2009 11:18:21 +0000 (11:18 +0000)] 
Support for DragonFly BSD
Patches from Goetz Isenmann <info@goetz-isenmann.de>, slightly updated
for HEAD (the method for configuring platforms in configure.ac has
changed).

9 years agoThe RTS needs hs-suffix-rules-srcdir for BootingFromHc
Simon Marlow [Wed, 11 Nov 2009 11:12:25 +0000 (11:12 +0000)] 
The RTS needs hs-suffix-rules-srcdir for BootingFromHc
Patch submitted by Matthias Kilian <kili@outback.escape.de>,
re-recorded against HEAD by me, with a comment added.

9 years agoDon't try to rebuild compiler/primop-*.hs-incl when BootingFromHc
Simon Marlow [Mon, 9 Nov 2009 13:51:59 +0000 (13:51 +0000)] 
Don't try to rebuild compiler/primop-*.hs-incl when BootingFromHc
Patch submitted by Matthias Kilian <kili@outback.escape.de>

9 years agoNo CoreLint warnings if -dno-debug-output is on
simonpj@microsoft.com [Wed, 11 Nov 2009 08:09:57 +0000 (08:09 +0000)] 
No CoreLint warnings if -dno-debug-output is on

The Core Lint warnings are new.  There's only one at the moment,
namely one to identify recursive INLINE things:

    [RHS of $c>>_als :: forall s_afT a_alJ b_alK.
                        Cpr001_imp.StateTrans s_afT a_alJ
                        -> Cpr001_imp.StateTrans s_afT b_alK
                        -> Cpr001_imp.StateTrans s_afT b_alK]
    INLINE binder is loop breaker: $c>>_als

This is definitely non-fatal, and typically gets unravelled after
another simplifier run anyway.  So I'm suppressing such warnings
for the testsuite, when -dno-debug-output is on.

9 years agoWibbles to the inline-in-InlineRule stuff
simonpj@microsoft.com [Tue, 10 Nov 2009 17:23:37 +0000 (17:23 +0000)] 
Wibbles to the inline-in-InlineRule stuff

The main change is using SimplUtils.updModeForInlineRules
doesn't overwrite the current setting, it just augments it.

9 years agoDon't inline a loop breaker, even if it has an INLINE pragma
simonpj@microsoft.com [Tue, 10 Nov 2009 17:20:17 +0000 (17:20 +0000)] 
Don't inline a loop breaker, even if it has an INLINE pragma

We preserve the InlineRule on loop breakers, in the hope that they'll
stop being a loop breaker later.  So don't inline them!

9 years agoComments only
simonpj@microsoft.com [Tue, 10 Nov 2009 17:18:46 +0000 (17:18 +0000)] 
Comments only

9 years agoImplement the PushC rule when optimising casts
simonpj@microsoft.com [Tue, 10 Nov 2009 17:17:45 +0000 (17:17 +0000)] 
Implement the PushC rule when optimising casts

9 years agoPreserve strictness when floating coercions
simonpj@microsoft.com [Tue, 10 Nov 2009 17:16:50 +0000 (17:16 +0000)] 
Preserve strictness when floating coercions

See Note [Preserve strictness when floating coercions]

9 years agoMake -dverbose-core2core set verbosity = 2
simonpj@microsoft.com [Tue, 10 Nov 2009 17:10:40 +0000 (17:10 +0000)] 
Make -dverbose-core2core set verbosity = 2

This ensures that messages coming out with -dshow-passes
also come out with -dverbose-core2core

9 years agoComments only
simonpj@microsoft.com [Tue, 10 Nov 2009 17:09:23 +0000 (17:09 +0000)] 
Comments only

9 years agomore aggressive optimization of coercion terms
tom.schrijvers@cs.kuleuven.be [Sun, 8 Nov 2009 18:51:52 +0000 (18:51 +0000)] 
more aggressive optimization of coercion terms

9 years agoImprove debug-printing of the type environment
simonpj@microsoft.com [Fri, 6 Nov 2009 17:40:32 +0000 (17:40 +0000)] 
Improve debug-printing of the type environment

9 years agoTidy up coercions, and implement csel1, csel2, cselR
simonpj@microsoft.com [Fri, 6 Nov 2009 17:38:01 +0000 (17:38 +0000)] 
Tidy up coercions, and implement csel1, csel2, cselR

In preparation for implementing the PushC rule for coercion-swizzling
in the Simplifier, I had to inmplement the three new decomposition
operators for coercions, which I've called csel1, csel2, and cselR.

     co :: ((s1~t1) => r1) ~ ((s2~t2) => r2)
     ---------------------------------------
              csel1 co :: s1~s2

and similarly csel2, cselR.

On the way I fixed the coercionKind function for types of form
          (s1~t2) => r2
which currently are expressed as a forall type.

And I refactored quite a bit to help myself understand what is
going on.

9 years agoComments in OccurAnal
simonpj@microsoft.com [Fri, 6 Nov 2009 14:58:30 +0000 (14:58 +0000)] 
Comments in OccurAnal

9 years agoBarf on unhandled Mach-O relocations in the ghci linker
Manuel M T Chakravarty [Wed, 11 Nov 2009 02:07:12 +0000 (02:07 +0000)] 
Barf on unhandled Mach-O relocations in the ghci linker

- It might be worthwhile to MERGE this to 6.12, BUT somebody should validate
  it on PPC/Mac OS X first.

9 years agoTrack changes to DPH library
Roman Leshchinskiy [Mon, 9 Nov 2009 13:17:46 +0000 (13:17 +0000)] 
Track changes to DPH library

9 years agoRemove dead code
simonpj@microsoft.com [Mon, 9 Nov 2009 10:39:32 +0000 (10:39 +0000)] 
Remove dead code

9 years agoAllow inlining in "SimplGentle" mode
simonpj@microsoft.com [Mon, 9 Nov 2009 10:39:20 +0000 (10:39 +0000)] 
Allow inlining in "SimplGentle" mode

This change helps to break the mutual recursion generated by
an instance declaration.

See Note [Gentle mode] in SimplUtils

9 years agoAugment panic message
simonpj@microsoft.com [Mon, 9 Nov 2009 10:37:26 +0000 (10:37 +0000)] 
Augment panic message

9 years agoWibble to substituting InlWrappers
simonpj@microsoft.com [Mon, 9 Nov 2009 10:37:03 +0000 (10:37 +0000)] 
Wibble to substituting InlWrappers

See Note [Worker inlining] in CoreSubst

9 years agovalidate fixes
Ben.Lippmeier@anu.edu.au [Fri, 6 Nov 2009 09:08:50 +0000 (09:08 +0000)] 
validate fixes

9 years agoAdd missing CgExtCode to ghc.cabal.in
Ben.Lippmeier@anu.edu.au [Fri, 6 Nov 2009 05:08:24 +0000 (05:08 +0000)] 
Add missing CgExtCode to ghc.cabal.in

9 years ago* Refactor CLabel.RtsLabel to CLabel.CmmLabel
Ben.Lippmeier@anu.edu.au [Fri, 6 Nov 2009 03:05:30 +0000 (03:05 +0000)] 
* Refactor CLabel.RtsLabel to CLabel.CmmLabel

The type of the CmmLabel ctor is now
  CmmLabel :: PackageId -> FastString -> CmmLabelInfo -> CLabel

 - When you construct a CmmLabel you have to explicitly say what
   package it is in. Many of these will just use rtsPackageId, but
   I've left it this way to remind people not to pretend labels are
   in the RTS package when they're not.

 - When parsing a Cmm file, labels that are not defined in the
   current file are assumed to be in the RTS package.

   Labels imported like
      import label
   are assumed to be in a generic "foreign" package, which is different
   from the current one.

   Labels imported like
      import "package-name" label
   are marked as coming from the named package.

   This last one is needed for the integer-gmp library as we want to
   refer to labels that are not in the same compilation unit, but
   are in the same non-rts package.

   This should help remove the nasty #ifdef __PIC__ stuff from
   integer-gmp/cbits/gmp-wrappers.cmm

9 years agoAdd missing case to externallyVisibleCLabel
Ben.Lippmeier@anu.edu.au [Thu, 22 Oct 2009 01:01:05 +0000 (01:01 +0000)] 
Add missing case to externallyVisibleCLabel

9 years agoAdd CLabel.CmmLabel and start refactoring
Ben.Lippmeier@anu.edu.au [Sun, 18 Oct 2009 10:53:16 +0000 (10:53 +0000)] 
Add CLabel.CmmLabel and start refactoring

9 years agoHaddockify and clean up commenting
Ben.Lippmeier@anu.edu.au [Sun, 18 Oct 2009 09:25:04 +0000 (09:25 +0000)] 
Haddockify and clean up commenting

9 years agoMerge RtsLabelInfo.Rts* with RtsLabelInfo.Rts*FS
Ben.Lippmeier@anu.edu.au [Sun, 18 Oct 2009 08:38:53 +0000 (08:38 +0000)] 
Merge RtsLabelInfo.Rts* with RtsLabelInfo.Rts*FS

9 years agoTell ghc-cabal what strip program to use
Ian Lynagh [Sun, 8 Nov 2009 12:02:04 +0000 (12:02 +0000)] 
Tell ghc-cabal what strip program to use

9 years agoRemove ext-core
Ian Lynagh [Sun, 8 Nov 2009 01:15:46 +0000 (01:15 +0000)] 
Remove ext-core
It is now a separately maintained package, available from hackage:
http://hackage.haskell.org/package/extcore

9 years agoChange a use of xargs to "$(XARGS)" $(XARGS_OPTS)
Ian Lynagh [Sat, 7 Nov 2009 22:43:28 +0000 (22:43 +0000)] 
Change a use of xargs to "$(XARGS)" $(XARGS_OPTS)

9 years agoSplit XARGS into XARGS and XARGS_OPTS
Ian Lynagh [Sat, 7 Nov 2009 22:37:15 +0000 (22:37 +0000)] 
Split XARGS into XARGS and XARGS_OPTS

9 years agoRemove unused distrib/Makefile-bin-vars.in file
Ian Lynagh [Sat, 7 Nov 2009 21:18:17 +0000 (21:18 +0000)] 
Remove unused distrib/Makefile-bin-vars.in file

9 years agoDefine CONF_CC_OPTS/CONF_LD_OPTS in bindists
Ian Lynagh [Sat, 7 Nov 2009 21:17:47 +0000 (21:17 +0000)] 
Define CONF_CC_OPTS/CONF_LD_OPTS in bindists

9 years agoTweak how shell wrappers are built
Ian Lynagh [Sat, 7 Nov 2009 20:50:42 +0000 (20:50 +0000)] 
Tweak how shell wrappers are built

9 years agoghc-stage2 is now renamed to ghc when it is installed
Ian Lynagh [Sat, 7 Nov 2009 18:36:14 +0000 (18:36 +0000)] 
ghc-stage2 is now renamed to ghc when it is installed
This means that we get the right program name in error messages etc.

9 years agoTweak the shell wrapper scripts
Ian Lynagh [Sat, 7 Nov 2009 18:05:02 +0000 (18:05 +0000)] 
Tweak the shell wrapper scripts
We now separate the executable path from the executable name.
This will allow us to change one but not the other easily.

9 years agomkdirhier now just calls mkdir -p
Ian Lynagh [Sat, 7 Nov 2009 12:08:47 +0000 (12:08 +0000)] 
mkdirhier now just calls mkdir -p
The old shell code apparently didn't work properly with /bin/sh=dash

9 years agoFix the build
Ian Lynagh [Fri, 6 Nov 2009 20:49:27 +0000 (20:49 +0000)] 
Fix the build

9 years agoRollback #1185 fix
Simon Marlow [Fri, 6 Nov 2009 14:05:27 +0000 (14:05 +0000)] 
Rollback #1185 fix

As far as I can tell, the hack I was using in rts/Linker.c won't work
on OS X.  Back to the drawing board.

rolling back:

Tue Nov  3 16:05:47 GMT 2009  Simon Marlow <marlowsd@gmail.com>
  * Fix #1185 (RTS part, also needs corresponding change to libraries/base)
  GHC.Conc.ensureIOManagerIsRunning now creates an IO manager thread if
  one does not exist or has died/exited.

  Unfortunately this exposed a problem caused by the fact that we have
  two base packages, and hence two IO managers, in GHCi: see NOTE
  [io-manager-ghci] in rts/Linker.c.  The workaround can go away if/when
  we switch to a dynamically linked GHCi.

    M ./rts/Linker.c -6 +47
    M ./rts/Schedule.c +4
    M ./rts/package.conf.in +16
    M ./rts/posix/Signals.c -1 +7
    M ./rts/posix/Signals.h +2

Wed Nov  4 10:11:03 GMT 2009  Simon Marlow <marlowsd@gmail.com>
  * hopefully fix validate breakage on OS X and Windows

    M ./rts/Linker.c -1 +1

Wed Nov  4 16:27:40 GMT 2009  Simon Marlow <marlowsd@gmail.com>
  * fix build failure on Windows

    M ./rts/Linker.c -1 +1

9 years agoAccept any non-space characters in a header file (#3624)
Simon Marlow [Fri, 6 Nov 2009 10:23:19 +0000 (10:23 +0000)] 
Accept any non-space characters in a header file (#3624)
The FFI spec doesn't say exactly which characters may occur in a
header file, so to be on the safe side we'll accept anything that
isn't a space.

9 years agoBe a tiny bit keener to inline in the RHS of a let
simonpj@microsoft.com [Thu, 5 Nov 2009 17:04:53 +0000 (17:04 +0000)] 
Be a tiny bit keener to inline in the RHS of a let

Seee Note [RHS of lets] in CoreUnfold

9 years agoAnother refactoring on the shape of an Unfolding
simonpj@microsoft.com [Thu, 5 Nov 2009 17:03:13 +0000 (17:03 +0000)] 
Another refactoring on the shape of an Unfolding

I found that a compulsory unfolding was getting dropped on the floor,
so I took that as a hint to tidy up the data type so that it won't
happen again.  No big change in functionality.

9 years agoAdd notes to cmm-notes, following conversation with John Dias
simonpj@microsoft.com [Thu, 5 Nov 2009 16:55:46 +0000 (16:55 +0000)] 
Add notes to cmm-notes, following conversation with John Dias

9 years agoFix Trac #3640, plus associated refactoring
simonpj@microsoft.com [Thu, 5 Nov 2009 16:55:25 +0000 (16:55 +0000)] 
Fix Trac #3640, plus associated refactoring

In fixing this bug (to do with record puns), I had the usual rush of
blood to the head, and I did quite a bit of refactoring in the way
that duplicate/shadowed names are reported.

I think the result is shorter as well as clearer.

In one place I found it convenient for the renamer to use the ErrCtxt
carried in the monad.  (The renamer used not to have such a context,
but years ago the typechecker and renamer monads became one, so now it
does.)   So now it's availble if you want it in future.

9 years agoComments only
simonpj@microsoft.com [Thu, 5 Nov 2009 16:50:37 +0000 (16:50 +0000)] 
Comments only

9 years agoImprove error reporting when there's an error inside a spliced expression
simonpj@microsoft.com [Thu, 5 Nov 2009 12:07:33 +0000 (12:07 +0000)] 
Improve error reporting when there's an error inside a spliced expression

If an error occurs in *spliced* code, it can be tricky to understand
what is going on.  With this patch, in
     - epxressions
     - types
we give a helpful indicator that it's in the result of a splice.

For declarations it's harder, because they get type-checked in a
group with other non-spliced decls, so I have not made the same improvement.
But it's still better than it was.

9 years agoUpdate layout of error message slightly
simonpj@microsoft.com [Thu, 5 Nov 2009 12:04:43 +0000 (12:04 +0000)] 
Update layout of error message slightly

9 years agoNuke the -finline-if-enough-args flag
simonpj@microsoft.com [Thu, 5 Nov 2009 12:03:59 +0000 (12:03 +0000)] 
Nuke the -finline-if-enough-args flag

By default INLINE functions only inline when they
are given enough arguments, so the flag isn't needed

9 years agoFix some more build bugs exposed by the addition of the ghc dependency to dph
Simon Marlow [Thu, 5 Nov 2009 16:03:21 +0000 (16:03 +0000)] 
Fix some more build bugs exposed by the addition of the ghc dependency to dph
See comments for details.

9 years agoMake installation on *nix work for paths with spaces in their name
Ian Lynagh [Thu, 5 Nov 2009 16:23:00 +0000 (16:23 +0000)] 
Make installation on *nix work for paths with spaces in their name
This means we can remove some conditional stuff from the Makefiles,
and means the testsuite doesn't have to work out whether or not it's
on Windows.

9 years agoFix #3642: m GHC builds using the Haskell Platform
Simon Marlow [Thu, 5 Nov 2009 14:13:10 +0000 (14:13 +0000)] 
Fix #3642: m GHC builds using the Haskell Platform

9 years agoComment only
simonpj@microsoft.com [Wed, 4 Nov 2009 21:41:58 +0000 (21:41 +0000)] 
Comment only

9 years agoComments and layout only, relating to Roman's inlining-and-conlike patch
simonpj@microsoft.com [Thu, 5 Nov 2009 11:48:20 +0000 (11:48 +0000)] 
Comments and layout only, relating to Roman's inlining-and-conlike patch

9 years agoComments only, relating to Roman's new built-in rule for seq
simonpj@microsoft.com [Thu, 5 Nov 2009 11:47:09 +0000 (11:47 +0000)] 
Comments only, relating to Roman's new built-in rule for seq

9 years agoAdd a (DEBUG-only) warning for top-level error thunks with uninformative strictness...
simonpj@microsoft.com [Tue, 3 Nov 2009 15:50:09 +0000 (15:50 +0000)] 
Add a (DEBUG-only) warning for top-level error thunks with uninformative strictness info

In the past I've seen this in an interface file

   foo = error "urk"

but *without* a bottoming strictness info on 'foo'. This WARN just
checks (non-fatally) for the bad case, so that we can track it down easily

9 years agoComment only
simonpj@microsoft.com [Tue, 3 Nov 2009 15:48:11 +0000 (15:48 +0000)] 
Comment only

9 years agoGet the package-data.mk dependencies right
Simon Marlow [Thu, 5 Nov 2009 10:30:25 +0000 (10:30 +0000)] 
Get the package-data.mk dependencies right

9 years agoUpdate docs on ticky-ticky profiling
Simon Marlow [Thu, 5 Nov 2009 10:15:03 +0000 (10:15 +0000)] 
Update docs on ticky-ticky profiling

9 years agoAdd builtin rule to eliminate unnecessary casts in seq
Roman Leshchinskiy [Wed, 4 Nov 2009 23:30:14 +0000 (23:30 +0000)] 
Add builtin rule to eliminate unnecessary casts in seq

The patch adds this rule:

  seq (x `cast` co) y = seq x y

This is subject to the usual treatment of seq rules. It also makes them
match more often: it will rewrite

  seq (f x `cast` co) y = seq (f x) y

and allow a seq rule for f to match.

9 years agoConsider variables with conlike unfoldings interesting
Roman Leshchinskiy [Wed, 4 Nov 2009 14:28:36 +0000 (14:28 +0000)] 
Consider variables with conlike unfoldings interesting

In this expression:

  let x = f (g e1) in e2

the simplifier will inline f if it thinks that (g e1) is an interesting
argument. Until now, this was essentially the case if g was a data constructor
- we'd inline f in the hope that it will inspect and hence eliminate the
constructor application. This patch extends this mechanism to CONLIKE
functions. We consider (g e1) interesting if g is CONLIKE and inline f in the
hope that this will allow rewrite rules to match.

9 years agoTweak simpleOptExpr, so that it respects nested INLINE pragmas
simonpj@microsoft.com [Tue, 3 Nov 2009 15:27:52 +0000 (15:27 +0000)] 
Tweak simpleOptExpr, so that it respects nested INLINE pragmas

9 years agoFix some bugs to do with tools in paths containing spaces
Simon Marlow [Wed, 4 Nov 2009 16:43:43 +0000 (16:43 +0000)] 
Fix some bugs to do with tools in paths containing spaces
Not everything is fixed yet; see #3642

9 years ago#3604: treat TH with -dynamic in the same way as -prof
Simon Marlow [Wed, 4 Nov 2009 16:30:39 +0000 (16:30 +0000)] 
#3604: treat TH with -dynamic in the same way as -prof
That is, you have to build the library/program without -dynamic first,
to get plain object files, and then build it again with -dynamic.

I still need to check whether any changes to Cabal are required to
make this work.

9 years agofix build failure on Windows
Simon Marlow [Wed, 4 Nov 2009 16:27:40 +0000 (16:27 +0000)] 
fix build failure on Windows

9 years agoFinish #3439: -ticky implies -debug at link time; the ticky "way" has gone
Simon Marlow [Wed, 4 Nov 2009 14:55:07 +0000 (14:55 +0000)] 
Finish #3439: -ticky implies -debug at link time; the ticky "way" has gone

To get ticky profiling you still have to compile with -ticky (for
those modules that you want to profile), but you can link with either
-debug or -ticky.

9 years agoadd '-' to the chars allowed in C header file names
Simon Marlow [Wed, 4 Nov 2009 14:40:32 +0000 (14:40 +0000)] 
add '-' to the chars allowed in C header file names

9 years agohopefully fix validate breakage on OS X and Windows
Simon Marlow [Wed, 4 Nov 2009 10:11:03 +0000 (10:11 +0000)] 
hopefully fix validate breakage on OS X and Windows

9 years agoAlways include libraries/dph/ghc.mk in top-level ghc.mk
Roman Leshchinskiy [Wed, 4 Nov 2009 01:19:08 +0000 (01:19 +0000)] 
Always include libraries/dph/ghc.mk in top-level ghc.mk

9 years agoFix non-portable regexp
Roman Leshchinskiy [Wed, 4 Nov 2009 01:18:30 +0000 (01:18 +0000)] 
Fix non-portable regexp

9 years agoFix #1185 (RTS part, also needs corresponding change to libraries/base)
Simon Marlow [Tue, 3 Nov 2009 16:05:47 +0000 (16:05 +0000)] 
Fix #1185 (RTS part, also needs corresponding change to libraries/base)
GHC.Conc.ensureIOManagerIsRunning now creates an IO manager thread if
one does not exist or has died/exited.

Unfortunately this exposed a problem caused by the fact that we have
two base packages, and hence two IO managers, in GHCi: see NOTE
[io-manager-ghci] in rts/Linker.c.  The workaround can go away if/when
we switch to a dynamically linked GHCi.

9 years agoGhciMonad.resume should restore the program's argv and progname
Simon Marlow [Wed, 21 Oct 2009 12:52:40 +0000 (12:52 +0000)] 
GhciMonad.resume should restore the program's argv and progname
I discovered that single-stepping over getArgs gave the wrong answer
sometimes, because we were forgetting to set the program's argv and
progname when resuming at a breakpoint.

Test is ghci.debugger/scripts/getargs.script.

9 years agoRefactor package installation
Ian Lynagh [Tue, 3 Nov 2009 13:33:22 +0000 (13:33 +0000)] 
Refactor package installation
There is now less makefile code duplication.
Also, stage2 packages are registered after GHC, which is important as
they might depend on the ghc package (as dph now does).

9 years agoDocument the CONLIKE pragma
simonpj@microsoft.com [Tue, 3 Nov 2009 13:34:31 +0000 (13:34 +0000)] 
Document the CONLIKE pragma

Do not merge to 6.12

9 years agoDocument the fact that impredicative polymorphism is deprecated
simonpj@microsoft.com [Tue, 3 Nov 2009 13:33:44 +0000 (13:33 +0000)] 
Document the fact that impredicative polymorphism is deprecated

Merge to 6.12

9 years agoMinor change to captalisation in error message only
simonpj@microsoft.com [Mon, 2 Nov 2009 17:22:36 +0000 (17:22 +0000)] 
Minor change to captalisation in error message only