ghc-hetmet.git
14 years agoTweak alternative layout rule
Ian Lynagh [Sun, 29 Nov 2009 15:23:23 +0000 (15:23 +0000)]
Tweak alternative layout rule

14 years agoMake the alternative layout rule cope with file pragmas
Ian Lynagh [Sun, 29 Nov 2009 14:58:40 +0000 (14:58 +0000)]
Make the alternative layout rule cope with file pragmas

14 years agoGive more informative error messages
Ian Lynagh [Sun, 29 Nov 2009 03:10:29 +0000 (03:10 +0000)]
Give more informative error messages
We used to just get
    ghc: panic! (the 'impossible' happened)
      (GHC version 6.13.20091128 for x86_64-unknown-linux):
        too few bytes. Failed reading at byte position 32753
with no indication of what was being parsed.

14 years agoTeach advanceSrcLoc about tab characters
Ian Lynagh [Sat, 28 Nov 2009 15:12:04 +0000 (15:12 +0000)]
Teach advanceSrcLoc about tab characters

14 years agoWhitespace only
Ian Lynagh [Sat, 28 Nov 2009 15:07:31 +0000 (15:07 +0000)]
Whitespace only

14 years agoColumns now start at 1, as lines already did
Ian Lynagh [Fri, 27 Nov 2009 22:40:50 +0000 (22:40 +0000)]
Columns now start at 1, as lines already did
Also corrected a couple of line 0's to line 1

14 years agoRemove configure tests on tarballs that no longer exist
Ian Lynagh [Fri, 27 Nov 2009 15:01:01 +0000 (15:01 +0000)]
Remove configure tests on tarballs that no longer exist

14 years agoImplement non-decreasing do indentation in the alternative layout rule
Ian Lynagh [Fri, 27 Nov 2009 01:19:32 +0000 (01:19 +0000)]
Implement non-decreasing do indentation in the alternative layout rule

14 years agoadd docs for Unicode entities in #2978
Simon Marlow [Wed, 25 Nov 2009 15:36:49 +0000 (15:36 +0000)]
add docs for Unicode entities in #2978

14 years agoApply patch from #2978: add more Unicode syntax
Simon Marlow [Fri, 18 Sep 2009 13:03:33 +0000 (13:03 +0000)]
Apply patch from #2978: add more Unicode syntax

14 years agoUse UTF-8 explicitly for InstalledPackageInfo
Simon Marlow [Wed, 25 Nov 2009 14:17:30 +0000 (14:17 +0000)]
Use UTF-8 explicitly for InstalledPackageInfo
So ghc-pkg register/update takes input in UTF-8, and ghc-pkg dump
outputs in UTF-8.  Textual package config files in the package DB are
assumed to be in UTF-8.

14 years agoComments only, esp about RecStmts
simonpj@microsoft.com [Thu, 26 Nov 2009 16:32:41 +0000 (16:32 +0000)]
Comments only, esp about RecStmts

14 years agoFix a bug in alternative layout rule
Ian Lynagh [Wed, 25 Nov 2009 23:19:01 +0000 (23:19 +0000)]
Fix a bug in alternative layout rule

14 years agoFix a bug in alternative layout
Ian Lynagh [Wed, 25 Nov 2009 23:06:16 +0000 (23:06 +0000)]
Fix a bug in alternative layout
And make the code simpler in the process!

14 years agoBug fix for alternative layout rule
Ian Lynagh [Wed, 25 Nov 2009 20:58:09 +0000 (20:58 +0000)]
Bug fix for alternative layout rule

14 years agoTweak alternative layout rule
Ian Lynagh [Wed, 25 Nov 2009 19:38:54 +0000 (19:38 +0000)]
Tweak alternative layout rule

14 years agoAdd unboxed parentheses to the alternative layout rule
Ian Lynagh [Wed, 25 Nov 2009 18:24:21 +0000 (18:24 +0000)]
Add unboxed parentheses to the alternative layout rule

14 years agoTweak the warning suppression flags used in Lexer
Ian Lynagh [Wed, 25 Nov 2009 17:18:15 +0000 (17:18 +0000)]
Tweak the warning suppression flags used in Lexer

14 years agoImplement the alternative layout rule
Ian Lynagh [Wed, 25 Nov 2009 17:16:56 +0000 (17:16 +0000)]
Implement the alternative layout rule
Caution: Largely untested

14 years agoFix some warning in Lexer
Ian Lynagh [Tue, 24 Nov 2009 23:37:26 +0000 (23:37 +0000)]
Fix some warning in Lexer

14 years agothreadStackOverflow: check whether stack squeezing released some stack (#3677)
Simon Marlow [Wed, 25 Nov 2009 12:59:17 +0000 (12:59 +0000)]
threadStackOverflow: check whether stack squeezing released some stack (#3677)

In a stack overflow situation, stack squeezing may reduce the stack
size, but we don't know whether it has been reduced enough for the
stack check to succeed if we try again.  Fortunately stack squeezing
is idempotent, so all we need to do is record whether *any* squeezing
happened.  If we are at the stack's absolute -K limit, and stack
squeezing happened, then we try running the thread again.

We also want to avoid enlarging the stack if squeezing has already
released some of it.  However, we don't want to get into a
pathalogical situation where a thread has a nearly full stack (near
its current limit, but not near the absolute -K limit), keeps
allocating a little bit, squeezing removes a little bit, and then it
runs again.  So to avoid this, if we squeezed *and* there is still
less than BLOCK_SIZE_W words free, then we enlarge the stack anyway.

14 years agoadd a comment to TSO_MARKED
Simon Marlow [Wed, 25 Nov 2009 10:49:54 +0000 (10:49 +0000)]
add a comment to TSO_MARKED

14 years agoPass --no-user-package-conf to ghc-pkg in bindisttest
Roman Leshchinskiy [Wed, 25 Nov 2009 11:59:53 +0000 (11:59 +0000)]
Pass --no-user-package-conf to ghc-pkg in bindisttest

14 years agoAdd a note saying what Haddock relies on about Instance.is_dfun
David Waern [Tue, 24 Nov 2009 21:03:08 +0000 (21:03 +0000)]
Add a note saying what Haddock relies on about Instance.is_dfun

14 years agoTreat () as an enumeration tycon
Ian Lynagh [Tue, 24 Nov 2009 01:13:13 +0000 (01:13 +0000)]
Treat () as an enumeration tycon
This fixes deriving Ord (), which previously failed with
  ghc-stage1: panic! (the 'impossible' happened)
    (GHC version 6.13.20091123 for x86_64-unknown-linux):
          TcGenDeriv:mk_FunBind

14 years agoWhitespace only
Ian Lynagh [Tue, 24 Nov 2009 00:32:21 +0000 (00:32 +0000)]
Whitespace only

14 years agoinline has moved to GHC.Magic
Ian Lynagh [Mon, 23 Nov 2009 20:03:08 +0000 (20:03 +0000)]
inline has moved to GHC.Magic

14 years agoUse the ghc-perl tarball on Windows, instead of the msys one
Ian Lynagh [Fri, 20 Nov 2009 15:39:53 +0000 (15:39 +0000)]
Use the ghc-perl tarball on Windows, instead of the msys one

14 years agoInstall perl on Windows
Ian Lynagh [Fri, 20 Nov 2009 22:38:30 +0000 (22:38 +0000)]
Install perl on Windows

14 years agoRemove cprAnalysis directory from hs-source-dirs
simonpj@microsoft.com [Fri, 20 Nov 2009 16:19:11 +0000 (16:19 +0000)]
Remove cprAnalysis directory from hs-source-dirs

14 years agoRemove -fasm from mk/validate-settings.mk
Ian Lynagh [Fri, 20 Nov 2009 12:56:56 +0000 (12:56 +0000)]
Remove -fasm from mk/validate-settings.mk
Makes it easier to do unregisterised validate runs

14 years agoFix some dependencies in bindists
Ian Lynagh [Fri, 20 Nov 2009 12:53:42 +0000 (12:53 +0000)]
Fix some dependencies in bindists
We can't depend on sources in a bindist, because we don't have the sources.

14 years agoAdd a rule to allow us to sdist libraries easily
Ian Lynagh [Thu, 19 Nov 2009 16:05:27 +0000 (16:05 +0000)]
Add a rule to allow us to sdist libraries easily

14 years agoCheck upper/lower bounds on various RTS flags (#3633)
Simon Marlow [Thu, 19 Nov 2009 14:24:22 +0000 (14:24 +0000)]
Check upper/lower bounds on various RTS flags (#3633)

Also, make K mean 1024 rather than 1000, in RTS flags (similarly for M
and G).  The main reason I want to change it is that otherwise this
might be confusing:

exp3_8: error in RTS option -H4k: size outside allowed range (4096 - 18446744073709551615)

And I think the original reason for using 1000 instead of 1024,
worries about direct-mapped caches, is not an issue in this context
(even if you can find a direct-mapped cache these days).

14 years agodefine HS_WORD_MAX
Simon Marlow [Thu, 19 Nov 2009 14:01:43 +0000 (14:01 +0000)]
define HS_WORD_MAX

14 years agoPrint the prog name in errorBelch() even if prog_argv is not set yet
Simon Marlow [Thu, 19 Nov 2009 13:52:30 +0000 (13:52 +0000)]
Print the prog name in errorBelch() even if prog_argv is not set yet
This means we get the prog name in error messages from the flag parser

14 years agoRemove dead code
Roman Leshchinskiy [Thu, 12 Nov 2009 07:04:55 +0000 (07:04 +0000)]
Remove dead code

14 years agoRemove the (very) old strictness analyser
simonpj@microsoft.com [Thu, 19 Nov 2009 15:43:47 +0000 (15:43 +0000)]
Remove the (very) old strictness analyser

I finally got tired of the #ifdef OLD_STRICTNESS stuff.  I had been
keeping it around in the hope of doing old-to-new comparisions, but
have failed to do so for many years, so I don't think it's going to
happen.  This patch deletes the clutter.

14 years agoMake INLINE warning more precise
simonpj@microsoft.com [Thu, 19 Nov 2009 13:27:11 +0000 (13:27 +0000)]
Make INLINE warning more precise

14 years agoImplement -fexpose-all-unfoldings, and fix a non-termination bug
simonpj@microsoft.com [Thu, 19 Nov 2009 12:57:11 +0000 (12:57 +0000)]
Implement -fexpose-all-unfoldings, and fix a non-termination bug

The -fexpose-all-unfoldings flag arranges to put unfoldings for *everything*
in the interface file.  Of course,  this makes the file a lot bigger, but
it also makes it complete, and that's great for supercompilation; or indeed
any whole-program work.

Consequences:
  * Interface files need to record loop-breaker-hood.  (Previously,
    loop breakers were never exposed, so that info wasn't necessary.)
    Hence a small interface file format change.

  * When inlining, must check loop-breaker-hood. (Previously, loop
    breakers didn't have an unfolding at all, so no need to check.)

  * Ditto in exprIsConApp_maybe.  Roman actually tripped this bug,
    because a DFun, which had an unfolding, was also a loop breaker

  * TidyPgm.tidyIdInfo must be careful to preserve loop-breaker-hood

So Id.idUnfolding checks for loop-breaker-hood and returns NoUnfolding
if so. When you want the unfolding regardless of loop-breaker-hood,
use Id.realIdUnfolding.

I have not documented the flag yet, because it's experimental.  Nor
have I tested it thoroughly.  But with the flag off (the normal case)
everything should work.

14 years agoRe-implement the binder-swap stuff in OccurAnal
simonpj@microsoft.com [Thu, 19 Nov 2009 12:45:24 +0000 (12:45 +0000)]
Re-implement the binder-swap stuff in OccurAnal

This is a pretty big patch, but it has a very local effect.
It affects only the binder-swap mechanism in OccurAnal, which
was not working well becuase it's more subtle than I'd realised
(See Note [getProxies is subtle]).  I think this does a much
better job.

14 years agoTry harder not to make DFuns into loop breakers
simonpj@microsoft.com [Thu, 19 Nov 2009 12:41:27 +0000 (12:41 +0000)]
Try harder not to make DFuns into loop breakers

See Note [DFuns should not be loop breakers]

14 years agoExtend the GHCi FAQ slightly
simonpj@microsoft.com [Tue, 17 Nov 2009 13:23:08 +0000 (13:23 +0000)]
Extend the GHCi FAQ slightly

14 years agoAdd gnutar to the list of names we use when looking for GNU tar
Ian Lynagh [Thu, 19 Nov 2009 14:49:27 +0000 (14:49 +0000)]
Add gnutar to the list of names we use when looking for GNU tar

14 years agoAdd support for the man page to the new build system
Ian Lynagh [Thu, 19 Nov 2009 14:08:11 +0000 (14:08 +0000)]
Add support for the man page to the new build system

14 years agoRefactor case-merging and identical-alternative optimisations
simonpj@microsoft.com [Thu, 19 Nov 2009 12:37:04 +0000 (12:37 +0000)]
Refactor case-merging and identical-alternative optimisations

These two optimisations were originally done by SimplUtils.mkCase
*after* all the pieces have been simplified.  Some while ago I
moved them *before*, so they were done by SimplUtils.prepareAlts.
It think the reason was that I couldn't rely on the dead-binder
information on OutIds, and that info is useful in these optimisations.

However,
 (a) Other changes (notably moving case-binder-swap to OccurAnal)
     have meant that dead-binder information is accurate in
     OutIds

 (b) When there is a cascade of case-merges, they happen in
     one sweep if you do it after, but in many sweeps if you
     do it before.  Reason: doing it after means you are looking
     at nice simplified Core.

14 years agoFix a nasty infelicity in the size computation of CoreUnfold
simonpj@microsoft.com [Thu, 19 Nov 2009 11:57:36 +0000 (11:57 +0000)]
Fix a nasty infelicity in the size computation of CoreUnfold

The size computation was treating gigantic case expressions as
practically free, which they really aren't.  It was exacerbated by
recent decisions to charge 0 for naked variables and constructors, so
the RHS of the case might look free too.  A good example was
Foreign.C.Error.errnoToIOError, which hsa lots of join points
that were getting inlined way to vigorously, so we had:

  *** Simplifier Phase 2 [main]:
      Result size = 2983
  *** Core Linted result of Simplifier mode 2 [main], iteration 1 out of 4:
      Result size = 640327
  *** Core Linted result of Simplifier mode 2 [main], iteration 2 out of 4:
      Result size = 1659

Notice that gigantic intermediate!

This patch adds a small charge for each *alternative*.  Of course,
that'll also mean that there's a bit less inling of things involving
case expressions.

14 years agoComments and white space only
simonpj@microsoft.com [Thu, 19 Nov 2009 11:51:22 +0000 (11:51 +0000)]
Comments and white space only

14 years agoFix splitAppTys
Roman Leshchinskiy [Thu, 19 Nov 2009 10:26:39 +0000 (10:26 +0000)]
Fix splitAppTys

14 years agoWindows DLLs: Slurp across the actually static version of libffi
Ben.Lippmeier@anu.edu.au [Thu, 19 Nov 2009 00:02:39 +0000 (00:02 +0000)]
Windows DLLs: Slurp across the actually static version of libffi

14 years agoWindows DLLs: Don't rely on stg/DLL.h being included in RtsAPI.h
Ben.Lippmeier@anu.edu.au [Wed, 18 Nov 2009 11:05:48 +0000 (11:05 +0000)]
Windows DLLs: Don't rely on stg/DLL.h being included in RtsAPI.h

14 years agoFix warnings about unused imports
Ben.Lippmeier@anu.edu.au [Wed, 18 Nov 2009 11:05:25 +0000 (11:05 +0000)]
Fix warnings about unused imports

14 years agoWindows DLLs: stifle more warnings about auto imported symbols
Ben.Lippmeier@anu.edu.au [Wed, 18 Nov 2009 09:01:05 +0000 (09:01 +0000)]
Windows DLLs: stifle more warnings about auto imported symbols

14 years agoWindows DLLs: stifle warnings about symbols being auto imported from DLLs
Ben.Lippmeier@anu.edu.au [Wed, 18 Nov 2009 05:15:26 +0000 (05:15 +0000)]
Windows DLLs: stifle warnings about symbols being auto imported from DLLs

14 years agoWindows DLLs: add #ifdefery to turn off DLL import of libffi when building statically.
Ben.Lippmeier@anu.edu.au [Wed, 18 Nov 2009 04:39:01 +0000 (04:39 +0000)]
Windows DLLs: add #ifdefery to turn off DLL import of libffi when building statically.

14 years agoWindows DLLs: disable extra shutdownHaskell() when unloading the RTS DLL
Ben.Lippmeier@anu.edu.au [Tue, 17 Nov 2009 05:06:48 +0000 (05:06 +0000)]
Windows DLLs: disable extra shutdownHaskell() when unloading the RTS DLL

14 years agoWindows DLLs: remove dup symbol from def file
Ben.Lippmeier@anu.edu.au [Tue, 17 Nov 2009 04:38:51 +0000 (04:38 +0000)]
Windows DLLs: remove dup symbol from def file

14 years agoUse opt_PIC not #defined __PIC__ in compiler source.
Ben.Lippmeier@anu.edu.au [Tue, 17 Nov 2009 04:37:16 +0000 (04:37 +0000)]
Use opt_PIC not #defined __PIC__ in compiler source.

14 years agoWindows DLLs: CHARLIKE_closure and INTLIKE_closure aren't defined in this way.
Ben.Lippmeier@anu.edu.au [Sat, 14 Nov 2009 06:32:40 +0000 (06:32 +0000)]
Windows DLLs: CHARLIKE_closure and INTLIKE_closure aren't defined in this way.

14 years agoIf a comment says "Is this correct?", it's not.
Ben.Lippmeier@anu.edu.au [Sat, 14 Nov 2009 06:31:57 +0000 (06:31 +0000)]
If a comment says "Is this correct?", it's not.

14 years agoWindows DLLs: gmp is in the integer-gmp package now.
Ben.Lippmeier@anu.edu.au [Sat, 14 Nov 2009 06:30:46 +0000 (06:30 +0000)]
Windows DLLs: gmp is in the integer-gmp package now.

14 years agoUse DLL aware runIO_closure instead of base_GHCziTopHandler_runIO_closure directly
Ben.Lippmeier@anu.edu.au [Sat, 14 Nov 2009 06:15:59 +0000 (06:15 +0000)]
Use DLL aware runIO_closure instead of base_GHCziTopHandler_runIO_closure directly

14 years agoRTS also uses runSparks_closure from base
Ben.Lippmeier@anu.edu.au [Sat, 14 Nov 2009 06:14:45 +0000 (06:14 +0000)]
RTS also uses runSparks_closure from base

14 years agoProvide extralibs when linking Windows DLLs
Ben.Lippmeier@anu.edu.au [Sat, 14 Nov 2009 06:11:09 +0000 (06:11 +0000)]
Provide extralibs when linking Windows DLLs

14 years agoDon't share low valued Int and Char closures with Windows DLLs
Ben.Lippmeier@anu.edu.au [Sat, 14 Nov 2009 06:04:55 +0000 (06:04 +0000)]
Don't share low valued Int and Char closures with Windows DLLs

14 years agoWindows DLLs: use one import lib for each DLL the RTS needs.
Ben.Lippmeier@anu.edu.au [Wed, 11 Nov 2009 01:48:21 +0000 (01:48 +0000)]
Windows DLLs: use one import lib for each DLL the RTS needs.

14 years agoAdd autoconf code to locate dlltool on Windows
Ben.Lippmeier@anu.edu.au [Tue, 10 Nov 2009 05:12:57 +0000 (05:12 +0000)]
Add autoconf code to locate dlltool on Windows

14 years agoBreak recursive imports between the RTS and base library on Windows.
Ben.Lippmeier@anu.edu.au [Fri, 6 Nov 2009 06:27:32 +0000 (06:27 +0000)]
Break recursive imports between the RTS and base library on Windows.

The file rts/win32/libHSbase.def contains a list of all the
symbols from the base library that the RTS needs.

When building the RTS into a DLL on Windows, we want to link the DLL
for the RTS before we link the DLL for the base library. We use
libHSbase.def to make the "import library" libHSbase.so.a, which
contains stubs for each of the symbols from the base library that
the RTS needs.

14 years agoAdd the msysCORE*.tar.gz tarball to the list of tarballs we unpack
Ian Lynagh [Wed, 18 Nov 2009 19:55:23 +0000 (19:55 +0000)]
Add the msysCORE*.tar.gz tarball to the list of tarballs we unpack

14 years agoPut the libffi files to be installed into a dist directory
Ian Lynagh [Wed, 18 Nov 2009 15:05:08 +0000 (15:05 +0000)]
Put the libffi files to be installed into a dist directory
This meakes it easier to correctly clean libffi

14 years agoAdd ghc-tarballs to the list of directories that go into an sdist
Ian Lynagh [Wed, 18 Nov 2009 13:10:47 +0000 (13:10 +0000)]
Add ghc-tarballs to the list of directories that go into an sdist

14 years agoRemove redundant libffi/tarball directory
Ian Lynagh [Wed, 18 Nov 2009 12:41:02 +0000 (12:41 +0000)]
Remove redundant libffi/tarball directory
We now use the tarball in the ghc-tarballs repo

14 years agoFix gen_contents_index on MSYS
Ian Lynagh [Tue, 17 Nov 2009 22:35:56 +0000 (22:35 +0000)]
Fix gen_contents_index on MSYS
On MSYS
    sed 's/.*[ \t]//'
wasn't matching
    version:<tab>1.0
so I've switched to
    's/.*[[:space:]]//'
which works on Linux, cygwin and MSYS.

14 years agoinclude the GHC package docs in a bindist
Simon Marlow [Tue, 17 Nov 2009 15:11:33 +0000 (15:11 +0000)]
include the GHC package docs in a bindist

14 years agoexclude some haddock-related rules during BINDIST
Simon Marlow [Tue, 17 Nov 2009 15:11:23 +0000 (15:11 +0000)]
exclude some haddock-related rules during BINDIST

14 years agoAdd an install-docs target that emits a helpful diagnostic (#3662)
Simon Marlow [Mon, 16 Nov 2009 12:01:37 +0000 (12:01 +0000)]
Add an install-docs target that emits a helpful diagnostic (#3662)

14 years agofix install_docs dependencies, and add a missing $(INSTALL_DIR)
Simon Marlow [Mon, 16 Nov 2009 11:56:30 +0000 (11:56 +0000)]
fix install_docs dependencies, and add a missing $(INSTALL_DIR)

14 years agoTweak to the directory-building rule
Simon Marlow [Fri, 13 Nov 2009 12:57:19 +0000 (12:57 +0000)]
Tweak to the directory-building rule
So we don't try to recreate directories just because they are older
than mkdirhier, since mkdirhier won't touch them.

14 years agoexprIsHNF should "look through" lets
simonpj@microsoft.com [Tue, 17 Nov 2009 12:55:26 +0000 (12:55 +0000)]
exprIsHNF should "look through" lets

I can't quite remember when I spotted this, but exprIsHNF (and
similarly exprIsConLike) should ignore enclosing let-bindings,
since they don't affect termination.

14 years agoImprovement to typecheck higher-rank rules better
simonpj@microsoft.com [Tue, 17 Nov 2009 12:54:17 +0000 (12:54 +0000)]
Improvement to typecheck higher-rank rules better

See Note [Typechecking rules] in TcRules.
Suggested by Roman

14 years agoApply RULES to simplified arguments
simonpj@microsoft.com [Tue, 17 Nov 2009 10:44:37 +0000 (10:44 +0000)]
Apply RULES to simplified arguments

See Note [RULEs apply to simplified arguments] in Simplify.lhs
A knock-on effect is that rules apply *after* we try inlining
(which uses un-simplified arguments), but that seems fine.

14 years agoImprovements to pretty-printing of Core
simonpj@microsoft.com [Tue, 17 Nov 2009 10:36:26 +0000 (10:36 +0000)]
Improvements to pretty-printing of Core

14 years agoFix formatting of module deprecation/warning messages
Duncan Coutts [Sun, 15 Nov 2009 15:56:17 +0000 (15:56 +0000)]
Fix formatting of module deprecation/warning messages
It was accidentally using list syntax. Fixes #3303 again.

14 years agoWibble to comment
simonpj@microsoft.com [Fri, 13 Nov 2009 14:59:44 +0000 (14:59 +0000)]
Wibble to comment

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

See Note [Eta-expanding INLINE things] in DsBinds

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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