ghc-hetmet.git
16 years agoMERGED: Set interfacedir (using $topdir, not $httptopdir)
Ian Lynagh [Sat, 3 Nov 2007 18:08:03 +0000 (18:08 +0000)]
MERGED: Set interfacedir (using $topdir, not $httptopdir)
Mon Oct 29 10:48:25 PDT 2007  Ian Lynagh <igloo@earth.li>

16 years agoTeach ghc-pkg about $httptopdir
Ian Lynagh [Mon, 29 Oct 2007 16:11:30 +0000 (16:11 +0000)]
Teach ghc-pkg about $httptopdir

16 years agoMERGED: installPackage needs to treat $httptopdir the same as $topdir
Ian Lynagh [Sat, 3 Nov 2007 18:02:59 +0000 (18:02 +0000)]
MERGED: installPackage needs to treat $httptopdir the same as $topdir
Sun Oct 28 06:45:34 PDT 2007  Ian Lynagh <igloo@earth.li>

16 years agoMERGED: Define and use $httptopdir for the haddock docs locations
Ian Lynagh [Sat, 3 Nov 2007 18:00:23 +0000 (18:00 +0000)]
MERGED: Define and use $httptopdir for the haddock docs locations
Sun Oct 28 05:35:52 PDT 2007  Ian Lynagh <igloo@earth.li>

16 years agoWe need to copy .buildinfo files into the bindists
Ian Lynagh [Sun, 28 Oct 2007 13:17:52 +0000 (13:17 +0000)]
We need to copy .buildinfo files into the bindists

16 years ago(>>>) now comes from GHC.Desugar
Simon Marlow [Fri, 2 Nov 2007 15:59:54 +0000 (15:59 +0000)]
(>>>) now comes from GHC.Desugar

16 years agoRefactor error recovery slightly
simonpj@microsoft.com [Fri, 2 Nov 2007 13:01:15 +0000 (13:01 +0000)]
Refactor error recovery slightly

Mostly this patch is refacoring, but it also avoids post-tc zonking if
the typechecker found errors.  This is good because otherwise with
DEBUG you can get the "Inventing strangely-kinded TyCon" warning.

16 years agoAvoid Haddock bug #1821
simonpj@microsoft.com [Fri, 2 Nov 2007 13:00:43 +0000 (13:00 +0000)]
Avoid Haddock bug #1821

16 years agoUpdate error message to mention -XPatternSignatures instead of -fglasgow-exts
simonpj@microsoft.com [Thu, 1 Nov 2007 18:03:02 +0000 (18:03 +0000)]
Update error message to mention -XPatternSignatures instead of -fglasgow-exts

16 years agoRejig the error messages a bit; fixes a minor bug
simonpj@microsoft.com [Thu, 1 Nov 2007 17:50:22 +0000 (17:50 +0000)]
Rejig the error messages a bit; fixes a minor bug

The type checker was only reporting the first message if an equality
failed to match.  This patch does a bit of refactoring and fixes the
bug, which was in the bogus use of eqInstMisMatch
in tcSimplify.report_no_instances.b

This is really a bug in 6.8 too, so this would be good to merge across
to the 6.8 branch.

16 years agoRefactor Haddock options
David Waern [Thu, 1 Nov 2007 13:17:57 +0000 (13:17 +0000)]
Refactor Haddock options

This patch renames the DOC_OPTIONS pragma to OPTIONS_HADDOCK. It also
adds "-- # ..."-style Haddock option pragmas, for compatibility with
code that use them.

Another change is that both of these two pragmas behave like
OPTIONS_GHC, i.e. they are only allowed at the top of the module, they
are ignored everywhere else and they are stored in the dynflags. There is
no longer any Haddock options in HsSyn.

Please merge this to the 6.8.2 branch when 6.8.1 is out, if appropriate.

16 years agoclean ghci-inplace
Simon Marlow [Wed, 31 Oct 2007 09:39:32 +0000 (09:39 +0000)]
clean ghci-inplace

16 years agoclean Haddock droppings
Simon Marlow [Wed, 31 Oct 2007 09:39:23 +0000 (09:39 +0000)]
clean Haddock droppings

16 years agoFix warning in OSMem for darwin
Manuel M T Chakravarty [Tue, 30 Oct 2007 13:30:03 +0000 (13:30 +0000)]
Fix warning in OSMem for darwin

16 years agoFIX BUILD: a glitch in the new rules and inlining stuff
simonpj@microsoft.com [Tue, 30 Oct 2007 11:38:57 +0000 (11:38 +0000)]
FIX BUILD: a glitch in the new rules and inlining stuff

Don't re-add the worker info to a binder until completeBind. It's not
needed in its own RHS, and it may be replaced, via the substitution
following postInlineUnconditionally.

(Fixes build of the stage2 compiler which fell over when Coercion.lhs
was being compiled.)

16 years agoFix LiberateCase
simonpj@microsoft.com [Mon, 29 Oct 2007 17:06:20 +0000 (17:06 +0000)]
Fix LiberateCase

Merge to STABLE please

Liberate case was being far too gung-ho about what to specialise. This
bug only showed up when a recursive function 'f' has a nested recursive
function 'g', where 'g' calls 'f' (as well as recursively calling 'g').
This exact situation happens in GHC/IO.writeLines.

This patch puts things right; see Note [When to specialise].  Result:
much less code bloat.

16 years agoImprove error-message output slightly
simonpj@microsoft.com [Mon, 29 Oct 2007 16:26:37 +0000 (16:26 +0000)]
Improve error-message output slightly

16 years agoImprove documentation of orphan instances (thanks to Adrian Hey)
simonpj@microsoft.com [Mon, 29 Oct 2007 16:25:05 +0000 (16:25 +0000)]
Improve documentation of orphan instances (thanks to Adrian Hey)

Please push to stable branch

Simon

16 years agofix installation of haddock.css and friends
Simon Marlow [Mon, 29 Oct 2007 12:07:32 +0000 (12:07 +0000)]
fix installation of haddock.css and friends

16 years agoIn a pattern binding, a type sig in the pattern cannot bind a type variable
simonpj@microsoft.com [Sat, 27 Oct 2007 15:33:30 +0000 (15:33 +0000)]
In a pattern binding, a type sig in the pattern cannot bind a type variable

In a pattern binding with a pattern type signature, such as

(Just (x::a)) = e

the pattern type signature cannot bind type variables.  Hence
'a' must be in scope already for the above example to be legal.

This has been the situation for some time, but Dan changed it when
adding view patterns.  This one-line change restores the old behaviour.

16 years agoSubstantial improvement to the interaction of RULES and inlining
simonpj@microsoft.com [Mon, 29 Oct 2007 11:10:56 +0000 (11:10 +0000)]
Substantial improvement to the interaction of RULES and inlining

(Merge to 6.8 branch after testing.)

There were a number of delicate interactions between RULEs and inlining
in GHC 6.6.  I've wanted to fix this for a long time, and some perf
problems in the 6.8 release candidate finally forced me over the edge!

The issues are documented extensively in OccurAnal, Note [Loop breaking
and RULES], and I won't duplicate them here.  (Many of the extra lines in
OccurAnal are comments!)

This patch resolves Trac bugs #1709, #1794, #1763, I believe.

16 years agoAdd newline in debug print
simonpj@microsoft.com [Fri, 26 Oct 2007 15:02:24 +0000 (15:02 +0000)]
Add newline in debug print

16 years agoExplicit pattern match in default case of addTickLHsBind
simonpj@microsoft.com [Wed, 24 Oct 2007 13:48:28 +0000 (13:48 +0000)]
Explicit pattern match in default case of addTickLHsBind

16 years agoGeneralise the types of mk_FunBind, mk_easy_FunBind, mkVarBind
simonpj@microsoft.com [Wed, 24 Oct 2007 13:47:50 +0000 (13:47 +0000)]
Generalise the types of mk_FunBind, mk_easy_FunBind, mkVarBind

16 years agoFix the build with GHC < 6.4 (foldl1' didn't exist)
Ian Lynagh [Sat, 27 Oct 2007 21:05:26 +0000 (21:05 +0000)]
Fix the build with GHC < 6.4 (foldl1' didn't exist)

16 years agoFix the build with GHC < 6.4 (foldl1' didn't exist)
Ian Lynagh [Sat, 27 Oct 2007 21:05:26 +0000 (21:05 +0000)]
Fix the build with GHC < 6.4 (foldl1' didn't exist)

16 years agoMERGED: We need to install-docs when making the Windows bindist
Ian Lynagh [Sat, 27 Oct 2007 20:32:20 +0000 (20:32 +0000)]
MERGED: We need to install-docs when making the Windows bindist

16 years agoWe need to set _way=* in rts/ both when making and installing bindists
Ian Lynagh [Sat, 27 Oct 2007 14:29:14 +0000 (14:29 +0000)]
We need to set _way=* in rts/ both when making and installing bindists
This is a hack, but it means we get libHSrts*.a etc rather than just
libHSrts.a.

16 years agoFix a whole heap of speling errrs in the docs
Josef Svenningsson [Sun, 7 Oct 2007 21:38:58 +0000 (21:38 +0000)]
Fix a whole heap of speling errrs in the docs

16 years agoOnly build/install the man page if XSLTPROC is defined
Ian Lynagh [Sat, 27 Oct 2007 12:21:55 +0000 (12:21 +0000)]
Only build/install the man page if XSLTPROC is defined

16 years agoinstall the Cabal docs, and make them show up in a binary distribution
Simon Marlow [Fri, 26 Oct 2007 12:24:56 +0000 (12:24 +0000)]
install the Cabal docs, and make them show up in a binary distribution

16 years agocp => $(CP)
Simon Marlow [Fri, 26 Oct 2007 11:10:54 +0000 (11:10 +0000)]
cp => $(CP)

16 years agoget rid of the html subdirectory under share/doc/ghc/users_guide
Simon Marlow [Fri, 26 Oct 2007 11:09:19 +0000 (11:09 +0000)]
get rid of the html subdirectory under share/doc/ghc/users_guide

16 years agoMake 'improvement' work properly in TcSimplify
simonpj@microsoft.com [Sat, 27 Oct 2007 15:54:59 +0000 (15:54 +0000)]
Make 'improvement' work properly in TcSimplify

(Please merge this, and the preceding
handful from me to the 6.8 branch.)

This patch fixes a serious problem in the type checker, whereby
TcSimplify was going into a loop because it thought improvement
had taken place, but actually the unificataion was actually deferred.

We thereby fix Trac #1781, #1783, #1795, and #1797!

In fixing this I found what a mess TcSimplify.reduceContext is!
We need to fix this.

The main idea is to replace the "improvement flag" in Avails with
a simpler and more direct test: have any of the mutable type variables
in the (zonked) 'given' or 'irred' constraints been filled in?
This test uses the new function TcMType.isFilledMetaTyVar; the test
itself is towards the end of reduceContext.

I fixed a variety of other infelicities too, and left some ToDos.

16 years agoAn implication constraint can abstract over EqInsts
simonpj@microsoft.com [Sat, 27 Oct 2007 15:54:33 +0000 (15:54 +0000)]
An implication constraint can abstract over EqInsts

16 years agoIn an AbsBinds, the 'dicts' can include EqInsts
simonpj@microsoft.com [Sat, 27 Oct 2007 15:49:03 +0000 (15:49 +0000)]
In an AbsBinds, the 'dicts' can include EqInsts

An AbsBinds abstrats over evidence, and the evidence can be both
Dicts (class constraints, implicit parameters) and EqInsts (equality
constraints).  So we need to
  - use varType rather than idType
  - use instToVar rather than instToId
  - use zonkDictBndr rather than zonkIdBndr in zonking

It actually all worked before, but gave warnings.

16 years agoMore notes
simonpj@microsoft.com [Sat, 27 Oct 2007 15:47:02 +0000 (15:47 +0000)]
More notes

16 years agoComments only
simonpj@microsoft.com [Sat, 27 Oct 2007 15:46:42 +0000 (15:46 +0000)]
Comments only

16 years agoAdd anyM to IOEnv
simonpj@microsoft.com [Sat, 27 Oct 2007 15:45:51 +0000 (15:45 +0000)]
Add anyM to IOEnv

16 years agoAdd a note to NOTES
simonpj@microsoft.com [Sat, 27 Oct 2007 10:02:20 +0000 (10:02 +0000)]
Add a note to NOTES

16 years agoMake compileToCore return the module name and type environment along with bindings
Tim Chevalier [Sat, 27 Oct 2007 10:05:30 +0000 (10:05 +0000)]
Make compileToCore return the module name and type environment along with bindings

  compileToCore returned just a list of CoreBind, which isn't enough,
since to do anything with the resulting Core code, you probably also
want the type declarations. I left compileToCore as it is, but added a
function compileToCoreModule that returns a complete Core module (with
module name, type environment, and bindings). I'm not sure that
returning the type environment is the best way to represent the type
declarations for the given module, but I don't want to reinvent the
External Core wheel for this.

16 years agobinary-dist: Makefile-vars needs HADDOCK_DOCS=YES
Simon Marlow [Thu, 25 Oct 2007 13:58:16 +0000 (13:58 +0000)]
binary-dist: Makefile-vars needs HADDOCK_DOCS=YES

16 years agofix the links in the library documentation index
Simon Marlow [Thu, 25 Oct 2007 15:22:45 +0000 (15:22 +0000)]
fix the links in the library documentation index

16 years agodefault to installing runhaskell and hsc2hs again, but provide knobs to turn them off
Simon Marlow [Thu, 25 Oct 2007 08:42:22 +0000 (08:42 +0000)]
default to installing runhaskell and hsc2hs again, but provide knobs to turn them off

16 years agoAdding hpc documentation about sum and map, push to STABLE.
andy@unsafeperformio.com [Thu, 25 Oct 2007 05:03:41 +0000 (05:03 +0000)]
Adding hpc documentation about sum and map, push to STABLE.

16 years agoFixing typo in runtime documentation for hpc, push to stable
andy@unsafeperformio.com [Thu, 25 Oct 2007 04:54:56 +0000 (04:54 +0000)]
Fixing typo in runtime documentation for hpc, push to stable

16 years agoCorrect a comment
Ian Lynagh [Wed, 24 Oct 2007 11:45:49 +0000 (11:45 +0000)]
Correct a comment

16 years agoFix ghc package in bindists; it wasn't adding the depenedency on readline
Ian Lynagh [Wed, 24 Oct 2007 12:06:33 +0000 (12:06 +0000)]
Fix ghc package in bindists; it wasn't adding the depenedency on readline

16 years agoFix installing the ghc package .hi files in a bindist
Ian Lynagh [Wed, 24 Oct 2007 11:42:19 +0000 (11:42 +0000)]
Fix installing the ghc package .hi files in a bindist

16 years agoBuild the manpage when building, not when installing
Ian Lynagh [Wed, 24 Oct 2007 11:29:14 +0000 (11:29 +0000)]
Build the manpage when building, not when installing

16 years agoHack to make sure we get all the RTS ways in bindists
Ian Lynagh [Wed, 24 Oct 2007 00:41:55 +0000 (00:41 +0000)]
Hack to make sure we get all the RTS ways in bindists

16 years agoFix installing the documentation in the bindists
Ian Lynagh [Tue, 23 Oct 2007 23:46:24 +0000 (23:46 +0000)]
Fix installing the documentation in the bindists

16 years ago-ftype-families -> -XTypeFamilies
Ian Lynagh [Wed, 24 Oct 2007 14:28:28 +0000 (14:28 +0000)]
-ftype-families -> -XTypeFamilies

16 years agoFIX #1791: fail with out-of-heap when allocating more than the max heap size in one go
Simon Marlow [Wed, 24 Oct 2007 09:54:20 +0000 (09:54 +0000)]
FIX #1791: fail with out-of-heap when allocating more than the max heap size in one go
Normally the out-of-heap check is performed post-GC, but there are
cases where we can detect earlier that we definitely have exhausted
the heap size limit.

16 years agoFix more warnings
Simon Marlow [Tue, 23 Oct 2007 13:13:51 +0000 (13:13 +0000)]
Fix more warnings

16 years agoFIX BUILD (on 32-bit platforms): hs_hpc_module() type mismatch
Simon Marlow [Tue, 23 Oct 2007 08:22:33 +0000 (08:22 +0000)]
FIX BUILD (on 32-bit platforms): hs_hpc_module() type mismatch

16 years agopatch from #1782; fixes check-packages target on Solaris
Simon Marlow [Mon, 22 Oct 2007 13:33:37 +0000 (13:33 +0000)]
patch from #1782; fixes check-packages target on Solaris

16 years agoadd PIC relocations for x86_64, and use a simpler hack in place of x86_64_high_symbol()
Simon Marlow [Thu, 18 Oct 2007 12:52:20 +0000 (12:52 +0000)]
add PIC relocations for x86_64, and use a simpler hack in place of x86_64_high_symbol()
This is Wolfgang Thaller's patch sent to cvs-ghc recently, with extra
commentary by me.  It turns out that this patch is not just a cleanup,
it is also necessary for GHCi to work on x86_64 with shared libraries,
because previously lookupSymbol() was creating jump-table entries for
all symbols looked up that resolved outside 2Gb, whereas Wolfgang's
version only generates jump-table entries for 32-bit symbol references
in object code that we load.

16 years agofix creation of ghc-inplace for non-std ways
Simon Marlow [Wed, 17 Oct 2007 15:28:20 +0000 (15:28 +0000)]
fix creation of ghc-inplace for non-std ways

16 years agoremove an incorrect assertion
Simon Marlow [Tue, 16 Oct 2007 15:18:29 +0000 (15:18 +0000)]
remove an incorrect assertion

16 years agosecond attempt to fix C compiler warnings with -fhpc
Simon Marlow [Fri, 19 Oct 2007 13:32:43 +0000 (13:32 +0000)]
second attempt to fix C compiler warnings with -fhpc
The hs_hpc_module() prototype in RtsExternal.h didn't match its usage:
we were passing StgWord-sized parameters but the prototype used C
ints.  I think it accidentally worked because we only ever passed
constants that got promoted.  The constants unfortunately were
sometimes negative, which caused the C compiler to emit warnings.

I suspect PprC.pprHexVal may be wrong to emit negative constants in
the generated C, but I'm not completely sure.  Anyway, it's easy to
fix this in CgHpc, which is what I've done.

16 years agoZonk quantified tyvars with skolems
Manuel M T Chakravarty [Fri, 19 Oct 2007 11:56:53 +0000 (11:56 +0000)]
Zonk quantified tyvars with skolems

We used to zonk quantified type variables to regular TyVars.  However, this
leads to problems.  Consider this program from the regression test suite:

  eval :: Int -> String -> String -> String
  eval 0 root actual = evalRHS 0 root actual

  evalRHS :: Int -> a
  evalRHS 0 root actual = eval 0 root actual

It leads to the deferral of an equality

  (String -> String -> String) ~ a

which is propagated up to the toplevel (see TcSimplify.tcSimplifyInferCheck).
In the meantime `a' is zonked and quantified to form `evalRHS's signature.
This has the *side effect* of also zonking the `a' in the deferred equality
(which at this point is being handed around wrapped in an implication
constraint).

Finally, the equality (with the zonked `a') will be handed back to the
simplifier by TcRnDriver.tcRnSrcDecls calling TcSimplify.tcSimplifyTop.
If we zonk `a' with a regular type variable, we will have this regular type
variable now floating around in the simplifier, which in many places assumes to
only see proper TcTyVars.

We can avoid this problem by zonking with a skolem.  The skolem is rigid
(which we requirefor a quantified variable), but is still a TcTyVar that the
simplifier knows how to deal with.

16 years agoFix typo that prevented zonking of rhs of EqInsts
Manuel M T Chakravarty [Thu, 18 Oct 2007 13:10:40 +0000 (13:10 +0000)]
Fix typo that prevented zonking of rhs of EqInsts

MERGE TO STABLE

16 years agoimplement #1468, :browse on its own uses the currently-loaded module
Simon Marlow [Fri, 19 Oct 2007 11:57:51 +0000 (11:57 +0000)]
implement #1468, :browse on its own uses the currently-loaded module

16 years agoFIX #1784: EM_AMD64 and EM_X86_64 might both be defined to the same value
Simon Marlow [Fri, 19 Oct 2007 11:02:23 +0000 (11:02 +0000)]
FIX #1784: EM_AMD64 and EM_X86_64 might both be defined to the same value

16 years agoTell Cabal what it's version number is while bootstrapping it
Duncan Coutts [Thu, 18 Oct 2007 22:21:28 +0000 (22:21 +0000)]
Tell Cabal what it's version number is while bootstrapping it
This means that it'll work with all the packages that specify a cabal-version

16 years agoFIX #1450: asynchronous exceptions are now printed by +RTS -xc
Simon Marlow [Thu, 18 Oct 2007 13:49:51 +0000 (13:49 +0000)]
FIX #1450: asynchronous exceptions are now printed by +RTS -xc

16 years agofix -fbreak-on-exception for unregsterised
Simon Marlow [Thu, 18 Oct 2007 11:06:21 +0000 (11:06 +0000)]
fix -fbreak-on-exception for unregsterised

16 years agofix :print when !tablesNextToCode
Simon Marlow [Thu, 18 Oct 2007 10:53:40 +0000 (10:53 +0000)]
fix :print when !tablesNextToCode

16 years agofix breakpoints in unregisterised mode
Simon Marlow [Thu, 18 Oct 2007 10:19:29 +0000 (10:19 +0000)]
fix breakpoints in unregisterised mode

16 years agoChange some ints to unsigned ints
Simon Marlow [Thu, 18 Oct 2007 09:55:03 +0000 (09:55 +0000)]
Change some ints to unsigned ints
Fixes some gratuitous warnings when compiling via C with -fhpc

16 years agofix warnings when compiling via C
Simon Marlow [Thu, 18 Oct 2007 09:54:17 +0000 (09:54 +0000)]
fix warnings when compiling via C

16 years agorollback "accounting wibble: we were missing an alloc_blocks .. "
Simon Marlow [Thu, 18 Oct 2007 09:44:15 +0000 (09:44 +0000)]
rollback "accounting wibble: we were missing an alloc_blocks .. "
I misread the code, now added a comment to explain why it isn't necessary

16 years agorecordMutable: test for gen>0 before calling recordMutableCap
Simon Marlow [Wed, 17 Oct 2007 12:56:57 +0000 (12:56 +0000)]
recordMutable: test for gen>0 before calling recordMutableCap
For some reason the C-- version of recordMutable wasn't verifying that
the object was in an old generation before attempting to add it to the
mutable list, and this broke maessen_hashtab.  This version of
recordMutable is only used in unsafeThaw#.

16 years agore-instate missing parts of "put the @N suffix on stdcall foreign calls in .cmm code"
Simon Marlow [Wed, 17 Oct 2007 14:40:07 +0000 (14:40 +0000)]
re-instate missing parts of "put the @N suffix on stdcall foreign calls in .cmm code"
These changes were apparently lost during "massive changes to add a
'zipper' representation of C-"

16 years agoDon't barf on error message with non-tc tyvars
Manuel M T Chakravarty [Thu, 18 Oct 2007 06:03:36 +0000 (06:03 +0000)]
Don't barf on error message with non-tc tyvars

MERGE TO STABLE

16 years agoFix deferring on tyvars in TcUnify.subFunTys
Manuel M T Chakravarty [Thu, 18 Oct 2007 04:43:52 +0000 (04:43 +0000)]
Fix deferring on tyvars in TcUnify.subFunTys

16 years agoTcUnify.subFunTys must take type families into account
Manuel M T Chakravarty [Wed, 17 Oct 2007 11:43:26 +0000 (11:43 +0000)]
TcUnify.subFunTys must take type families into account
* A bug reported by Andrew Appleyard revealed that subFunTys did take
  neither type families nor equalities into account.  In a fairly obscure
  case there was also a coercion ignored.

16 years agoRefactoring: extract platform-specific code from sm/MBlock.c
Simon Marlow [Wed, 17 Oct 2007 13:41:45 +0000 (13:41 +0000)]
Refactoring: extract platform-specific code from sm/MBlock.c
Also common-up some duplicate bits in the platform-specific code

16 years agofix an error message (barf -> sysErrorBelch)
Simon Marlow [Wed, 17 Oct 2007 12:18:55 +0000 (12:18 +0000)]
fix an error message (barf -> sysErrorBelch)

16 years agofix warning on Windows
Simon Marlow [Wed, 17 Oct 2007 12:16:45 +0000 (12:16 +0000)]
fix warning on Windows

16 years agoDon't clean gmp when validating (speeds up validation on Windows)
Simon Marlow [Wed, 17 Oct 2007 10:09:08 +0000 (10:09 +0000)]
Don't clean gmp when validating (speeds up validation on Windows)

16 years agodocument float2Int# and double2Int#
Simon Marlow [Tue, 25 Sep 2007 12:11:39 +0000 (12:11 +0000)]
document float2Int# and double2Int#

16 years agoUpdate HsExpr.hi-boot-6 for view pattern changes
simonpj@microsoft.com [Wed, 17 Oct 2007 12:02:12 +0000 (12:02 +0000)]
Update HsExpr.hi-boot-6 for view pattern changes

16 years agoFix #1709: do not expose the worker for a loop-breaker
simonpj@microsoft.com [Tue, 16 Oct 2007 13:18:40 +0000 (13:18 +0000)]
Fix #1709: do not expose the worker for a loop-breaker

The massive 'Uni' program produced a situation in which a function that
had a worker/wrapper split was chosen as a loop breaker.  If the worker
is exposed in the interface file, then an importing module may go into
an inlining loop: see comments on TidyPgm.tidyWorker.

This patch fixes the inlining bug.  The code that gives rise to this
bizarre case is still not good (it's a bunch of implication constraints
and we are choosing a bad loop breaker) but the first thing is to fix the
bug.

It's rather hard to produce a test case!

Please merge to the 6.8 branch.

16 years agoFix #1662: do not simplify constraints for vanilla pattern matches
simonpj@microsoft.com [Tue, 16 Oct 2007 12:47:10 +0000 (12:47 +0000)]
Fix #1662: do not simplify constraints for vanilla pattern matches

See Note [Arrows and patterns] in TcPat.

This fixes Trac 1662.   Test is arrows/should_compile/arrowpat.hs

Please merge

16 years agoEliminate over-zealous warning in CoreToStg
simonpj@microsoft.com [Tue, 16 Oct 2007 12:46:06 +0000 (12:46 +0000)]
Eliminate over-zealous warning in CoreToStg

16 years agoShow inlined function in the header of 'Inlining done' message
simonpj@microsoft.com [Tue, 16 Oct 2007 12:45:35 +0000 (12:45 +0000)]
Show inlined function in the header of 'Inlining done' message

16 years agoShow program size in the simplifier-bailing-out message
simonpj@microsoft.com [Tue, 16 Oct 2007 12:44:50 +0000 (12:44 +0000)]
Show program size in the simplifier-bailing-out message

16 years agoView patterns, record wildcards, and record puns
Dan Licata [Wed, 10 Oct 2007 15:02:54 +0000 (15:02 +0000)]
View patterns, record wildcards, and record puns
This patch implements three new features:
* view patterns (syntax: expression -> pat in a pattern)
* working versions of record wildcards and record puns
See the manual for detailed descriptions.

Other minor observable changes:
* There is a check prohibiting local fixity declarations
  when the variable being fixed is not defined in the same let
* The warn-unused-binds option now reports warnings for do and mdo stmts

Implementation notes:

* The pattern renamer is now in its own module, RnPat, and the
implementation is now in a CPS style so that the correct context is
delivered to pattern expressions.

* These features required a fairly major upheaval to the renamer.
Whereas the old version used to collect up all the bindings from a let
(or top-level, or recursive do statement, ...) and put them into scope
before renaming anything, the new version does the collection as it
renames.  This allows us to do the right thing with record wildcard
patterns (which need to be expanded to see what names should be
collected), and it allows us to implement the desired semantics for view
patterns in lets.  This change had a bunch of domino effects brought on
by fiddling with the top-level renaming.

* Prior to this patch, there was a tricky bug in mkRecordSelId in HEAD,
which did not maintain the invariant necessary for loadDecl.  See note
[Tricky iface loop] for details.

16 years agoFIX profiling after my storage manager changes
Simon Marlow [Mon, 15 Oct 2007 10:39:39 +0000 (10:39 +0000)]
FIX profiling after my storage manager changes

16 years agoMore docu for skolemOccurs
Manuel M T Chakravarty [Mon, 15 Oct 2007 07:56:44 +0000 (07:56 +0000)]
More docu for skolemOccurs

16 years agoSlightly improved comments in TcTyClsDecls
Manuel M T Chakravarty [Wed, 10 Oct 2007 14:20:23 +0000 (14:20 +0000)]
Slightly improved comments in TcTyClsDecls

16 years agoTcTyFuns: remove some duplicate code
Manuel M T Chakravarty [Thu, 4 Oct 2007 14:23:15 +0000 (14:23 +0000)]
TcTyFuns: remove some duplicate code

16 years agoTcTyFuns.eqInstToRewrite
Manuel M T Chakravarty [Wed, 3 Oct 2007 14:57:15 +0000 (14:57 +0000)]
TcTyFuns.eqInstToRewrite

16 years agoAdd allocateInGen() for allocating in a specific generation, and cleanups
Simon Marlow [Fri, 12 Oct 2007 12:44:13 +0000 (12:44 +0000)]
Add allocateInGen() for allocating in a specific generation, and cleanups
Now allocate() is a synonym for allocateInGen().

I also made various cleanups: there is now less special-case code for
supporting -G1 (two-space collection), and -G1 now works with
-threaded.

16 years agooptimise isAlive()
Simon Marlow [Fri, 12 Oct 2007 10:38:10 +0000 (10:38 +0000)]
optimise isAlive()

16 years agoaccounting wibble: we were missing an alloc_blocks++ in allocateLocal()
Simon Marlow [Fri, 12 Oct 2007 10:17:11 +0000 (10:17 +0000)]
accounting wibble: we were missing an alloc_blocks++ in allocateLocal()

16 years agothreadStackOverflow should be using allocateLocal
Simon Marlow [Fri, 12 Oct 2007 10:04:05 +0000 (10:04 +0000)]
threadStackOverflow should be using allocateLocal

16 years agoFIX #1759 while respecting the ticks
andy@galois.com [Mon, 15 Oct 2007 03:33:19 +0000 (03:33 +0000)]
FIX #1759 while respecting the ticks