7 years agoAccept the old -package-conf flags for backwards compatibility
Simon Marlow [Tue, 22 May 2012 11:11:59 +0000 (12:11 +0100)] 
Accept the old -package-conf flags for backwards compatibility

7 years agoRead the source file timestamp *before* preprocessing (#6106)
Simon Marlow [Tue, 22 May 2012 10:51:46 +0000 (11:51 +0100)] 
Read the source file timestamp *before* preprocessing (#6106)

7 years agoDon't remove the thread from interruptTargetThread on ^C (#6116)
Simon Marlow [Tue, 22 May 2012 10:39:03 +0000 (11:39 +0100)] 
Don't remove the thread from interruptTargetThread on ^C (#6116)

7 years agoFollow the move of the Word type to ghc-prim
Ian Lynagh [Mon, 21 May 2012 22:20:22 +0000 (23:20 +0100)] 
Follow the move of the Word type to ghc-prim

7 years agoFix ar detection
Ian Lynagh [Sun, 20 May 2012 20:50:38 +0000 (21:50 +0100)] 
Fix ar detection

7 years agoFix dblatex and xml* tool detection on Windows
Ian Lynagh [Sun, 20 May 2012 20:28:37 +0000 (21:28 +0100)] 
Fix dblatex and xml* tool detection on Windows

We now normalise their paths, so that native Windows paths rather than
cygwin paths. This means that we are able to execute them from Cabal
or python.

I've also abstracted out the normalisation code into an m4 function.

7 years agoFull validates now install transformers rather than mtl
Ian Lynagh [Sat, 19 May 2012 12:43:27 +0000 (13:43 +0100)] 
Full validates now install transformers rather than mtl

7 years agoUse transformers directly, rather than using mtl
Ian Lynagh [Sat, 19 May 2012 11:27:26 +0000 (12:27 +0100)] 
Use transformers directly, rather than using mtl

This means we no longer need mtl in a GHC tree.

7 years agoRemove a couple of unnecessary lines of CPP
Ian Lynagh [Fri, 18 May 2012 17:25:24 +0000 (18:25 +0100)] 
Remove a couple of unnecessary lines of CPP

7 years agoFix #6109 : error Unknown mingw32 arch.
Erik de Castro Lopo [Fri, 18 May 2012 11:59:17 +0000 (21:59 +1000)] 
Fix #6109 : error Unknown mingw32 arch.

7 years agoMerge branch 'master' of win:c:/m64/reg13/.
Ian Lynagh [Fri, 18 May 2012 16:55:30 +0000 (17:55 +0100)] 
Merge branch 'master' of win:c:/m64/reg13/.

7 years agoMore Win64 adjustor fixes
Ian Lynagh [Fri, 18 May 2012 11:32:21 +0000 (12:32 +0100)] 
More Win64 adjustor fixes

7 years agoWibbles to lunaris's patch for promoted kinds
Simon Peyton Jones [Fri, 18 May 2012 09:10:28 +0000 (10:10 +0100)] 
Wibbles to lunaris's patch for promoted kinds

7 years agoAllow INLINABLE pragmas in TH
Simon Peyton Jones [Fri, 18 May 2012 09:10:02 +0000 (10:10 +0100)] 
Allow INLINABLE pragmas in TH

Thanks to mikhail.vorozhtsov for doing the work

7 years agoApplied lunaris's patch to allow promoted types and rich kinds in Template Haskell
Richard Eisenberg [Tue, 15 May 2012 17:42:46 +0000 (13:42 -0400)] 
Applied lunaris's patch to allow promoted types and rich kinds in Template Haskell

7 years agoFix the stub C files we generate on Win64
Ian Lynagh [Fri, 18 May 2012 01:16:43 +0000 (02:16 +0100)] 
Fix the stub C files we generate on Win64

7 years agoFix the way the adjustor puts things on the stack on Win64
Ian Lynagh [Fri, 18 May 2012 01:16:05 +0000 (02:16 +0100)] 
Fix the way the adjustor puts things on the stack on Win64

7 years agoFix freeHaskellFunctionPtr on Win64
Ian Lynagh [Thu, 17 May 2012 22:03:26 +0000 (23:03 +0100)] 
Fix freeHaskellFunctionPtr on Win64

7 years agoMerge branch 'master' of
Ian Lynagh [Thu, 17 May 2012 01:01:42 +0000 (02:01 +0100)] 
Merge branch 'master' of

7 years agoSet the context_switch flag in yield#
Simon Marlow [Wed, 16 May 2012 08:56:12 +0000 (09:56 +0100)] 
Set the context_switch flag in yield#

yieldThread hasn't been working for a while: unless we set the
context_switch flag to indicate that the current time slice is over,
the RTS scheduler just runs the same thread again.  Spotted by Andreas
Voellmy (thanks!).

7 years agoDon't use stdcall on Win64: It isn't supported; ccall is used instead
Ian Lynagh [Wed, 16 May 2012 14:14:36 +0000 (15:14 +0100)] 
Don't use stdcall on Win64: It isn't supported; ccall is used instead

7 years agoMerge branch 'master' of
Simon Peyton Jones [Wed, 16 May 2012 10:14:21 +0000 (11:14 +0100)] 
Merge branch 'master' of

7 years agoBe careful to instantiate kind variables when dealing with functional dependencies
Simon Peyton Jones [Wed, 16 May 2012 10:13:52 +0000 (11:13 +0100)] 
Be careful to instantiate kind variables when dealing with functional dependencies

There were really two bugs
  a) When the fundep fires we must apply the matching
     substitution to the kinds of the remaining type vars
     (This happens in FunDeps.checkClsFD, when we create meta_tvs)

  b) When instantiating the un-matched type variables we must
     instantiate their kinds properly
     (This happens in TcSMonad.instFlexiTcS)

This fixes #6068 and #6015 (second reported bug).

7 years agoWhen comparing Case expressions, take account of empty alternatives
Simon Peyton Jones [Wed, 16 May 2012 09:50:36 +0000 (10:50 +0100)] 
When comparing Case expressions, take account of empty alternatives

After the recent change that allows empty case alternatives, we
were accidentally saying that these two were equal:
   Case x _ Int  []
   Case x _ Bool []
Usually if the alternatives are equal so is the result type -- but
not if the alternatives are empty!

There are two places to fix:
  TrieMap with CoreExpr key

Fixes #6096, #6097

7 years agoMerge branch 'master' of
Ian Lynagh [Tue, 15 May 2012 17:18:19 +0000 (18:18 +0100)] 
Merge branch 'master' of

7 years agoFollow changes in Cabal.
Paolo Capriotti [Tue, 15 May 2012 09:32:58 +0000 (10:32 +0100)] 
Follow changes in Cabal.

7 years agoAdd a fixity environment to InteractiveContext (#2947)
Paolo Capriotti [Wed, 2 May 2012 18:22:10 +0000 (19:22 +0100)] 
Add a fixity environment to InteractiveContext (#2947)

7 years agoSimplify the behavior of package db flags.
Paolo Capriotti [Thu, 10 May 2012 15:18:21 +0000 (16:18 +0100)] 
Simplify the behavior of package db flags.

Previously, the `-no-user-package` and `-no-global-package` flags
affected the "initial" stack only, while `user-package` and
`global-packages` appended to the end of the stack.

This commit changes the behavior of those flags, so that they are always
applied to the stack as a whole.

The effect of the GHC_PACKAGE_PATH environment variable has also been
changed: terminating it with a separator now adds the default package
dbs (user and global) instead of the initial stack.

7 years agoUpdate documentation of the package db flags.
Paolo Capriotti [Fri, 4 May 2012 14:56:36 +0000 (15:56 +0100)] 
Update documentation of the package db flags.

7 years agoRename package-conf flags to package-db.
Paolo Capriotti [Fri, 4 May 2012 12:04:43 +0000 (13:04 +0100)] 
Rename package-conf flags to package-db.

Rename package database flags in both GHC and ghc-pkg so that they are
consistent with Cabal nomenclature.

Add a version check to the build system so that the correct set of
package db flags are used when the bootstrapping GHC has version < 7.5.

7 years agoAdd flags to manipulate package db stack (#5977)
Paolo Capriotti [Thu, 3 May 2012 10:29:51 +0000 (11:29 +0100)] 
Add flags to manipulate package db stack (#5977)

Introduce new flags to allow any package database stack to be set up.
The `-no-user-package-conf` and `-no-global-package-conf` flags remove
the corresponding package db from the initial stack, while
`-user-package-conf` and `-global-package-conf` push it back on top of
the stack.

7 years agoTweak the lexer: In particular, improve notFollowedBy and friends
Ian Lynagh [Mon, 14 May 2012 23:16:59 +0000 (00:16 +0100)] 
Tweak the lexer: In particular, improve notFollowedBy and friends

We were hitting a problem when reading the LANGUAGE/OPTIONS pragmas
from GHC.TypeLits, where the buffer ended "{-". The rules for the
start-comment lexeme check that "{-" is not followed by "#", but the
test returned False when there was no next character. Therefore we
were lexing this as as an open-curly lexeme (only consuming the "{",
and not reaching the end of the buffer),
which meant the options parser think that it had reached the end of
the options.

Now we correctly lex as "{-".

7 years agoUse pprInfixName in pprInfo (#6091)
Paolo Capriotti [Mon, 14 May 2012 12:37:14 +0000 (13:37 +0100)] 
Use pprInfixName in pprInfo (#6091)

Surround a name in backticks when printing an infix declaration in GHCi.

7 years agoFix the the pure unifier so that it unifies kinds
Simon Peyton Jones [Mon, 14 May 2012 13:05:48 +0000 (14:05 +0100)] 
Fix the the pure unifier so that it unifies kinds

When unifying two type variables we must unify their kinds.
The pure *matcher* was doing so, but the pure *unifier* was not.
This patch fixes Trac #6015, where an instance lookup was failing
when it should have succeeded.

I removed a bunch of code aimed at support sub-kinding. It's
tricky, ad-hoc, and I don't think its necessary any more.
Anything we can do to simplify the sub-kinding story is welcome!

7 years agoMerge branch 'master' of
Simon Peyton Jones [Fri, 11 May 2012 17:03:01 +0000 (18:03 +0100)] 
Merge branch 'master' of

7 years agoDelete dead code mkIParamTyCon
Simon Peyton Jones [Fri, 11 May 2012 17:02:47 +0000 (18:02 +0100)] 
Delete dead code mkIParamTyCon

7 years agoRefactor LHsTyVarBndrs to fix Trac #6081
Simon Peyton Jones [Fri, 11 May 2012 17:02:18 +0000 (18:02 +0100)] 
Refactor LHsTyVarBndrs to fix Trac #6081

This is really a small change, but it touches a lot of files quite
significantly. The real goal is to put the implicitly-bound kind
variables of a data/class decl in the right place, namely on the
LHsTyVarBndrs type, which now looks like

  data LHsTyVarBndrs name
    = HsQTvs { hsq_kvs :: [Name]
             , hsq_tvs :: [LHsTyVarBndr name]

This little change made the type checker neater in a number of
ways, but it was fiddly to push through the changes.

7 years agoHandle cases with no alternatives in GHCi
Simon Marlow [Fri, 11 May 2012 09:26:28 +0000 (10:26 +0100)] 
Handle cases with no alternatives in GHCi

Fixes cgrun045(ghci) amongst others

7 years agoFix bug in expandTypeSynonyms that could rarely cause problems
Max Bolingbroke [Thu, 10 May 2012 08:46:04 +0000 (09:46 +0100)] 
Fix bug in expandTypeSynonyms that could rarely cause problems

7 years agoComments only
Simon Peyton Jones [Thu, 10 May 2012 08:45:16 +0000 (09:45 +0100)] 
Comments only

7 years agoFix build on Win64
Ian Lynagh [Wed, 9 May 2012 23:53:28 +0000 (00:53 +0100)] 
Fix build on Win64

7 years agoMerge branch 'master' of
Simon Peyton Jones [Wed, 9 May 2012 16:52:24 +0000 (17:52 +0100)] 
Merge branch 'master' of

7 years agoFix build on Win64
Ian Lynagh [Wed, 9 May 2012 15:45:40 +0000 (16:45 +0100)] 
Fix build on Win64

7 years agoRe-do the "function application discount" (fixes Trac #6048)
Simon Peyton Jones [Wed, 9 May 2012 15:22:49 +0000 (16:22 +0100)] 
Re-do the "function application discount" (fixes Trac #6048)

* Undoes Max's very aggressive function-inlining change
  (see comments with Trac #6048)

* Resticts function application discount to functions
  that occur just once in the body. It was the multiple
  occurrences that led to the exponential behavour in
  Trac #6048.

See Note [Function application discount] in CoreUnfold.

Module binary sizes are down 2% on average, which is good.
Allocations wobble about a bit, but only on a few benchmarks
and not by much, so it seems a price worth paying to avoid
exponential behaviour!

            Min           -1.2%
            Max           +2.8%
 Geometric Mean           +0.0%

7 years agoTake care not to mix polymorphic and unlifted bindings in a group
Simon Peyton Jones [Wed, 9 May 2012 14:23:25 +0000 (15:23 +0100)] 
Take care not to mix polymorphic and unlifted bindings in a group

Fixes Trac #6078

7 years agoWibbles to 'simplify the SimplCont data type'
Simon Peyton Jones [Tue, 8 May 2012 09:25:22 +0000 (10:25 +0100)] 
Wibbles to 'simplify the SimplCont data type'

7 years agoSimplify the SimplCont data type
Simon Peyton Jones [Fri, 4 May 2012 22:02:46 +0000 (23:02 +0100)] 
Simplify the SimplCont data type

* Put the result type in the Stop continuation
* No need for the alts type in Select

The result is a modest but useful simplification

7 years agoMerge branch 'ghc-new-flavor'
Simon Peyton Jones [Wed, 9 May 2012 14:50:54 +0000 (15:50 +0100)] 
Merge branch 'ghc-new-flavor'

7 years agoDon't pointlessly cast sizeof's result to size_t
Ian Lynagh [Wed, 9 May 2012 13:49:48 +0000 (14:49 +0100)] 
Don't pointlessly cast sizeof's result to size_t

7 years agoMake fresh variables when decomposing Givens
Simon Peyton Jones [Wed, 9 May 2012 13:12:59 +0000 (14:12 +0100)] 
Make fresh variables when decomposing Givens

This turns out to be important becuase we don't have
a form for superclass selection in TcCoercion (we could
but we don't).

Se comments with xCtFlavor_cache, the Given case.

7 years agoUse fresh uniques when unboxing coercions in the desugarer
Simon Peyton Jones [Wed, 9 May 2012 13:11:54 +0000 (14:11 +0100)] 
Use fresh uniques when unboxing coercions in the desugarer

This is kosher, and turns out to be vital when we have
more complicate evidence terms.

7 years agoCosmetics
Simon Peyton Jones [Wed, 9 May 2012 13:11:09 +0000 (14:11 +0100)] 

7 years agoBe a little less aggressive about inlining (fixes Trac #5623)
Simon Peyton Jones [Wed, 9 May 2012 10:06:44 +0000 (11:06 +0100)] 
Be a little less aggressive about inlining (fixes Trac #5623)

When inlining, we are making a copy of the expression, so we have to
be careful about duplicating work.  Previously we were using
exprIsCheap for that, but it is willing to duplicate a cheap primop --
and that is terribly bad if it happens inside some inner array loop
(Trac #5623).  So now we use a new function exprIsWorkFree.  Even
then there is some wiggle room:
   see Note [exprIsWorkFree] in CoreUtils

This commit does make wheel-sieve1 allocate a lot more, but we decided
that's just tough; it's more important for inlining to be robust
about not duplicating work.

7 years agoMerge branch 'master' of
Ian Lynagh [Tue, 8 May 2012 17:31:47 +0000 (18:31 +0100)] 
Merge branch 'master' of

7 years agoEnable FileLock for win32 (#4363)
Paolo Capriotti [Tue, 8 May 2012 13:05:28 +0000 (14:05 +0100)] 
Enable FileLock for win32 (#4363)

7 years agoMove getMonotonicUSec from base to the RTS.
Paolo Capriotti [Tue, 8 May 2012 12:05:14 +0000 (13:05 +0100)] 
Move getMonotonicUSec from base to the RTS.

7 years agoFollow upstream mtl and Cabal, add transformers package (#5958)
Paolo Capriotti [Mon, 7 May 2012 22:21:20 +0000 (23:21 +0100)] 
Follow upstream mtl and Cabal, add transformers package (#5958)

7 years agoAdapt to changes in Cabal.
Paolo Capriotti [Mon, 7 May 2012 16:45:00 +0000 (17:45 +0100)] 
Adapt to changes in Cabal.

7 years agoAdd support for .text.startup sections to the Linker
Ian Lynagh [Mon, 7 May 2012 21:45:04 +0000 (22:45 +0100)] 
Add support for .text.startup sections to the Linker

We get these in a full build on Win64

7 years agoYet another major refactoring of the constraint solver
Simon Peyton Jones [Mon, 7 May 2012 16:40:34 +0000 (17:40 +0100)] 
Yet another major refactoring of the constraint solver

This is the result of Simon and Dimitrios doing a code walk through.
There is no change in behaviour, but the structure is much better.
Main changes:

* Given constraints contain an EvTerm not an EvVar

* Correspondingly, TcEvidence is a recursive types that uses
  EvTerms rather than EvVars

* Rename CtFlavor to CtEvidence

* Every CtEvidence has a ctev_pred field.  And use record fields
  consistently for CtEvidence

* The solved-constraint fields of InertSet (namely inert_solved and
  inert_solved_funeqs) contain CtEvidence, not Ct

There is a long cascade of follow-on changes.

7 years agoMerge branch 'master' of
Ian Lynagh [Mon, 7 May 2012 16:14:07 +0000 (17:14 +0100)] 
Merge branch 'master' of

7 years agoFix alignment when loading .a files on Win64
Ian Lynagh [Mon, 7 May 2012 14:27:13 +0000 (15:27 +0100)] 
Fix alignment when loading .a files on Win64

7 years agoTest for misaligned sections, and fail if we find one
Ian Lynagh [Mon, 7 May 2012 14:18:57 +0000 (15:18 +0100)] 
Test for misaligned sections, and fail if we find one

7 years agoFix #6080 & house keeping in Vectorise.Exp
Manuel M T Chakravarty [Mon, 7 May 2012 14:12:00 +0000 (00:12 +1000)] 
Fix #6080 & house keeping in Vectorise.Exp

7 years agoBuild fix
Ian Lynagh [Sun, 6 May 2012 19:49:58 +0000 (20:49 +0100)] 
Build fix

7 years agoFollow changes in haskeline
Ian Lynagh [Sun, 6 May 2012 19:01:00 +0000 (20:01 +0100)] 
Follow changes in haskeline

I'm not sure if we still need to encode the error, but validate is happy
with this fix, at least.

7 years agoFix the way we call strip on DLLs
Ian Lynagh [Sun, 6 May 2012 18:39:41 +0000 (19:39 +0100)] 
Fix the way we call strip on DLLs

On Win64, "install -s" calls a strip that doesn't understand 64bit
binaries. For some reason, this means the DLLs end up non-executable,
which means executables that use them just segfault.

7 years agoFix RTS DLL references on Win64
Ian Lynagh [Sun, 6 May 2012 14:54:13 +0000 (15:54 +0100)] 
Fix RTS DLL references on Win64

7 years agoWorking towards fixing DLLs on Win64
Ian Lynagh [Sun, 6 May 2012 01:21:17 +0000 (02:21 +0100)] 
Working towards fixing DLLs on Win64

7 years agoInstall DLLs as executable
Ian Lynagh [Sat, 5 May 2012 22:52:14 +0000 (23:52 +0100)] 
Install DLLs as executable

Otherwise the dynHelloWorld test segfaults when run from an installed
compiler on cygwin.

7 years agoUse lnats to avoid overflowing when allocating large amounts
Ian Lynagh [Sat, 5 May 2012 13:54:09 +0000 (14:54 +0100)] 
Use lnats to avoid overflowing when allocating large amounts

Stops outofmem segfaulting on Win64

7 years agoEnable and fix building dynlibs on Win64
Ian Lynagh [Fri, 4 May 2012 19:07:56 +0000 (20:07 +0100)] 
Enable and fix building dynlibs on Win64

7 years agoMerge branch 'master' of
Ian Lynagh [Fri, 4 May 2012 16:59:17 +0000 (17:59 +0100)] 
Merge branch 'master' of

7 years agoFollow libffi changes on Windows
Ian Lynagh [Fri, 4 May 2012 15:26:59 +0000 (16:26 +0100)] 
Follow libffi changes on Windows

7 years agoFix typo in error message (Trac #6076)
Simon Peyton Jones [Fri, 4 May 2012 14:29:30 +0000 (15:29 +0100)] 
Fix typo in error message (Trac #6076)

7 years agoFix overnight build breakage (fix from simonpj)
Simon Marlow [Thu, 3 May 2012 07:47:40 +0000 (08:47 +0100)] 
Fix overnight build breakage (fix from simonpj)

compiler/simplCore/SimplUtils.lhs:1668:5-25: Irrefutable pattern failed for pattern ((_, _, rhs1) : _)

7 years agoAdd _getpid to rtsSyms on Win64
Ian Lynagh [Thu, 3 May 2012 12:08:52 +0000 (13:08 +0100)] 
Add _getpid to rtsSyms on Win64

7 years agoCheck the calling convention of foreign imported labels is supported
Ian Lynagh [Thu, 3 May 2012 11:13:02 +0000 (12:13 +0100)] 
Check the calling convention of foreign imported labels is supported

Fixes 2276_ghci on Win64

7 years agoMerge branch 'master' of
Ian Lynagh [Wed, 2 May 2012 17:01:32 +0000 (18:01 +0100)] 
Merge branch 'master' of

7 years agoWin64 build fix
Ian Lynagh [Wed, 2 May 2012 16:31:59 +0000 (17:31 +0100)] 
Win64 build fix

7 years agoMore Win64 ghci fixes
Ian Lynagh [Wed, 2 May 2012 16:00:56 +0000 (17:00 +0100)] 
More Win64 ghci fixes

7 years agoMerge branch 'master' of
Simon Peyton Jones [Wed, 2 May 2012 14:44:30 +0000 (15:44 +0100)] 
Merge branch 'master' of

7 years agoAllow cases with empty alterantives
Simon Peyton Jones [Wed, 2 May 2012 14:44:14 +0000 (15:44 +0100)] 
Allow cases with empty alterantives

This patch allows, for the first time, case expressions with an empty
list of alternatives. Max suggested the idea, and Trac #6067 showed
that it is really quite important.

So I've implemented the idea, fixing #6067. Main changes

 * See Note [Empty case alternatives] in CoreSyn

 * Various foldr1's become foldrs

 * IfaceCase does not record the type of the alternatives.
   I added IfaceECase for empty-alternative cases.

 * Core Lint does not complain about empty cases

 * MkCore.castBottomExpr constructs an empty-alternative case
   expression   (case e of ty {})

 * CoreToStg converts '(case e of {})' to just 'e'

7 years agoCast memory primops in the C backend (#5976)
Paolo Capriotti [Wed, 2 May 2012 14:24:46 +0000 (15:24 +0100)] 
Cast memory primops in the C backend (#5976)

To prevent conflicts with GCC builtins, generate identical code for
calls to mem primos and FFI calls.

Based on a patch by Joachim Breitner.

7 years agoWin64 Linker improvements
Ian Lynagh [Wed, 2 May 2012 14:11:45 +0000 (15:11 +0100)] 
Win64 Linker improvements

We now detect if we are given a value that is out of range for a
32bit relocation, and fail with an error.

Added a load more symbols to rtsSyms.

7 years agoAdd 'free' to the list of rtsSyms on Win64
Ian Lynagh [Wed, 2 May 2012 12:27:43 +0000 (13:27 +0100)] 
Add 'free' to the list of rtsSyms on Win64

Without this, we ended up using
    (gdb) info symbol 0x7ff756a10ac
    msvcrt!free in section .text of C:\Windows\system32\msvcrt.dll
for free, rather than
    (gdb) info symbol 0x2584128
    free in section .text of C:\m64\ghci2\q/../inplace/bin/ghc-stage2.exe
but we were trying to put the address into a 32bit relocation.

7 years agoFix Win64 build now that hsc2hs knows what platform we're on
Ian Lynagh [Tue, 1 May 2012 19:06:44 +0000 (20:06 +0100)] 
Fix Win64 build now that hsc2hs knows what platform we're on

7 years agoDefine _HOST_OS and _HOST_ARCH when calling hsc2hs
Ian Lynagh [Tue, 1 May 2012 18:14:05 +0000 (19:14 +0100)] 
Define _HOST_OS and _HOST_ARCH when calling hsc2hs

In particular, old-time assumes that mingw32_HOST_OS is set when
we are on Windows, and was going wrong on Win64 because it wasn't

7 years agoTell checkProddableBlock how many bytes we want to write
Ian Lynagh [Tue, 1 May 2012 13:00:57 +0000 (14:00 +0100)] 
Tell checkProddableBlock how many bytes we want to write

It doesn't suffice for checkProddableBlock to just check whether the
largest possible write could be made at the address we are writing,
as if we are making a smaller write then checkProddableBlock may
conservatively think we will write off the end of the block.

Thus we now tell checkProddableBlock how many bytes we will write.

7 years agoRevert "Revert "More Win32 build fixes""
Ian Lynagh [Tue, 1 May 2012 12:14:58 +0000 (13:14 +0100)] 
Revert "Revert "More Win32 build fixes""

This reverts commit 29cd6f435f2afb332ad8faf39f5e920ff9c38d9a.

7 years agoRevert "Revert "Fix build of rts/Linker.c on Win32""
Ian Lynagh [Tue, 1 May 2012 12:14:57 +0000 (13:14 +0100)] 
Revert "Revert "Fix build of rts/Linker.c on Win32""

This reverts commit 02cf6d6f71b5772aa4ddf1b70c192a802886e2c2.

7 years agoRevert "Revert "Get GHCi working on Win64""
Ian Lynagh [Tue, 1 May 2012 12:14:53 +0000 (13:14 +0100)] 
Revert "Revert "Get GHCi working on Win64""

This reverts commit 27e585bda6ae8ab68f58abdcb9e06806414a6636.

7 years agoRevert "Get GHCi working on Win64"
Manuel M T Chakravarty [Tue, 1 May 2012 07:48:09 +0000 (17:48 +1000)] 
Revert "Get GHCi working on Win64"

This reverts commit 05b55c670c7fe3fc01827ca02aafb6926c0b69cb.

7 years agoRevert "Fix build of rts/Linker.c on Win32"
Manuel M T Chakravarty [Tue, 1 May 2012 07:47:49 +0000 (17:47 +1000)] 
Revert "Fix build of rts/Linker.c on Win32"

This reverts commit 0042c478f1169ddd9392fb39de7d0aed865a272e.

7 years agoRevert "More Win32 build fixes"
Manuel M T Chakravarty [Tue, 1 May 2012 07:43:01 +0000 (17:43 +1000)] 
Revert "More Win32 build fixes"

This reverts commit e89ef70475fa5e9cf17af01b1b5d7fced0d2e13c.

7 years agoWibble to pretty printing
Simon Peyton Jones [Tue, 1 May 2012 07:17:59 +0000 (08:17 +0100)] 
Wibble to pretty printing

7 years agoMerge branch 'master' of
Simon Peyton Jones [Tue, 1 May 2012 07:08:13 +0000 (08:08 +0100)] 
Merge branch 'master' of

7 years agoTidy up a remaining glitch in unification
Simon Peyton Jones [Tue, 1 May 2012 07:07:52 +0000 (08:07 +0100)] 
Tidy up a remaining glitch in unification

There was one place, in type checking parallel list comprehensions
where we were unifying types, but had no convenient way to use the
resulting coercion; instead we just checked that it was Refl.  This
was Wrong Wrong; it might fail unpredicably in a GADT-like situation,
and it led to extra error-generation code used only in this one place.

This patch tidies it all up, by moving the 'return' method from the
*comprehension* to the ParStmtBlock. The latter is a new data type,
now used for each sub-chunk of a parallel list comprehension.

Because of the data type change, quite a few modules are touched,
but only in a fairly trivial way. The real changes are in TcMatches
(and corresponding desugaring); plus deleting code from TcUnify.

This patch also fixes the pretty-printing bug in Trac #6060

7 years agoFix maintenance of n_blocks in the RTS
Ian Lynagh [Mon, 30 Apr 2012 23:25:55 +0000 (00:25 +0100)] 
Fix maintenance of n_blocks in the RTS

It was causing assertion failures of
    ASSERT(countBlocks(nursery->blocks) == nursery->n_blocks)
    ghc-stage2: internal error: ASSERTION FAILED: file rts/sm/Sanity.c, line 878

7 years agoMore Win32 build fixes
Ian Lynagh [Mon, 30 Apr 2012 21:47:15 +0000 (22:47 +0100)] 
More Win32 build fixes