ghc-hetmet.git
12 years agoexpand "out of stack slots" panic to suggest using -fregs-graph, see #1993
Simon Marlow [Wed, 2 Jan 2008 15:07:37 +0000 (15:07 +0000)]
expand "out of stack slots" panic to suggest using -fregs-graph, see #1993

12 years agoWarning clean, and fix compilation with GHC 6.2.x
Simon Marlow [Wed, 2 Jan 2008 11:45:29 +0000 (11:45 +0000)]
Warning clean, and fix compilation with GHC 6.2.x

12 years agoAdd dead code elimination in cmmMiniInline
Simon Marlow [Thu, 20 Dec 2007 15:17:34 +0000 (15:17 +0000)]
Add dead code elimination in cmmMiniInline
cmmMiniInline counts the uses of local variables, so it can easily
eliminate assigments to unused locals.  This almost never gets
triggered, as we don't generate any dead assignments, but it will be
needed by a forthcoming cleanup in CgUtils.emitSwitch.

12 years agoimplement prefix unboxed tuples (part of #1509)
Isaac Dupree [Wed, 2 Jan 2008 12:40:01 +0000 (12:40 +0000)]
implement prefix unboxed tuples (part of #1509)

12 years agoLink libgmp.a statically into libHSrts.dll on Windows
Clemens Fruhwirth [Tue, 1 Jan 2008 15:40:17 +0000 (15:40 +0000)]
Link libgmp.a statically into libHSrts.dll on Windows

12 years agoEmbedd DLL name into its import library, so client libs reference them properly in...
Clemens Fruhwirth [Tue, 1 Jan 2008 15:21:57 +0000 (15:21 +0000)]
Embedd DLL name into its import library, so client libs reference them properly in .idata

12 years agoAdd package dependencies to link pass when building ghc package (required for windows...
Clemens Fruhwirth [Tue, 1 Jan 2008 15:21:01 +0000 (15:21 +0000)]
Add package dependencies to link pass when building ghc package (required for windows DLL build)

12 years agoFix building libHSrts.dll by using ghc-pkg instead of grepping in base.cabal
Clemens Fruhwirth [Sun, 30 Dec 2007 19:39:52 +0000 (19:39 +0000)]
Fix building libHSrts.dll by using ghc-pkg instead of grepping in base.cabal

12 years agoAdd installPackage to dependencies of make.library.* as it's used by the rule
Clemens Fruhwirth [Sat, 29 Dec 2007 16:27:07 +0000 (16:27 +0000)]
Add installPackage to dependencies of make.library.* as it's used by the rule

12 years agoInstall dynlibs correctly
Clemens Fruhwirth [Fri, 28 Dec 2007 18:40:24 +0000 (18:40 +0000)]
Install dynlibs correctly

Add dynlibdir target to config.mk.in, setting it to @libdir@.
Invoke installPackage with dynlibdir at libraries/Makefile
Make installPackage.hs hand dynlibdir to Cabal.

12 years agoimport ord that alex secretly imported
Isaac Dupree [Fri, 28 Dec 2007 17:57:27 +0000 (17:57 +0000)]
import ord that alex secretly imported

12 years agoadd missing import that happy -agc secretly provided
Isaac Dupree [Thu, 27 Dec 2007 17:13:35 +0000 (17:13 +0000)]
add missing import that happy -agc secretly provided

12 years agocorrect type mistake, hidden by happy -agc coercions!
Isaac Dupree [Wed, 26 Dec 2007 14:07:43 +0000 (14:07 +0000)]
correct type mistake, hidden by happy -agc coercions!

12 years agoAPI changes for cabal-HEAD
Clemens Fruhwirth [Thu, 27 Dec 2007 14:31:14 +0000 (14:31 +0000)]
API changes for cabal-HEAD

Rename interfacedir to haddockdir
Change empty(Copy|Register)Flags to default(Copy|Register)Flags
Wrap content of RegisterFlags with toFlag (the Flag type is actually just Maybe)

12 years agoExtend API for compiling to and from Core
Tim Chevalier [Tue, 25 Dec 2007 20:04:11 +0000 (20:04 +0000)]
Extend API for compiling to and from Core

Added API support for compiling Haskell to simplified Core, and for
compiling Core to machine code. The latter, especially, should be
considered experimental and has only been given cursory testing. Also
fixed warnings in DriverPipeline. Merry Christmas.

12 years agoWhen complaining about non-rigid context, give suggestion of adding a signature
simonpj@microsoft.com [Mon, 24 Dec 2007 12:22:17 +0000 (12:22 +0000)]
When complaining about non-rigid context, give suggestion of adding a signature

12 years agoImprove handling of newtypes (fixes Trac 1495)
simonpj@microsoft.com [Fri, 21 Dec 2007 09:04:06 +0000 (09:04 +0000)]
Improve handling of newtypes (fixes Trac 1495)

In a few places we want to "look through" newtypes to get to the
representation type.  But we need to be careful that  we don't fall
into an ininite loop with e.g.
newtype T = MkT T

The old mechansim for doing this was to have a field nt_rep, inside
a newtype TyCon, that gave the "ultimate representation" of the type.
But that failed for Trac 1495, which looked like this:
   newtype Fix a = Fix (a (Fix a))
   data I a = I a
Then, expanding the type (Fix I) went on for ever.

The right thing to do seems to be to check for loops when epxanding
the *type*, rather than in the *tycon*.  This patch does that,
- Removes nt_rep from TyCon
- Make Type.repType check for loops
See Note [Expanding newtypes] in Type.lhs.

At the same time I also fixed a bug for Roman, where newtypes were not
being expanded properly in FamInstEnv.topNormaliseType.  This function
and Type.repType share a common structure.

Ian, see if this merges easily to the branch
If not, I don't think it's essential to fix 6.8

12 years agoFix Trac #1981: seq on a type-family-typed expression
simonpj@microsoft.com [Fri, 21 Dec 2007 08:55:42 +0000 (08:55 +0000)]
Fix Trac #1981: seq on a type-family-typed expression

We were crashing when we saw
case x of DEFAULT -> rhs
where x had a type-family type.  This patch fixes it.

MERGE to the 6.8 branch.

12 years agoComment only
simonpj@microsoft.com [Thu, 20 Dec 2007 16:46:21 +0000 (16:46 +0000)]
Comment only

12 years agoFix nasty recompilation bug in MkIface.computeChangedOccs
simonpj@microsoft.com [Thu, 20 Dec 2007 16:43:07 +0000 (16:43 +0000)]
Fix nasty recompilation bug in MkIface.computeChangedOccs

MERGE to 6.8 branch

In computeChangedOccs we look up the old version of a Name.
But a WiredIn Name doesn't have an old version, because WiredIn things
don't appear in interface files at all.

Result: ghc-6.9: panic! (the 'impossible' happened)
  (GHC version 6.9 for x86_64-unknown-linux):
lookupVers1 base:GHC.Prim chr#{v}

This fixes the problem.  The patch should merge easily onto the branch.

12 years agoFix Trac #1988; keep the ru_fn field of a RULE up to date
simonpj@microsoft.com [Thu, 20 Dec 2007 13:19:12 +0000 (13:19 +0000)]
Fix Trac #1988; keep the ru_fn field of a RULE up to date

The ru_fn field was wrong when we moved RULES from one Id to another.
The fix is simple enough.

However, looking at this makes me realise that the worker/wrapper stuff
for recursive newtypes isn't very clever: we generate demand info but
then don't properly exploit it.

This patch fixes the crash though.

12 years agoAdd better panic message in getSRTInfo (Trac #1973)
simonpj@microsoft.com [Thu, 20 Dec 2007 18:03:35 +0000 (18:03 +0000)]
Add better panic message in getSRTInfo (Trac #1973)

12 years agoRemove obselete code for update-in-place (which we no longer do)
simonpj@microsoft.com [Thu, 20 Dec 2007 17:34:32 +0000 (17:34 +0000)]
Remove obselete code for update-in-place (which we no longer do)

12 years agoImplement generalised list comprehensions
simonpj@microsoft.com [Thu, 20 Dec 2007 11:13:00 +0000 (11:13 +0000)]
Implement generalised list comprehensions

  This patch implements generalised list comprehensions, as described in
  the paper "Comprehensive comprehensions" (Peyton Jones & Wadler, Haskell
  Workshop 2007).  If you don't use the new comprehensions, nothing
  should change.

  The syntax is not exactly as in the paper; see the user manual entry
  for details.

  You need an accompanying patch to the base library for this stuff
  to work.

  The patch is the work of Max Bolingbroke [batterseapower@hotmail.com],
  with some advice from Simon PJ.

  The related GHC Wiki page is
    http://hackage.haskell.org/trac/ghc/wiki/SQLLikeComprehensions

12 years agoMore bindist-publishing fixes and refactoring
Ian Lynagh [Tue, 18 Dec 2007 14:45:05 +0000 (14:45 +0000)]
More bindist-publishing fixes and refactoring

12 years agoFix publishing the docs
Ian Lynagh [Sun, 16 Dec 2007 12:25:44 +0000 (12:25 +0000)]
Fix publishing the docs

12 years agoFIX #1980: must check for ThreadRelocated in killThread#
Simon Marlow [Mon, 17 Dec 2007 16:46:10 +0000 (16:46 +0000)]
FIX #1980: must check for ThreadRelocated in killThread#

12 years agoEliminate external GMP dependencies
Manuel M T Chakravarty [Mon, 17 Dec 2007 09:38:39 +0000 (09:38 +0000)]
Eliminate external GMP dependencies
- Ensure the stage1 compiler uses ghc's own GMP library on Mac OS
- Need to rebuild installPackage and ifBuildable with stage1 compiler as they
  go into bindists

12 years agoInclude ~/Library/Frameworks in the framework searchpath
Ian Lynagh [Mon, 17 Dec 2007 23:34:57 +0000 (23:34 +0000)]
Include ~/Library/Frameworks in the framework searchpath
Patch from Christian Maeder

12 years agoMake ghcii.sh executable
Ian Lynagh [Mon, 17 Dec 2007 19:57:34 +0000 (19:57 +0000)]
Make ghcii.sh executable

12 years agoDon't rely on distrib/prep-bin-dist-mingw being executable
Ian Lynagh [Mon, 17 Dec 2007 19:55:54 +0000 (19:55 +0000)]
Don't rely on distrib/prep-bin-dist-mingw being executable

12 years agoalways try to remove the new file before restoring the old one (#1963)
Simon Marlow [Fri, 14 Dec 2007 12:33:45 +0000 (12:33 +0000)]
always try to remove the new file before restoring the old one (#1963)

12 years agoFix a bug in gen_contents_index
Ian Lynagh [Wed, 12 Dec 2007 12:11:54 +0000 (12:11 +0000)]
Fix a bug in gen_contents_index
The library doc index thought that the docs were in $module.html, rather
than $package/$module.html.

12 years agoFix lifting of case expressions
Roman Leshchinskiy [Sat, 15 Dec 2007 00:08:37 +0000 (00:08 +0000)]
Fix lifting of case expressions

We have to explicity check for empty arrays in each alternative as recursive
algorithms wouldn't terminate otherwise.

12 years agoUse (UArr Int) instead of PArray_Int# in vectorisation
Roman Leshchinskiy [Sat, 15 Dec 2007 00:07:39 +0000 (00:07 +0000)]
Use (UArr Int) instead of PArray_Int# in vectorisation

12 years agoFix bug in VectInfo loading
Roman Leshchinskiy [Fri, 14 Dec 2007 23:09:14 +0000 (23:09 +0000)]
Fix bug in VectInfo loading

12 years agoRemove unused vectorisation built-in
Roman Leshchinskiy [Fri, 14 Dec 2007 01:10:15 +0000 (01:10 +0000)]
Remove unused vectorisation built-in

12 years agoTreat some standard data cons specially during vectorisation
Roman Leshchinskiy [Thu, 13 Dec 2007 03:48:55 +0000 (03:48 +0000)]
Treat some standard data cons specially during vectorisation

This is a temporary hack which allows us to vectorise literals.

12 years agoMore vectorisation-related built ins
Roman Leshchinskiy [Thu, 13 Dec 2007 03:48:39 +0000 (03:48 +0000)]
More vectorisation-related built ins

12 years agoTrack changes to package ndp
Roman Leshchinskiy [Wed, 12 Dec 2007 06:27:14 +0000 (06:27 +0000)]
Track changes to package ndp

12 years agoAdd vectorisation built-ins
Roman Leshchinskiy [Wed, 12 Dec 2007 04:05:21 +0000 (04:05 +0000)]
Add vectorisation built-ins

12 years agoFIX #1963: catch Ctrl-C and clean up properly
Simon Marlow [Thu, 13 Dec 2007 15:40:56 +0000 (15:40 +0000)]
FIX #1963: catch Ctrl-C and clean up properly

12 years agoDocument the new threshold flags
Roman Leshchinskiy [Fri, 14 Dec 2007 00:30:03 +0000 (00:30 +0000)]
Document the new threshold flags

12 years agoSeparate and optional size thresholds for SpecConstr and LiberateCase
Roman Leshchinskiy [Fri, 14 Dec 2007 00:27:19 +0000 (00:27 +0000)]
Separate and optional size thresholds for SpecConstr and LiberateCase

This patch replaces -fspec-threshold by -fspec-constr-threshold and
-fliberate-case-threshold. The thresholds can be disabled by
-fno-spec-constr-threshold and -fno-liberate-case-threshold.

12 years agoMake HscTypes.tyThingId respond not panic on ADataCon
simonpj@microsoft.com [Tue, 4 Dec 2007 15:29:03 +0000 (15:29 +0000)]
Make HscTypes.tyThingId respond not panic on ADataCon

12 years agoUse Unix format for RnPat (no other change)
simonpj@microsoft.com [Thu, 13 Dec 2007 14:05:32 +0000 (14:05 +0000)]
Use Unix format for RnPat (no other change)

12 years agoImprove free-variable handling for rnPat and friends (fixes Trac #1972)
simonpj@microsoft.com [Thu, 13 Dec 2007 14:02:13 +0000 (14:02 +0000)]
Improve free-variable handling for rnPat and friends (fixes Trac #1972)

As well as fixing the immediate problem (Trac #1972) this patch does
a signficant simplification and refactoring of pattern renaming.

Fewer functions, fewer parameters passed....it's all good.  But it
took much longer than I expected to figure out.

The most significant change is that the NameMaker type does *binding*
as well as *making* and, in the matchNameMaker case, checks for unused
bindings as well.  This is much tider.

(No need to merge to the 6.8 branch, but no harm either.)

12 years agoAllow more than 3 simplifier iterations to be run in phase 0
Roman Leshchinskiy [Thu, 13 Dec 2007 04:08:35 +0000 (04:08 +0000)]
Allow more than 3 simplifier iterations to be run in phase 0

The number of iterations during the first run of phase 0 was erroneously
hardcoded to 3. It should be *at least* 3 (see comments in code) but can be
more.

12 years agoDocument -ddump-simpl-phases
Roman Leshchinskiy [Thu, 13 Dec 2007 04:08:22 +0000 (04:08 +0000)]
Document -ddump-simpl-phases

12 years agoNew flag: -ddump-simpl-phases
Roman Leshchinskiy [Thu, 13 Dec 2007 04:06:44 +0000 (04:06 +0000)]
New flag: -ddump-simpl-phases

This outputs the core after each simplifier phase (i.e., it produces less
information that -ddump-simpl-iterations).

12 years agoDon't dump simplifier iterations with -dverbose-core2core
Roman Leshchinskiy [Thu, 13 Dec 2007 03:46:35 +0000 (03:46 +0000)]
Don't dump simplifier iterations with -dverbose-core2core

SimonPJ says this is the correct behaviour. We still have
-ddump-simpl-iterations.

12 years ago"list --simple-output" should be quiet when there are no packages to list
Simon Marlow [Wed, 12 Dec 2007 10:22:30 +0000 (10:22 +0000)]
"list --simple-output" should be quiet when there are no packages to list

Previously:

$ ghc-pkg list --user --simple-output
ghc-pkg: no matches
$

Now:

$ ghc-pkg list --user --simple-output
$

12 years agoFix vectorisation bug
Roman Leshchinskiy [Thu, 6 Dec 2007 23:30:15 +0000 (23:30 +0000)]
Fix vectorisation bug

12 years agoVectorisation-related built ins
Roman Leshchinskiy [Thu, 6 Dec 2007 04:08:29 +0000 (04:08 +0000)]
Vectorisation-related built ins

12 years agoTeach vectorisation about some temporary conversion functions
Roman Leshchinskiy [Thu, 6 Dec 2007 03:25:47 +0000 (03:25 +0000)]
Teach vectorisation about some temporary conversion functions

12 years agoVectorise case of unit correctly
Roman Leshchinskiy [Wed, 5 Dec 2007 22:13:05 +0000 (22:13 +0000)]
Vectorise case of unit correctly

12 years agoTeach vectorisation about singletonP
Roman Leshchinskiy [Wed, 5 Dec 2007 22:12:40 +0000 (22:12 +0000)]
Teach vectorisation about singletonP

12 years agoOptimise desugaring of parallel array comprehensions
Roman Leshchinskiy [Wed, 5 Dec 2007 22:12:13 +0000 (22:12 +0000)]
Optimise desugaring of parallel array comprehensions

12 years agoTeach vectorisation about tuple datacons
Roman Leshchinskiy [Wed, 5 Dec 2007 05:02:21 +0000 (05:02 +0000)]
Teach vectorisation about tuple datacons

12 years agoTrack additions to package ndp
Roman Leshchinskiy [Wed, 5 Dec 2007 04:26:49 +0000 (04:26 +0000)]
Track additions to package ndp

12 years agoTrack changes to package ndp
Roman Leshchinskiy [Wed, 5 Dec 2007 03:38:59 +0000 (03:38 +0000)]
Track changes to package ndp

12 years agoImprove pretty-printing of InstDecl
simonpj@microsoft.com [Mon, 10 Dec 2007 08:30:53 +0000 (08:30 +0000)]
Improve pretty-printing of InstDecl

Fixes Trac #1966.

12 years agoComments only
Pepe Iborra [Sat, 8 Dec 2007 20:48:15 +0000 (20:48 +0000)]
Comments only

12 years agoRefactoring only
Pepe Iborra [Sat, 8 Dec 2007 19:52:22 +0000 (19:52 +0000)]
Refactoring only

Suspensions in the Term datatype used for RTTI
always get assigned a Type, so there is no reason
to juggle around with a (Maybe Type) anymore.

12 years agoChange the format used by :print to show the content of references
Pepe Iborra [Sat, 8 Dec 2007 19:30:13 +0000 (19:30 +0000)]
Change the format used by :print to show the content of references

    This comes as result of the short discussion linked below.

    http://www.haskell.org/pipermail/cvs-ghc/2007-December/040049.html

12 years agoHelp the user when she tries to do :history without :trace
Pepe Iborra [Sat, 8 Dec 2007 18:09:18 +0000 (18:09 +0000)]
Help the user when she tries to do :history without :trace

Teach GHCi to show a "perhaps you forgot to use :trace?" when
it finds that the user is trying to retrieve an empty :history

12 years agoPrevent the binding of unboxed things by :print
Pepe Iborra [Sat, 8 Dec 2007 18:18:30 +0000 (18:18 +0000)]
Prevent the binding of unboxed things by :print

12 years agoCoercions from boxy splitters must be sym'ed in pattern matches
Manuel M T Chakravarty [Sat, 8 Dec 2007 10:50:18 +0000 (10:50 +0000)]
Coercions from boxy splitters must be sym'ed in pattern matches

12 years agoProperly keep track of whether normalising given or wanted dicts
Manuel M T Chakravarty [Fri, 7 Dec 2007 07:13:02 +0000 (07:13 +0000)]
Properly keep track of whether normalising given or wanted dicts
- The information of whether given or wanted class dictionaries where
  normalised by rewriting wasn't always correctly propagated in TcTyFuns,
  which lead to malformed dictionary bindings.
- Also fixes a bug in TcPat.tcConPat where GADT equalities where emitted in
  the wrong position in case bindings (which led to CoreLint failures).

12 years agoTcPat.tcConPat uses equalities instead of GADT refinement
Manuel M T Chakravarty [Tue, 20 Nov 2007 07:12:08 +0000 (07:12 +0000)]
TcPat.tcConPat uses equalities instead of GADT refinement
* This patch implements the use of equality constraints instead of GADT
  refinements that we have been discussing for a while.
* It just changes TcPat.tcConPat.  It doesn't have any of the simplification
  and dead code removal that is possible due to this change.
* At the moment, this patch breaks a fair number of GADT regression tests.

12 years agoUse installPackage for register --inplace as well as installing
Ian Lynagh [Fri, 7 Dec 2007 23:46:52 +0000 (23:46 +0000)]
Use installPackage for register --inplace as well as installing
We also need to do the GHC.Prim hack when registering inplace or the
tests that use it fail.

12 years agoFix the libraries Makefile
Ian Lynagh [Wed, 5 Dec 2007 12:50:15 +0000 (12:50 +0000)]
Fix the libraries Makefile
    x && y
is not the same as
    if x; then y; fi
as the latter doesn't fail when x fails

12 years agoCopy hscolour.css into dist/... so it gets installed with the library docs
Ian Lynagh [Wed, 5 Dec 2007 01:37:03 +0000 (01:37 +0000)]
Copy hscolour.css into dist/... so it gets installed with the library docs

12 years agoAdd the hscolour.css from hscolour 1.8
Ian Lynagh [Wed, 5 Dec 2007 01:17:33 +0000 (01:17 +0000)]
Add the hscolour.css from hscolour 1.8

12 years agoBIN_DIST_INST_SUBDIR Needs to be defined in config.mk so ./Makefile can see it
Ian Lynagh [Fri, 7 Dec 2007 12:13:17 +0000 (12:13 +0000)]
BIN_DIST_INST_SUBDIR Needs to be defined in config.mk so ./Makefile can see it

12 years ago#include ../includes/MachRegs.h rather than just MachRegs.h
Ian Lynagh [Wed, 5 Dec 2007 17:03:35 +0000 (17:03 +0000)]
#include ../includes/MachRegs.h rather than just MachRegs.h
This fixes building on NixOS. I'm not sure why it worked everywhere else,
but not on NixOS, before.

12 years agoFix bindist creation: readline/config.mk is gone
Ian Lynagh [Mon, 3 Dec 2007 12:30:31 +0000 (12:30 +0000)]
Fix bindist creation: readline/config.mk is gone

12 years agoFIX #1843: Generate different instructions on PPC
Ian Lynagh [Mon, 3 Dec 2007 12:32:37 +0000 (12:32 +0000)]
FIX #1843: Generate different instructions on PPC
The old ones caused lots of
    unknown scattered relocation type 4
errors. Patch from Chris Kuklewicz.

12 years agoRefactor gen_contents_index
Ian Lynagh [Fri, 7 Dec 2007 18:35:38 +0000 (18:35 +0000)]
Refactor gen_contents_index
Also fixes it with Solaris's sh, spotted by Christian Maeder

12 years agoUse GHC.Exts rather than GHC.Prim
Ian Lynagh [Sun, 2 Dec 2007 23:42:22 +0000 (23:42 +0000)]
Use GHC.Exts rather than GHC.Prim

12 years agoAlter the base:GHC.Prim hack in installPackage, following changes in base
Ian Lynagh [Sun, 2 Dec 2007 21:57:19 +0000 (21:57 +0000)]
Alter the base:GHC.Prim hack in installPackage, following changes in base

12 years agoRemove debug warning, and explain why
simonpj@microsoft.com [Fri, 7 Dec 2007 17:05:07 +0000 (17:05 +0000)]
Remove debug warning, and explain why

12 years agocomment only
Simon Marlow [Thu, 6 Dec 2007 09:24:22 +0000 (09:24 +0000)]
comment only

12 years agocomment typo
Simon Marlow [Thu, 6 Dec 2007 09:24:12 +0000 (09:24 +0000)]
comment typo

12 years agoadd Outputable instance for OccIfaceEq
Simon Marlow [Thu, 6 Dec 2007 09:24:03 +0000 (09:24 +0000)]
add Outputable instance for OccIfaceEq

12 years agoWorkaround for #1959: assume untracked names have changed
Simon Marlow [Thu, 6 Dec 2007 09:23:49 +0000 (09:23 +0000)]
Workaround for #1959: assume untracked names have changed
This fixes the 1959 test, but will do more recompilation than is
strictly necessary (but only when -O is on).  Still, more
recompilation is better than segfaults, link errors or other random
breakage.

12 years agoFIX part of #1959: declaration versions were not being incremented correctly
Simon Marlow [Thu, 6 Dec 2007 08:45:56 +0000 (08:45 +0000)]
FIX part of #1959: declaration versions were not being incremented correctly
We were building a mapping from ModuleName to [Occ] from the usage
list, using the usg_mod field as the key.  Unfortunately, due to a
very poor naming decision, usg_mod is actually the module version, not
the ModuleName.  usg_name is the ModuleName.  Since Version is also an
instance of Uniquable, there was no type error: all that happened was
lookups in the map never succeeded.  I shall rename the fields of
Usage in a separate patch.

This doesn't completely fix #1959, but it gets part of the way there.

I have to take partial blame as the person who wrote this fragment of
code in late 2006 (patch "Interface file optimisation and removal of
nameParent").

12 years agomove FP_FIND_ROOT after the "GHC is required" check
Simon Marlow [Wed, 5 Dec 2007 10:18:14 +0000 (10:18 +0000)]
move FP_FIND_ROOT after the "GHC is required" check

12 years agoFIX #1110: hackery also needed when running gcc for CPP
Simon Marlow [Wed, 5 Dec 2007 15:02:30 +0000 (15:02 +0000)]
FIX #1110: hackery also needed when running gcc for CPP

12 years agoTeach :print to follow references (STRefs and IORefs)
Pepe Iborra [Tue, 4 Dec 2007 10:55:11 +0000 (10:55 +0000)]
Teach :print to follow references (STRefs and IORefs)

Prelude Data.IORef> :p l
l = (_t4::Maybe Integer) : (_t5::[Maybe Integer])
Prelude Data.IORef> p <- newIORef l
Prelude Data.IORef> :p p
p = GHC.IOBase.IORef (GHC.STRef.STRef {((_t6::Maybe Integer) :
                                        (_t7::[Maybe Integer]))})
Prelude Data.IORef> :sp p
p = GHC.IOBase.IORef (GHC.STRef.STRef {(_ : _)})

I used braces to denote the contents of a reference.
Perhaps there is a more appropriate notation?

12 years agorefactoring only
Pepe Iborra [Sun, 2 Dec 2007 12:54:00 +0000 (12:54 +0000)]
refactoring only

12 years agoChange --shared to -shared in Win32 DLL docs
simonpj@microsoft.com [Tue, 4 Dec 2007 15:40:23 +0000 (15:40 +0000)]
Change --shared to -shared in Win32 DLL docs

12 years agoprotect console handler against concurrent access (#1922)
Simon Marlow [Tue, 4 Dec 2007 15:39:18 +0000 (15:39 +0000)]
protect console handler against concurrent access (#1922)

12 years agoMake eta reduction check more carefully for bottoms (fix Trac #1947)
simonpj@microsoft.com [Tue, 4 Dec 2007 14:58:03 +0000 (14:58 +0000)]
Make eta reduction check more carefully for bottoms (fix Trac #1947)

Eta reduction was wrongly transforming
f = \x. f x
to
f = f

Solution: don't trust f's arity information; instead look at its
unfolding.  See Note [Eta reduction conditions]

Almost all the new lines are comments!

12 years agoImprove inlining for INLINE non-functions
simonpj@microsoft.com [Tue, 4 Dec 2007 11:49:55 +0000 (11:49 +0000)]
Improve inlining for INLINE non-functions

(No need to merge to 6.8, but no harm if a subsequent patch needs it.)

The proximate cause for this patch is to improve the inlining for INLINE
things that are not functions; this came up in the NDP project.  See
Note [Lone variables] in CoreUnfold.

This caused some refactoring that actually made things simpler.  In
particular, more of the inlining logic has moved from SimplUtils to
CoreUnfold, where it belongs.

12 years agofix race conditions in sandboxIO (#1583, #1922, #1946)
Simon Marlow [Tue, 4 Dec 2007 11:44:44 +0000 (11:44 +0000)]
fix race conditions in sandboxIO (#1583, #1922, #1946)
using the new block-inheriting forkIO (#1048)

12 years ago:cd with no argument goes to the user's home directory
Simon Marlow [Tue, 4 Dec 2007 11:39:45 +0000 (11:39 +0000)]
:cd with no argument goes to the user's home directory
Seems better than getting a confusing 'cannot find directory' exception.

12 years agoforkIO starts the new thread blocked if the parent is blocked (#1048)
Simon Marlow [Tue, 4 Dec 2007 11:09:47 +0000 (11:09 +0000)]
forkIO starts the new thread blocked if the parent is blocked (#1048)

12 years agoImprove eta reduction, to reduce Simplifier iterations
simonpj@microsoft.com [Mon, 3 Dec 2007 15:00:39 +0000 (15:00 +0000)]
Improve eta reduction, to reduce Simplifier iterations

I finally got around to investigating why the Simplifier was sometimes
iterating so often.  There's a nice example in Text.ParserCombinators.ReadPrec,
which produced:

NOTE: Simplifier still going after 3 iterations; bailing out.  Size = 339
NOTE: Simplifier still going after 3 iterations; bailing out.  Size = 339
NOTE: Simplifier still going after 3 iterations; bailing out.  Size = 339

No progress is being made.  It turned out that an interaction between
eta-expansion, casts, and eta reduction was responsible. The change is
small and simple, in SimplUtils.mkLam: do not require the body to be
a Lam when floating the cast outwards.

I also discovered a missing side condition in the same equation, so fixing
that is good too.  Now there is no loop when compiling ReadPrec.

Should do a full nofib run though.

12 years agoDon't default to stripping binaries when installing
Ian Lynagh [Sun, 2 Dec 2007 19:58:17 +0000 (19:58 +0000)]
Don't default to stripping binaries when installing