Simon Marlow [Fri, 25 Aug 2006 14:09:06 +0000 (14:09 +0000)]
Load the target of a dynamic foreign call into a temporary
Fixes ffi011(opt) on x86_64. I don't know why this has only just
appeared today, it's apparently been broken for some time.
Simon Marlow [Fri, 25 Aug 2006 13:36:28 +0000 (13:36 +0000)]
Sparc supports SMP too
Ian Lynagh [Fri, 25 Aug 2006 01:02:19 +0000 (01:02 +0000)]
Fix rewriting of Control.Exception.Assert; fixes 875
Ian Lynagh [Fri, 25 Aug 2006 11:05:20 +0000 (11:05 +0000)]
Add the regex reshuffle to the release notes
Ian Lynagh [Fri, 25 Aug 2006 10:24:18 +0000 (10:24 +0000)]
parsec is now a core library
Roman Leshchinskiy [Fri, 25 Aug 2006 10:18:46 +0000 (10:18 +0000)]
Add a default case to pprDynamicLinkerAsmLabel
This is mainly for the benefit of Solaris. I'll fix this properly later.
Roman Leshchinskiy [Fri, 25 Aug 2006 10:18:20 +0000 (10:18 +0000)]
Reserve a register for REG_Base on the Sparc
Roman Leshchinskiy [Fri, 25 Aug 2006 10:17:53 +0000 (10:17 +0000)]
Add atomic SMP primitives for the Sparc
Roman Leshchinskiy [Fri, 25 Aug 2006 10:16:46 +0000 (10:16 +0000)]
Make sure GCC uses the Sparc V9 instruction set
We only support Sparc V9 and better as V8 lacks an atomic CAS instruction
which we need for SMP. This means that we have to pass -mcpu=v9 to GCC when
compiling and assembling. Hardcoding the flag is hackish but seems to be
our best bet at the moment. It can still be overridden by the user as GCC
picks the best -mcpu flag regardless of the ordering.
Simon Marlow [Fri, 25 Aug 2006 10:02:44 +0000 (10:02 +0000)]
shutdownCapability(): don't bail out after 50 iterations
See comments for details. Fixes assertion failures in stage 3 build
which appeared after recent closeMutex() addidion. May fix other
shutdown issues.
Simon Marlow [Fri, 25 Aug 2006 09:32:26 +0000 (09:32 +0000)]
add dependency on regex-compat
Simon Marlow [Fri, 25 Aug 2006 09:10:13 +0000 (09:10 +0000)]
move parsec into $(GhcBootLibs); tidy up
Simon Marlow [Fri, 25 Aug 2006 08:57:12 +0000 (08:57 +0000)]
Mips registerised support
Contributed by: Thiemo Seufer <ths@networkno.de>
Simon Marlow [Fri, 25 Aug 2006 08:46:07 +0000 (08:46 +0000)]
parsec is required to be a core package, genprimopcode uses it
Simon Marlow [Fri, 25 Aug 2006 08:44:35 +0000 (08:44 +0000)]
Free Win32 Handles on shutdown
patch from #878
Ian Lynagh [Fri, 25 Aug 2006 00:39:45 +0000 (00:39 +0000)]
Fix unregisterised builds, and building on non-x86/amd64/powerpc
Ian Lynagh [Thu, 24 Aug 2006 21:16:46 +0000 (21:16 +0000)]
Release notes for GHC 6.6
Simon Marlow [Thu, 24 Aug 2006 15:35:00 +0000 (15:35 +0000)]
Update for changes to packages
Not much has changed really: just the removal of the overlap
restriction, and the re-instatement of the requirement that
-package-name must be used when compiling a package now.
Simon Marlow [Thu, 24 Aug 2006 15:25:29 +0000 (15:25 +0000)]
somehow I lost the unix subdir; recover it
Simon Marlow [Thu, 24 Aug 2006 15:06:47 +0000 (15:06 +0000)]
expand the section on getting the source.
Simon Marlow [Thu, 24 Aug 2006 14:57:17 +0000 (14:57 +0000)]
config in regex-posix too
Simon Marlow [Thu, 24 Aug 2006 14:30:16 +0000 (14:30 +0000)]
make all AC_CONFIG_SUBDIRS optional
Esa Ilari Vuokko [Wed, 23 Aug 2006 22:18:28 +0000 (22:18 +0000)]
Add dynCompileExpr
Ian Lynagh [Thu, 24 Aug 2006 12:18:06 +0000 (12:18 +0000)]
Remove duplicate documentation of -package flag
Ian Lynagh [Thu, 24 Aug 2006 12:14:42 +0000 (12:14 +0000)]
Remove a reference to -fglobalise-toplev-names that got left behind
Esa Ilari Vuokko [Wed, 23 Aug 2006 19:46:04 +0000 (19:46 +0000)]
Add closeMutex and use it on clean up
Esa Ilari Vuokko [Wed, 23 Aug 2006 00:30:41 +0000 (00:30 +0000)]
Add shared Typeable support
Esa Ilari Vuokko [Wed, 23 Aug 2006 15:50:23 +0000 (15:50 +0000)]
Ignore sections generated from .ident
Simon Marlow [Thu, 24 Aug 2006 11:55:35 +0000 (11:55 +0000)]
update with respect to darcs-all changes
Simon Marlow [Thu, 24 Aug 2006 11:49:02 +0000 (11:49 +0000)]
divide packages into "core" and "extra" packages
The following packages are now "core" packages:
base, Cabal, haskell98, readline, regex-base, regex-compat
regex-posix, stm, template-haskell, unix, Win32
Core packages are those packages required to bootstrap GHC, or are
closely tied to GHC (stm, template-haskell). These are the packages
that will be provided in a source distribution from now on.
All other packages are classified as "extra" packages. As far as
binary distributions and nightly builds go, nothing will change -
we'll still build and include all these packages in the distributions.
NOTE: 'sh darcs-all get' will now get the core packages only. To get
the extra packages too, use 'sh darcs-all --extra get'.
Simon Marlow [Thu, 24 Aug 2006 11:37:50 +0000 (11:37 +0000)]
Sparc fix: work around gcc optimising away the reserved stack chunk
This bug causes crashse on Sparc when calling foreign functions with
more than 13 arguments.
Simon Marlow [Thu, 24 Aug 2006 09:44:43 +0000 (09:44 +0000)]
add new regex packages
Esa Ilari Vuokko [Wed, 23 Aug 2006 07:58:22 +0000 (07:58 +0000)]
Clean up coding style
Esa Ilari Vuokko [Wed, 23 Aug 2006 00:29:02 +0000 (00:29 +0000)]
Use stgMallc and stgFree instead of malloc/free
Esa Ilari Vuokko [Mon, 21 Aug 2006 18:03:32 +0000 (18:03 +0000)]
Remove wrong VirtualAlloc MEM_DECOMMITs on cleanup
Esa Ilari Vuokko [Sun, 13 Aug 2006 11:10:29 +0000 (11:10 +0000)]
Remove few format-warnings by adding casts
Esa Ilari Vuokko [Sun, 13 Aug 2006 00:22:16 +0000 (00:22 +0000)]
Remove warning: Correct includes for mingw
Esa Ilari Vuokko [Sat, 12 Aug 2006 02:09:01 +0000 (02:09 +0000)]
Add few more guesses where to find bits of mingw-gcc
Simon Marlow [Wed, 23 Aug 2006 09:52:58 +0000 (09:52 +0000)]
in the GHCi prompt, print ModuleNames not Modules
Simon Marlow [Wed, 23 Aug 2006 09:52:25 +0000 (09:52 +0000)]
In the Compiling/Skipping message, print ModuleNames not Modules
These modules are always home modules, by definition, so the package
name is redundant.
Ian Lynagh [Tue, 22 Aug 2006 16:33:00 +0000 (16:33 +0000)]
Fix typo
Ian Lynagh [Tue, 22 Aug 2006 16:32:12 +0000 (16:32 +0000)]
Fix typo
Simon Marlow [Tue, 22 Aug 2006 14:33:37 +0000 (14:33 +0000)]
FastString and StringBuffer need -funbox-strict-fields too
For the benefit of old GHCs that don't understand {-# UNPACK #-}
Simon Marlow [Tue, 22 Aug 2006 11:25:18 +0000 (11:25 +0000)]
minor fix to the clashing export error message
The ordering of items in the parsed export list is now correct, so we
have to compensate to get the right output again.
Simon Marlow [Tue, 22 Aug 2006 11:24:09 +0000 (11:24 +0000)]
findModule: add a fallthrough error case
Simon Marlow [Tue, 22 Aug 2006 09:35:54 +0000 (09:35 +0000)]
notes about which versions of GHC can be used to bootstrap
Simon Marlow [Tue, 22 Aug 2006 09:03:49 +0000 (09:03 +0000)]
disable .ident generation on darwin_TARGET_OS
Simon Marlow [Tue, 22 Aug 2006 07:37:31 +0000 (07:37 +0000)]
fix typo
Simon Marlow [Mon, 21 Aug 2006 15:31:36 +0000 (15:31 +0000)]
fixes to PPC version of cas(), from David Kirkman <dkirkman@gmail.com>
From David's email:
The problem is that the inline assembler code was placing the result
of an operation in a register that is used as input later in the code.
At the bottom of this message I've extracted a short short code
fragment that you can run through gcc (on a powerpc machine) to see
the generated assembly output.
The changes to fix the problem are fairly simple. The first adds an
ampersand to the output list of the assembly fragment ("=r" (result)
--> "=&r" (result)) The ampersand just tells gcc that result can not
be placed in a register used for any of the input parameters (o, n, or
p). Otherwise, it feels free to place output parameters in the same
registers used by the inputs -- but because of the flow of control
here we need everything in a distinct register. This change fixes the
TVar program above.
The second change adds a clobber list (the :"cc", "memory"). This
tells gcc that the condition code (due to the compare) and memory (due
to the store) might be changed during the asm execution. The lack of
a clobber list did not seem to be causing any trouble, but without it
gcc is free to assume that no state is changed during the execution.
Simon Marlow [Mon, 21 Aug 2006 15:21:11 +0000 (15:21 +0000)]
Always use -funbox-strict-fields for Binary
For some reason this was only enabled when $(bootstrapped)=YES. This
would be one reason why the stage1 compiler is slow. I guess we'll
find out if anything goes wrong.
Simon Marlow [Mon, 21 Aug 2006 15:19:57 +0000 (15:19 +0000)]
disable automagic building of GHCi in stage1
Simon Marlow [Mon, 21 Aug 2006 14:19:46 +0000 (14:19 +0000)]
remove ancient file with incorrect information
Martin Grabmueller [Wed, 16 Aug 2006 09:14:27 +0000 (09:14 +0000)]
new option -a (append) for hasktags
Simon Marlow [Mon, 21 Aug 2006 12:06:30 +0000 (12:06 +0000)]
ugly hack to cause ghc_boot_platform.h to be built before primops.txt
Simon Marlow [Mon, 21 Aug 2006 10:29:08 +0000 (10:29 +0000)]
add libraries/cgi and libraries/xhtml
Esa Ilari Vuokko [Sun, 20 Aug 2006 15:07:20 +0000 (15:07 +0000)]
(temp) #814 - More flexible memory allocation in Windows
Simon Marlow [Mon, 21 Aug 2006 10:26:33 +0000 (10:26 +0000)]
fix export/import list parsing (allow (,)), and remove unnecessary reverses
Simon Marlow [Mon, 21 Aug 2006 09:59:12 +0000 (09:59 +0000)]
comply with Haskell 98 by not allowing extra commas in import/export lists
Ian Lynagh [Mon, 21 Aug 2006 09:22:26 +0000 (09:22 +0000)]
Missing stage1's in hc-build
Add mising stage1/ directories to object files touched by hc-build, and
give stage=1 as an argument to make install.
Ross Paterson [Sat, 19 Aug 2006 17:34:23 +0000 (17:34 +0000)]
remove spurious commas in imports
Ross Paterson [Fri, 18 Aug 2006 22:40:14 +0000 (22:40 +0000)]
whitespace cleanup only
sof@galois.com [Fri, 18 Aug 2006 21:41:55 +0000 (21:41 +0000)]
remove gcj libs from bin dist
simonpj@microsoft.com [Fri, 18 Aug 2006 16:07:29 +0000 (16:07 +0000)]
I don't thing we want to add a call-context here; it just clutters the output
simonpj@microsoft.com [Fri, 18 Aug 2006 16:06:11 +0000 (16:06 +0000)]
Avoid duplicate "In type ..." in error messages
simonpj@microsoft.com [Fri, 18 Aug 2006 16:05:51 +0000 (16:05 +0000)]
Better pretty-printing for TvSubst
simonpj@microsoft.com [Fri, 18 Aug 2006 11:07:02 +0000 (11:07 +0000)]
Fall over more gracefully when there's a Template Haskell error
For a long time, Template Haskell has fallen over in a very un-graceful
way (i.e. panic) even when it encounters a programmer error. In particular,
when DsMeta converts HsSyn to TH syntax, it may find Haskell code that
TH does not understand. This should be reported as a normal programmer
error, not with a compiler panic!
Originally the desugarer was supposed to never generate error
messages, but this TH desugaring thing does make it do so. And in
fact, for other reasons, the desugarer now uses the TcRnIf monad, the
common monad used by the renamer, typechecker, interface checker, and
desugarer.
This patch completes the job, by
- allowing the desugarer to generate errors
- re-plumbing the error handling to take account of this
- making DsMeta use the new facilities to report error gracefully
Quite a few lines of code are touched, but nothing deep is going on.
Fixes Trac# 760.
simonpj@microsoft.com [Fri, 18 Aug 2006 07:59:37 +0000 (07:59 +0000)]
Fix typo (fst --> head) in docs on implicit parameters
simonpj@microsoft.com [Thu, 17 Aug 2006 13:42:16 +0000 (13:42 +0000)]
One last hs-boot update
simonpj@microsoft.com [Thu, 17 Aug 2006 13:32:47 +0000 (13:32 +0000)]
Missing import for stage 2
simonpj@microsoft.com [Thu, 17 Aug 2006 13:32:20 +0000 (13:32 +0000)]
One more hs-boot file
simonpj@microsoft.com [Thu, 17 Aug 2006 13:01:41 +0000 (13:01 +0000)]
Refactoring for valid rule checking
simonpj@microsoft.com [Thu, 17 Aug 2006 13:00:05 +0000 (13:00 +0000)]
Do not CSE in INLINE and NOINLINE things
See extensive comments with Note [INLINE and NOINLINE] in this file.
simonpj@microsoft.com [Thu, 17 Aug 2006 13:20:03 +0000 (13:20 +0000)]
Update lhs-boot files
A consequence of my recent meddling with hs-boot files is that GHC is
more picky about the correpondence between the hs-boot file and the hs file.
In particular, you must use the same type synonyms.
This patche fixes up GHC's own hs-boot files to match the restriction.
simonpj@microsoft.com [Wed, 16 Aug 2006 20:31:56 +0000 (20:31 +0000)]
Add ad-hoc typing checks for tagToEnum#
The problem with tagToEnum# is that it is not overloaded (in the
Haskell sense) but you are only supposed to apply it to a TyCon
that is an enumeration (isEnumerationTyCon).
The Real Way to do this is to have some special kind of type constraint
for the purpose, but that is wild overkill. So this patch adds a small
rather ad-hoc check to TcExpr.instFun. Crude, simple, but it works fine.
Fixes Trac #786
Test is tcfail164
simonpj@microsoft.com [Wed, 16 Aug 2006 16:42:16 +0000 (16:42 +0000)]
Get dead-ness right in knownCon
simonpj@microsoft.com [Wed, 16 Aug 2006 16:41:03 +0000 (16:41 +0000)]
Tuning for argToPat
argToPat is a crucial function for SpecConstr, because it decides
what patterns are worth specialising. I was being much too gung-ho about
constants. This patch makes it much better.
simonpj@microsoft.com [Wed, 16 Aug 2006 16:36:45 +0000 (16:36 +0000)]
Re-factor mkAtomicArgs and completeNonRecX
This refactoring ensures that when mkAtomicArgs adds new bindings,
it does so using completeNonRecX, which adds unfoldings etc. More
modular, and saves passes too.
(This was important when getting rules to work right. We want tob
fire a rule as soon as possible, taking into account all inlinings,
else a less-good rule applies. That's what I found when doing
stream fusion anyway.)
Regardless, this is an improvement.
simonpj@microsoft.com [Wed, 16 Aug 2006 10:50:42 +0000 (10:50 +0000)]
Another try at the continuation-swapping stuff
I have spent altogether too long on my attempt to avoid case-of-case
in situations where it is a Bad Thing. All the action is in the
case for mkDupableAlt that handles cases with a single alternative.
I've added rather extensive comments, and it finally seems to be working
more or less right. If you compile (say) GHC/Real.o you'll see quite a
few case-of-cases remain (which didn't happen before), and they mostly look
pretty sensible to me.
simonpj@microsoft.com [Wed, 16 Aug 2006 10:48:31 +0000 (10:48 +0000)]
Don't build unnecessary lets in knownCon
Faced with
case x of y { (a,b) -> rhs }
where x is bound to (c,d), we were generating
let y = (c,d) in rhs
and thenn hoping to get rid of the y binding by CSE or some such. It's
better simply not to build it in the first place, by generating
let y = x in rhs
This patch does the job.
simonpj@microsoft.com [Wed, 16 Aug 2006 10:48:17 +0000 (10:48 +0000)]
Comments only
simonpj@microsoft.com [Wed, 16 Aug 2006 08:58:09 +0000 (08:58 +0000)]
Refactoring, plus record recursive-function *components* as RecArg too
simonpj@microsoft.com [Wed, 16 Aug 2006 08:56:28 +0000 (08:56 +0000)]
Record constructor arg occs correctly (bug-fix)
I was forgetting the non-pattern-matched type args of a constructor.
simonpj@microsoft.com [Wed, 16 Aug 2006 08:56:12 +0000 (08:56 +0000)]
Disable form-checking for rule LHSs
Previously we checked the form of the arguments of a RULE lhs, to
ensure that they were simple applications. There was no good reason
for that, save to prevent you writing LHSs that were unlikely to match.
And Don Stewart found he wanted to do something we didn't allow (a section,
I think). So I have just disabled the check.
simonpj@microsoft.com [Tue, 15 Aug 2006 12:34:02 +0000 (12:34 +0000)]
Allow class and instance decls in hs-boot files
For some reason, in 6.5 the manual said you could put a class decl in
an interface file, but not an instance decl; whereas the implementation
was exactly the othe way round.
This patch makes it possible to put *both* class and instance decls
in an interface file.
I also did a bit of re-factoring; comparing the declarations in the
hs-boot and hs file is now done by converting to IfaceSyn, because we
have good comparison operations for IfaceSyn already implemented.
This fixed a bug that previously let through an inconsistent declaration
of a data type.
The remaining infelicity concerns "abstract" TyCons. They are a bit
of a hack anyway; and Classes are not handled in the same way. Need
to think about this, but I think it's probably ok as it stands.
simonpj@microsoft.com [Tue, 15 Aug 2006 07:59:28 +0000 (07:59 +0000)]
Reject derivable type classes with higher-rank methods
Trac #864 suggested a derivable type class with a higher-rank method.
In principle this is quite do-able, but in practice the mechanism works
by generating source code and then doing type inference. To make this work
with higher-rank types would require impredicative polymorphism. And we
do have that, so it could probably be made to work by generating (source-level)
type annotations. But it's real work, so I'm settling for generating a
decent error message rather than crashing.
simonpj@microsoft.com [Tue, 15 Aug 2006 16:26:05 +0000 (16:26 +0000)]
SpecConstr now specialises on constants and lambdas
Roman inspired me to beef up SpecConstr to deal with
a) constant arguments
b) lambda arguments
This is described in elaborate comments in the file:
Note [Specialising for constant parameters]
Note [Specialising for lambda parameters]
I also took the opportunity to fix the usage analysis done by
SpecConstr, which was only handling the top-level correctly.
Now it does nesting too.
simonpj@microsoft.com [Tue, 15 Aug 2006 16:20:30 +0000 (16:20 +0000)]
Fix two bugs in rule-matching
These two typo-like bugs have been there for a long time!
One concerns the selection of overlapping rules,
which was back to front
The other was name-lining-up bug in the Case case of matching
This patch also arranges to export matchN.
(Not a good name, but still!)
simonpj@microsoft.com [Tue, 15 Aug 2006 16:19:47 +0000 (16:19 +0000)]
Moving list-length code from one place in the file to another
simonpj@microsoft.com [Tue, 15 Aug 2006 16:18:29 +0000 (16:18 +0000)]
Make UniqSM into a proper monad
simonpj@microsoft.com [Tue, 15 Aug 2006 07:02:46 +0000 (07:02 +0000)]
Typo in patch that dealt with duplicating continuations in Simplify
simonpj@microsoft.com [Mon, 14 Aug 2006 16:54:24 +0000 (16:54 +0000)]
Be more conservative about duplicating continuations
Roman found that GHC was duplicating continuations that arose (essentially)
from uses of 'seq', or strict constructors. This fixes the problem;
see the comments mkDupableCont (the Select case with a single alternative).
I'm a little concerned that this may also miss useful case-of-case
tranformations, so I'd like to know if anyone finds that this patch
makes performance worse.
To make it a bit more gung-ho, one could check for all the binders
being dead, before choosing this new, conservative alternative.
simonpj@microsoft.com [Mon, 14 Aug 2006 16:51:27 +0000 (16:51 +0000)]
Inline into tail-called constructor args
Consider
x = case y of { True -> (p,q); ... }
The occurrence analyser was marking p,q as 'Many', because they args
of a constructor in an RhsCtxt. But actually they aren't in a RhsCtxt,
and in this case it's better to inline.
simonpj@microsoft.com [Mon, 14 Aug 2006 16:50:43 +0000 (16:50 +0000)]
Improve exprIsCheap
exprIsCheap is meant to return True iff it's ok to push the expression
inside a lambda. But the previous version would return True of a nested
construtor application like (1:2:3:[]), which isn't right.
This patch re-factors the code somewhat, and fixes the bug.
bringert@cs.chalmers.se [Mon, 14 Aug 2006 11:32:42 +0000 (11:32 +0000)]
Added xhtml and cgi as default libraries.
simonpj@microsoft.com [Mon, 14 Aug 2006 09:56:17 +0000 (09:56 +0000)]
Improve error message in TcHsType
Fixes Trac #863.
Test is tcfail162
sven.panne@aedion.de [Fri, 11 Aug 2006 15:13:53 +0000 (15:13 +0000)]
Warning police: Removed overlapped pattern warnings
simonpj@microsoft.com [Fri, 11 Aug 2006 14:28:42 +0000 (14:28 +0000)]
Complete -fmono-pat-binds patch
When adding the experimental -fmono-pat-binds, I forgot to check
for type signatures of the now-monomorphic patterns. This patch
completes the job.
I documented the design too:
http://haskell.galois.com/cgi-bin/haskell-prime/trac.cgi/wiki/MonomorphicPatternBindings
sven.panne@aedion.de [Fri, 11 Aug 2006 14:05:12 +0000 (14:05 +0000)]
Avoid warning about overlapped pattern for Linux target
simonpj@microsoft.com [Fri, 11 Aug 2006 13:33:17 +0000 (13:33 +0000)]
Improve error message layouts
simonpj@microsoft.com [Fri, 11 Aug 2006 13:33:02 +0000 (13:33 +0000)]
Add type signature