ghc-hetmet.git
18 years ago[project @ 2005-08-04 02:09:36 by wolfgang]
wolfgang [Thu, 4 Aug 2005 02:09:36 +0000 (02:09 +0000)]
[project @ 2005-08-04 02:09:36 by wolfgang]
Check for RTLD_DEFAULT in dlfcn.h and use it if it is available.
(On Mac OS X its value is -2, and using NULL instead does not work.)

MERGE TO STABLE

18 years ago[project @ 2005-08-03 15:16:14 by simonmar]
simonmar [Wed, 3 Aug 2005 15:16:14 +0000 (15:16 +0000)]
[project @ 2005-08-03 15:16:14 by simonmar]
fix bogus #ifdef in defaultHscTarget

18 years ago[project @ 2005-08-03 13:53:35 by simonmar]
simonmar [Wed, 3 Aug 2005 13:53:36 +0000 (13:53 +0000)]
[project @ 2005-08-03 13:53:35 by simonmar]
Patch from SimonPJ (slightly tweaked by me after checking performance
results):

Fix occasional O(n^2) behaviour in the simplifier.  There was a
possibility that by inlining a binding, we could re-simplify an
arbitrary sized expression.  This patch fixes it by moving the
inlining of arbitrary-sized expressiong to the binding site
(preInlineUnconditionally), so the decision to inline happens before
simplifying the RHS.  To do this, we have to collect more information
during the occurrence analysis phase.

We still make inlining decisions at the call site, but they are always
size-limited, so we can't get quadratic blowup.

18 years ago[project @ 2005-08-03 10:42:53 by simonmar]
simonmar [Wed, 3 Aug 2005 10:42:53 +0000 (10:42 +0000)]
[project @ 2005-08-03 10:42:53 by simonmar]
Fix the location of _stub.o files when compiling with -odir.  The
comment from the source:

-- The _stub.c file is derived from the haskell source file (but stored
-- in hscStubCOutName in the dflags for some reason, probably historical).
-- Consequently, we derive the _stub.o filename from the haskell object
-- filename.
--
-- This isn't necessarily the same as the object filename we
-- would get if we just compiled the _stub.c file using the pipeline.
-- For example:
--
--    ghc src/A.hs -odir obj
--
-- results in obj/A.o, and src/A_stub.c.  If we compile src/A_stub.c with
-- -odir obj, we would get obj/src/A_stub.o, which is wrong; we want
-- obj/A_stub.o.

18 years ago[project @ 2005-08-03 09:43:06 by simonmar]
simonmar [Wed, 3 Aug 2005 09:43:06 +0000 (09:43 +0000)]
[project @ 2005-08-03 09:43:06 by simonmar]
Update documentation for ghc-pkg list and ghc-pkg latest.

18 years ago[project @ 2005-08-03 09:34:55 by simonmar]
simonmar [Wed, 3 Aug 2005 09:34:55 +0000 (09:34 +0000)]
[project @ 2005-08-03 09:34:55 by simonmar]
Tidyup, and make all the commands that take a package identifier
behave the same.  Previously, naming a package without a version
number only matched the same package identifier, if you wanted to
match multiple packages you had to say P-*.  However, the new list and
latest commands behave differently, which was inconsistent.

I believe the previous behaviour was for backwards compatibility with
packages that had no version number.  However, it's unlikely that this
is ever useful, so I've changed the semantics so that a package name
on its own matches all versions of that package.

18 years ago[project @ 2005-08-03 09:13:32 by simonmar]
simonmar [Wed, 3 Aug 2005 09:13:32 +0000 (09:13 +0000)]
[project @ 2005-08-03 09:13:32 by simonmar]
- Add "ghc-pkg list <pkg>" to list packages matching <pkg>
- Add "ghc-pkg latest <pkg>" to show the latest version of <pkg>
- Add --simple-output option to produce a more easily slurpable output
  from ghc-pkg list.

Patch from Lennart Kolmodin <kolmodin at dtek.chalmers.se>

18 years ago[project @ 2005-08-02 14:59:39 by simonmar]
simonmar [Tue, 2 Aug 2005 14:59:39 +0000 (14:59 +0000)]
[project @ 2005-08-02 14:59:39 by simonmar]
small tidyup for memInventory

18 years ago[project @ 2005-08-02 14:58:40 by simonmar]
simonmar [Tue, 2 Aug 2005 14:58:40 +0000 (14:58 +0000)]
[project @ 2005-08-02 14:58:40 by simonmar]
Fix up GC debugging output

18 years ago[project @ 2005-08-02 14:58:23 by simonmar]
simonmar [Tue, 2 Aug 2005 14:58:23 +0000 (14:58 +0000)]
[project @ 2005-08-02 14:58:23 by simonmar]
Fix tiny debugging output bug

18 years ago[project @ 2005-08-02 14:56:50 by simonmar]
simonmar [Tue, 2 Aug 2005 14:56:50 +0000 (14:56 +0000)]
[project @ 2005-08-02 14:56:50 by simonmar]
- move instance Show FastString into FastString module
- instance Outputable FastString should use ftext instead of unpackFS

18 years ago[project @ 2005-08-02 14:55:32 by simonmar]
simonmar [Tue, 2 Aug 2005 14:55:32 +0000 (14:55 +0000)]
[project @ 2005-08-02 14:55:32 by simonmar]
A little bit of strictness (doesn't actually help much)

18 years ago[project @ 2005-08-02 14:53:26 by simonmar]
simonmar [Tue, 2 Aug 2005 14:53:26 +0000 (14:53 +0000)]
[project @ 2005-08-02 14:53:26 by simonmar]
Fix an SCC

18 years ago[project @ 2005-08-02 14:05:37 by simonmar]
simonmar [Tue, 2 Aug 2005 14:05:37 +0000 (14:05 +0000)]
[project @ 2005-08-02 14:05:37 by simonmar]
Annotate foreign calls with volatile registers to reduce the amount of
saving that needs to be done.

18 years ago[project @ 2005-08-02 14:04:19 by simonmar]
simonmar [Tue, 2 Aug 2005 14:04:19 +0000 (14:04 +0000)]
[project @ 2005-08-02 14:04:19 by simonmar]
save + restore caller-saves registers around foreign calls

18 years ago[project @ 2005-08-02 14:03:40 by simonmar]
simonmar [Tue, 2 Aug 2005 14:03:40 +0000 (14:03 +0000)]
[project @ 2005-08-02 14:03:40 by simonmar]
Add callerSaveVolatileRegs for saving registers around C calls

18 years ago[project @ 2005-08-02 12:02:16 by simonmar]
simonmar [Tue, 2 Aug 2005 12:02:16 +0000 (12:02 +0000)]
[project @ 2005-08-02 12:02:16 by simonmar]
Add a ToDo

18 years ago[project @ 2005-08-02 12:01:57 by simonmar]
simonmar [Tue, 2 Aug 2005 12:01:57 +0000 (12:01 +0000)]
[project @ 2005-08-02 12:01:57 by simonmar]
Allow an empty list of volatile regs on a call

18 years ago[project @ 2005-08-01 15:25:09 by simonmar]
simonmar [Mon, 1 Aug 2005 15:25:09 +0000 (15:25 +0000)]
[project @ 2005-08-01 15:25:09 by simonmar]
Rmoeve a few lines that are provided by lib/compat/compat.mk

18 years ago[project @ 2005-08-01 15:24:26 by simonmar]
simonmar [Mon, 1 Aug 2005 15:24:26 +0000 (15:24 +0000)]
[project @ 2005-08-01 15:24:26 by simonmar]
For Windows (moved from ghc-pkg/Makefile):

HC_BOOT_LIBS += -lshell32

18 years ago[project @ 2005-08-01 15:20:01 by simonmar]
simonmar [Mon, 1 Aug 2005 15:20:01 +0000 (15:20 +0000)]
[project @ 2005-08-01 15:20:01 by simonmar]
Add explicit dependency for Distribution.Compat.FilePath

18 years ago[project @ 2005-07-29 20:21:50 by sof]
sof [Fri, 29 Jul 2005 20:21:50 +0000 (20:21 +0000)]
[project @ 2005-07-29 20:21:50 by sof]
win32/AsyncIO.c:onIOComplete(), awaitRequests():
  Avoid completion table overflow through the use of
  a semaphore. Worker threads (the producers) wait for a free
  event slot to appear, the RTS thread (consumer) signal slot
  availability once the completion event has been de-queued and
  processed.

  This bug only manifests itself in 'massively concurrent' code
  (>200 threads), where the threads simultaneously engage in IO
  through the async IO layer. conc023 and conc036 in the regression
  test suite are examples of such.

Merge to STABLE.

18 years ago[project @ 2005-07-28 15:42:48 by simonmar]
simonmar [Thu, 28 Jul 2005 15:42:48 +0000 (15:42 +0000)]
[project @ 2005-07-28 15:42:48 by simonmar]
- Remove -fno-cpr, which doesn't exist
- remove redundancy in description of -fno-full-laziness

18 years ago[project @ 2005-07-28 15:41:47 by simonmar]
simonmar [Thu, 28 Jul 2005 15:41:47 +0000 (15:41 +0000)]
[project @ 2005-07-28 15:41:47 by simonmar]
Document a few more options

18 years ago[project @ 2005-07-28 14:58:27 by simonpj]
simonpj [Thu, 28 Jul 2005 14:58:27 +0000 (14:58 +0000)]
[project @ 2005-07-28 14:58:27 by simonpj]
Make ghc -M work when you give multiple files with the same
module name.  We want to do this to the STABLE branch too,
but this commit will not merge; it'll need to be done
afresh.

18 years ago[project @ 2005-07-28 14:45:55 by simonpj]
simonpj [Thu, 28 Jul 2005 14:45:55 +0000 (14:45 +0000)]
[project @ 2005-07-28 14:45:55 by simonpj]
Restore costant folding

18 years ago[project @ 2005-07-28 13:51:54 by simonpj]
simonpj [Thu, 28 Jul 2005 13:51:54 +0000 (13:51 +0000)]
[project @ 2005-07-28 13:51:54 by simonpj]
Back out earlier version of TH fix (dont merge this)

18 years ago[project @ 2005-07-28 13:51:28 by simonpj]
simonpj [Thu, 28 Jul 2005 13:51:28 +0000 (13:51 +0000)]
[project @ 2005-07-28 13:51:28 by simonpj]
MERGE to STABLE

Fix a TH name-reification bug. The problem is that when you say

'name

in TH, you'd better load the home interface for "name", so that
deprecations are reported properly.

Fixes SourceForge
[ghc-Bugs-1246483 ] Template Haskell panic with class names

TH_reifyType2 is a test for it.

18 years ago[project @ 2005-07-28 13:12:02 by simonmar]
simonmar [Thu, 28 Jul 2005 13:12:02 +0000 (13:12 +0000)]
[project @ 2005-07-28 13:12:02 by simonmar]
comments about -fno-strict-aliasing

18 years ago[project @ 2005-07-28 12:57:13 by simonmar]
simonmar [Thu, 28 Jul 2005 12:57:13 +0000 (12:57 +0000)]
[project @ 2005-07-28 12:57:13 by simonmar]
optimise instance for lists: now we record the length first followed
by the elements.

HEADS UP: changes interface file representation, rebuild your libraries.

18 years ago[project @ 2005-07-28 12:48:25 by simonpj]
simonpj [Thu, 28 Jul 2005 12:48:25 +0000 (12:48 +0000)]
[project @ 2005-07-28 12:48:25 by simonpj]
Fix another minor bogon in the new rules stuff

18 years ago[project @ 2005-07-28 11:46:28 by simonmar]
simonmar [Thu, 28 Jul 2005 11:46:28 +0000 (11:46 +0000)]
[project @ 2005-07-28 11:46:28 by simonmar]
Add Distribution.Compat.FilePath to the relevant places.

18 years ago[project @ 2005-07-28 11:19:03 by simonmar]
simonmar [Thu, 28 Jul 2005 11:19:03 +0000 (11:19 +0000)]
[project @ 2005-07-28 11:19:03 by simonmar]
Fix a bad space leak in the native code generator: turn a couple of
lazy tuple matches into strict matches.

18 years ago[project @ 2005-07-27 23:00:52 by simonmar]
simonmar [Wed, 27 Jul 2005 23:00:52 +0000 (23:00 +0000)]
[project @ 2005-07-27 23:00:52 by simonmar]
Now required due to dependency from Distribution.ParseUtils

18 years ago[project @ 2005-07-27 15:46:19 by simonmar]
simonmar [Wed, 27 Jul 2005 15:46:19 +0000 (15:46 +0000)]
[project @ 2005-07-27 15:46:19 by simonmar]
back out revision 1.22; it led to very bad memory fragmentation.  A
rethink is in order.

18 years ago[project @ 2005-07-27 15:32:12 by simonmar]
simonmar [Wed, 27 Jul 2005 15:32:12 +0000 (15:32 +0000)]
[project @ 2005-07-27 15:32:12 by simonmar]
Fix a couple of recent bugs, and always check for memory leaks in the
block allocator when DEBUG is on (previous was under -DS).

18 years ago[project @ 2005-07-27 11:55:43 by simonpj]
simonpj [Wed, 27 Jul 2005 11:55:43 +0000 (11:55 +0000)]
[project @ 2005-07-27 11:55:43 by simonpj]
Bogon in RULE desguaring

18 years ago[project @ 2005-07-27 10:32:49 by simonmar]
simonmar [Wed, 27 Jul 2005 10:32:49 +0000 (10:32 +0000)]
[project @ 2005-07-27 10:32:49 by simonmar]
update for changes in stats output

18 years ago[project @ 2005-07-27 08:04:02 by simonpj]
simonpj [Wed, 27 Jul 2005 08:04:02 +0000 (08:04 +0000)]
[project @ 2005-07-27 08:04:02 by simonpj]
Try MERGE to STABLE

GHC does not do type subsumption in patterns.  But it should be fine if
the expected type and the pattern have the same type, even if they
are polymorphic.  But that test (in TcUnify.tcSubPat) wasn't implemented
right, which gave rise to perplexing messages like:

   Couldn't match `forall a. a -> b' against `forall a. a -> b'

This fixes the bug.
tc198 tests it, while tcfail145 tests the non-matching case.

18 years ago[project @ 2005-07-26 22:10:59 by simonmar]
simonmar [Tue, 26 Jul 2005 22:10:59 +0000 (22:10 +0000)]
[project @ 2005-07-26 22:10:59 by simonmar]
gcc has gone to town on the garbage collector and killed it: use
-optc-fno-strict-aliasing as a workaround for now.

18 years ago[project @ 2005-07-26 15:16:40 by simonmar]
simonmar [Tue, 26 Jul 2005 15:16:40 +0000 (15:16 +0000)]
[project @ 2005-07-26 15:16:40 by simonmar]
Avoid recording objects in the mutable list of generation 0 (bug
introduced on the HEAD recently, it seems)

18 years ago[project @ 2005-07-26 15:14:24 by simonmar]
simonmar [Tue, 26 Jul 2005 15:14:24 +0000 (15:14 +0000)]
[project @ 2005-07-26 15:14:24 by simonmar]
Fix retainer profiling on the HEAD

18 years ago[project @ 2005-07-26 14:44:22 by simonmar]
simonmar [Tue, 26 Jul 2005 14:44:36 +0000 (14:44 +0000)]
[project @ 2005-07-26 14:44:22 by simonmar]
add missing MUT_ARR_PTRS_FROZEN0 cases

18 years ago[project @ 2005-07-26 14:42:53 by simonmar]
simonmar [Tue, 26 Jul 2005 14:42:53 +0000 (14:42 +0000)]
[project @ 2005-07-26 14:42:53 by simonmar]
add missing case for MUT_ARR_PTRS_FROZEN0 (might fix some cases of
"internal error: heapCensus" in the HEAD)

18 years ago[project @ 2005-07-26 14:38:42 by simonmar]
simonmar [Tue, 26 Jul 2005 14:38:42 +0000 (14:38 +0000)]
[project @ 2005-07-26 14:38:42 by simonmar]
oops, fix heavy-handed C-k in prev commit

18 years ago[project @ 2005-07-26 13:13:20 by simonmar]
simonmar [Tue, 26 Jul 2005 13:14:14 +0000 (13:14 +0000)]
[project @ 2005-07-26 13:13:20 by simonmar]
some small optimisations

18 years ago[project @ 2005-07-26 12:15:54 by simonmar]
simonmar [Tue, 26 Jul 2005 12:15:54 +0000 (12:15 +0000)]
[project @ 2005-07-26 12:15:54 by simonmar]
printing C: use the quick printForC rather than the slow (but
prettier) printForUser.  This has been a ToDo for a while.

18 years ago[project @ 2005-07-26 12:14:03 by simonmar]
simonmar [Tue, 26 Jul 2005 12:14:03 +0000 (12:14 +0000)]
[project @ 2005-07-26 12:14:03 by simonmar]
Add a layer of write buffering over Handle when dumping the output:
this saves a lot of time because we're doing a lot of small writes,
and Handle operations have a non-trivial constant overhead due to the
thread-safety, exception-safety etc.

This improvement results in about a 10% reduction in compile time for
non-optimised, somewhat less for optimised compilation.

18 years ago[project @ 2005-07-26 10:11:37 by simonmar]
simonmar [Tue, 26 Jul 2005 10:11:37 +0000 (10:11 +0000)]
[project @ 2005-07-26 10:11:37 by simonmar]
Fix to previous tweaks

18 years ago[project @ 2005-07-26 08:31:21 by simonpj]
simonpj [Tue, 26 Jul 2005 08:31:21 +0000 (08:31 +0000)]
[project @ 2005-07-26 08:31:21 by simonpj]
When trimming type constructors for export, no need to trim enumerations,
because they don't give rise to any further exported things.

(Minor improvement: no need to merge)

18 years ago[project @ 2005-07-26 08:29:44 by simonpj]
simonpj [Tue, 26 Jul 2005 08:29:44 +0000 (08:29 +0000)]
[project @ 2005-07-26 08:29:44 by simonpj]
MERGE TO STABLE

Fix a TH bug.  When a type constructor was exported abstractly (which happens
when you don't have -O), and then reified in an importing module, the
reification crashed.

Now it just gives a TyCon with no constructors.

18 years ago[project @ 2005-07-26 08:16:24 by simonpj]
simonpj [Tue, 26 Jul 2005 08:16:24 +0000 (08:16 +0000)]
[project @ 2005-07-26 08:16:24 by simonpj]
Comments

18 years ago[project @ 2005-07-26 07:30:37 by simonpj]
simonpj [Tue, 26 Jul 2005 07:30:37 +0000 (07:30 +0000)]
[project @ 2005-07-26 07:30:37 by simonpj]
Revert accidental commit

18 years ago[project @ 2005-07-25 15:48:18 by simonmar]
simonmar [Mon, 25 Jul 2005 15:48:18 +0000 (15:48 +0000)]
[project @ 2005-07-25 15:48:18 by simonmar]
Make various -fvia-C options conditional on GHC < 6.4, since the
native code generator is a bit more robust/complete these days.

18 years ago[project @ 2005-07-25 14:12:48 by simonmar]
simonmar [Mon, 25 Jul 2005 14:12:51 +0000 (14:12 +0000)]
[project @ 2005-07-25 14:12:48 by simonmar]
Remove the ForeignObj# type, and all its PrimOps.  The new efficient
representation of ForeignPtr doesn't use ForeignObj# underneath, and
there seems no need to keep it.

18 years ago[project @ 2005-07-25 14:04:02 by simonmar]
simonmar [Mon, 25 Jul 2005 14:04:02 +0000 (14:04 +0000)]
[project @ 2005-07-25 14:04:02 by simonmar]
Compile GC.c with -O3 (unrolls some important loops)

18 years ago[project @ 2005-07-25 14:03:06 by simonmar]
simonmar [Mon, 25 Jul 2005 14:03:06 +0000 (14:03 +0000)]
[project @ 2005-07-25 14:03:06 by simonmar]
GC tweaks

18 years ago[project @ 2005-07-25 14:01:42 by simonmar]
simonmar [Mon, 25 Jul 2005 14:01:42 +0000 (14:01 +0000)]
[project @ 2005-07-25 14:01:42 by simonmar]
catching up with GC tweaks.

18 years ago[project @ 2005-07-25 14:00:22 by simonmar]
simonmar [Mon, 25 Jul 2005 14:00:22 +0000 (14:00 +0000)]
[project @ 2005-07-25 14:00:22 by simonmar]
catching up with GC tweaks

18 years ago[project @ 2005-07-25 13:59:09 by simonmar]
simonmar [Mon, 25 Jul 2005 13:59:10 +0000 (13:59 +0000)]
[project @ 2005-07-25 13:59:09 by simonmar]
Tweaks to the GC to improve perforrmance.  Might be as much as 10% on
some programs.

18 years ago[project @ 2005-07-25 11:43:09 by simonpj]
simonpj [Mon, 25 Jul 2005 11:43:09 +0000 (11:43 +0000)]
[project @ 2005-07-25 11:43:09 by simonpj]
Print occ info in Core

18 years ago[project @ 2005-07-25 11:42:24 by simonpj]
simonpj [Mon, 25 Jul 2005 11:42:25 +0000 (11:42 +0000)]
[project @ 2005-07-25 11:42:24 by simonpj]
Comments

18 years ago[project @ 2005-07-25 11:29:36 by simonpj]
simonpj [Mon, 25 Jul 2005 11:29:36 +0000 (11:29 +0000)]
[project @ 2005-07-25 11:29:36 by simonpj]
Wibble to dup-sig reporting

18 years ago[project @ 2005-07-25 11:24:24 by simonpj]
simonpj [Mon, 25 Jul 2005 11:24:24 +0000 (11:24 +0000)]
[project @ 2005-07-25 11:24:24 by simonpj]
Better error recovery for type signatures

18 years ago[project @ 2005-07-25 11:11:36 by simonpj]
simonpj [Mon, 25 Jul 2005 11:11:36 +0000 (11:11 +0000)]
[project @ 2005-07-25 11:11:36 by simonpj]
Wibble to TH docs; MERGE to STABLE

18 years ago[project @ 2005-07-25 11:10:33 by simonpj]
simonpj [Mon, 25 Jul 2005 11:10:34 +0000 (11:10 +0000)]
[project @ 2005-07-25 11:10:33 by simonpj]
Wibbles to the big HsBinds reorg

18 years ago[project @ 2005-07-25 11:10:01 by simonpj]
simonpj [Mon, 25 Jul 2005 11:10:01 +0000 (11:10 +0000)]
[project @ 2005-07-25 11:10:01 by simonpj]
Comments

18 years ago[project @ 2005-07-25 11:08:26 by simonpj]
simonpj [Mon, 25 Jul 2005 11:08:27 +0000 (11:08 +0000)]
[project @ 2005-07-25 11:08:26 by simonpj]
MERGE TO STABLE if poss

Make the "root main" Id :Main.main into an *implicit* Id, whose parent is
Main.main.  What that means is that the "root main" Id won't be emitted
into the interface file.  Which has not been causing a problem in practice
but is clearly wrong -- there were two 'main's in the interface file.

18 years ago[project @ 2005-07-22 14:00:34 by simonpj]
simonpj [Fri, 22 Jul 2005 14:00:35 +0000 (14:00 +0000)]
[project @ 2005-07-22 14:00:34 by simonpj]
MERGE TO STABLE

Fix a long-standing bug in dependency tracking.
If you have

import M( x )

then you must recompile if M's export list changes, because it might
no longer export x.  Until now we have only done that if the import was

import M

I can't think why this bug has lasted so long.  Thanks to Ian Lynagh
for pointing it out.

18 years ago[project @ 2005-07-22 13:58:46 by simonpj]
simonpj [Fri, 22 Jul 2005 13:58:46 +0000 (13:58 +0000)]
[project @ 2005-07-22 13:58:46 by simonpj]
Do refined dependency analysis in typechecking only with -fglasgow-exts

18 years ago[project @ 2005-07-22 13:58:17 by simonpj]
simonpj [Fri, 22 Jul 2005 13:58:17 +0000 (13:58 +0000)]
[project @ 2005-07-22 13:58:17 by simonpj]
Import trimming

18 years ago[project @ 2005-07-22 10:05:11 by simonpj]
simonpj [Fri, 22 Jul 2005 10:05:11 +0000 (10:05 +0000)]
[project @ 2005-07-22 10:05:11 by simonpj]
Document refined dependency analysis

18 years ago[project @ 2005-07-22 08:57:58 by simonpj]
simonpj [Fri, 22 Jul 2005 08:57:58 +0000 (08:57 +0000)]
[project @ 2005-07-22 08:57:58 by simonpj]
Docs on SPECIALISE pragma

18 years ago[project @ 2005-07-22 08:44:43 by simonpj]
simonpj [Fri, 22 Jul 2005 08:44:43 +0000 (08:44 +0000)]
[project @ 2005-07-22 08:44:43 by simonpj]
Wibble to SPECIALISE fix

18 years ago[project @ 2005-07-21 14:46:04 by simonmar]
simonmar [Thu, 21 Jul 2005 14:46:04 +0000 (14:46 +0000)]
[project @ 2005-07-21 14:46:04 by simonmar]
Fix CPP symbols

18 years ago[project @ 2005-07-21 11:05:26 by simonpj]
simonpj [Thu, 21 Jul 2005 11:05:27 +0000 (11:05 +0000)]
[project @ 2005-07-21 11:05:26 by simonpj]
Arrange that a 'deriving' clause works for a GADT-syntax
data type delaration, provided it declares a Haskell-98-style
data type (i.e. no existentials or GADT stuff).

This just allows you to use a different syntax for data type
declarations without losing 'deriving'. A couple of people requested
this, and it's really easy to do.

18 years ago[project @ 2005-07-21 10:46:12 by simonmar]
simonmar [Thu, 21 Jul 2005 10:46:13 +0000 (10:46 +0000)]
[project @ 2005-07-21 10:46:12 by simonmar]
Sparc updates from Peter A Jonsson <pj at ludd.ltu.se>

18 years ago[project @ 2005-07-21 09:57:23 by simonmar]
simonmar [Thu, 21 Jul 2005 09:57:23 +0000 (09:57 +0000)]
[project @ 2005-07-21 09:57:23 by simonmar]
Remove -fnumbers-strict; it doesn't exist any more

18 years ago[project @ 2005-07-21 09:56:26 by simonmar]
simonmar [Thu, 21 Jul 2005 09:56:26 +0000 (09:56 +0000)]
[project @ 2005-07-21 09:56:26 by simonmar]
Update notes on Perl

18 years ago[project @ 2005-07-21 09:27:34 by simonmar]
simonmar [Thu, 21 Jul 2005 09:27:34 +0000 (09:27 +0000)]
[project @ 2005-07-21 09:27:34 by simonmar]
Require Perl >= 5.6

18 years ago[project @ 2005-07-21 08:41:23 by panne]
panne [Thu, 21 Jul 2005 08:41:23 +0000 (08:41 +0000)]
[project @ 2005-07-21 08:41:23 by panne]
compMan is dead, Jim...

18 years ago[project @ 2005-07-19 22:55:10 by simonpj]
simonpj [Tue, 19 Jul 2005 22:55:10 +0000 (22:55 +0000)]
[project @ 2005-07-19 22:55:10 by simonpj]
remove RnSource.lhs-boot and add RnExpr.lhs-boot

18 years ago[project @ 2005-07-19 22:53:37 by simonpj]
simonpj [Tue, 19 Jul 2005 22:53:37 +0000 (22:53 +0000)]
[project @ 2005-07-19 22:53:37 by simonpj]
Wibble

18 years ago[project @ 2005-07-19 16:44:50 by simonpj]
simonpj [Tue, 19 Jul 2005 16:45:02 +0000 (16:45 +0000)]
[project @ 2005-07-19 16:44:50 by simonpj]
WARNING: this is a big commit.  You might want
to wait a few days before updating, in case I've
broken something.

However, if any of the changes are what you wanted,
please check it out and test!

This commit does three main things:

1. A re-organisation of the way that GHC handles bindings in HsSyn.
   This has been a bit of a mess for quite a while.  The key new
   types are

-- Bindings for a let or where clause
data HsLocalBinds id
  = HsValBinds (HsValBinds id)
  | HsIPBinds  (HsIPBinds id)
  | EmptyLocalBinds

-- Value bindings (not implicit parameters)
data HsValBinds id
  = ValBindsIn  -- Before typechecking
(LHsBinds id) [LSig id] -- Not dependency analysed
-- Recursive by default

  | ValBindsOut -- After typechecking
[(RecFlag, LHsBinds id)]-- Dependency analysed

2. Implement Mark Jones's idea of increasing polymoprhism
   by using type signatures to cut the strongly-connected components
   of a recursive group.  As a consequence, GHC no longer insists
   on the contexts of the type signatures of a recursive group
   being identical.

   This drove a significant change: the renamer no longer does dependency
   analysis.  Instead, it attaches a free-variable set to each binding,
   so that the type checker can do the dep anal.  Reason: the typechecker
   needs to do *two* analyses:
one to find the true mutually-recursive groups
(which we need so we can build the right CoreSyn)
one to find the groups in which to typecheck, taking
account of type signatures

3. Implement non-ground SPECIALISE pragmas, as promised, and as
   requested by Remi and Ross.  Certainly, this should fix the
   current problem with GHC, namely that if you have
g :: Eq a => a -> b -> b
   then you can now specialise thus
SPECIALISE g :: Int -> b -> b
    (This didn't use to work.)

   However, it goes further than that.  For example:
f :: (Eq a, Ix b) => a -> b -> b
   then you can make a partial specialisation
SPECIALISE f :: (Eq a) => a -> Int -> Int

    In principle, you can specialise f to *any* type that is
    "less polymorphic" (in the sense of subsumption) than f's
    actual type.  Such as
SPECIALISE f :: Eq a => [a] -> Int -> Int
    But I haven't tested that.

    I implemented this by doing the specialisation in the typechecker
    and desugarer, rather than leaving around the strange SpecPragmaIds,
    for the specialiser to find.  Indeed, SpecPragmaIds have vanished
    altogether (hooray).

    Pragmas in general are handled more tidily.  There's a new
    data type HsBinds.Prag, which lives in an AbsBinds, and carries
    pragma info from the typechecker to the desugarer.

Smaller things

- The loop in the renamer goes via RnExpr, instead of RnSource.
  (That makes it more like the type checker.)

- I fixed the thing that was causing 'check_tc' warnings to be
  emitted.

18 years ago[project @ 2005-07-18 11:47:08 by simonpj]
simonpj [Mon, 18 Jul 2005 11:47:08 +0000 (11:47 +0000)]
[project @ 2005-07-18 11:47:08 by simonpj]
Fix TH_reifyType2 test

18 years ago[project @ 2005-07-18 11:46:32 by simonpj]
simonpj [Mon, 18 Jul 2005 11:46:32 +0000 (11:46 +0000)]
[project @ 2005-07-18 11:46:32 by simonpj]
Comments

18 years ago[project @ 2005-07-15 02:00:15 by wolfgang]
wolfgang [Fri, 15 Jul 2005 02:00:15 +0000 (02:00 +0000)]
[project @ 2005-07-15 02:00:15 by wolfgang]
Mac OS X/PowerPC: Make GHCi deal with the additional statically linked
symbols from libSystemStub.a on Tiger (printf$LDBLStub and friends).

MERGE TO STABLE

18 years ago[project @ 2005-07-14 15:14:33 by simonmar]
simonmar [Thu, 14 Jul 2005 15:14:33 +0000 (15:14 +0000)]
[project @ 2005-07-14 15:14:33 by simonmar]
- -package P picks the latest version of P, instead of complaining
    if P is ambiguous.

  - -hide-package P hides all versions of P, instead of complaining
    if P is ambiguous.

18 years ago[project @ 2005-07-14 15:12:20 by simonmar]
simonmar [Thu, 14 Jul 2005 15:12:20 +0000 (15:12 +0000)]
[project @ 2005-07-14 15:12:20 by simonmar]
- -package P hides all other versions of P (this was advertised
    in the documentation, but wasn't actually implemented in 6.4)

  - if multiple packages with the same name are still exposed after
    the flags have been processed, then all except the latest version
    are hidden.

18 years ago[project @ 2005-07-14 10:38:03 by simonmar]
simonmar [Thu, 14 Jul 2005 10:38:03 +0000 (10:38 +0000)]
[project @ 2005-07-14 10:38:03 by simonmar]
Fix mulMayOflo() on 64-bit archs.  This fixes the arith003 failures on x86_64.

18 years ago[project @ 2005-07-13 13:08:05 by simonmar]
simonmar [Wed, 13 Jul 2005 13:08:05 +0000 (13:08 +0000)]
[project @ 2005-07-13 13:08:05 by simonmar]
#include <windows.h>

18 years ago[project @ 2005-07-13 12:27:55 by simonmar]
simonmar [Wed, 13 Jul 2005 12:27:55 +0000 (12:27 +0000)]
[project @ 2005-07-13 12:27:55 by simonmar]
Handle TREC_CHUNK in update_fwd_large

18 years ago[project @ 2005-07-13 10:16:11 by simonpj]
simonpj [Wed, 13 Jul 2005 10:16:11 +0000 (10:16 +0000)]
[project @ 2005-07-13 10:16:11 by simonpj]
MERGE to STABLE

Switch the order of equations generated by FunDeps.improve,
so that the error messages are more perspicuous.

This fixes SourceForge [ ghc-Bugs-1234239 ]
  "Bad location for violation of functional dependency"

tcfail143 tests.

18 years ago[project @ 2005-07-12 17:07:56 by panne]
panne [Tue, 12 Jul 2005 17:07:56 +0000 (17:07 +0000)]
[project @ 2005-07-12 17:07:56 by panne]
Add casts to silence warnings when using Solaris' simple-minded isupper() macro.

18 years ago[project @ 2005-07-12 16:30:01 by simonpj]
simonpj [Tue, 12 Jul 2005 16:30:01 +0000 (16:30 +0000)]
[project @ 2005-07-12 16:30:01 by simonpj]
Try MERGE to STABLE

When TH splices in code, it was previously decorated with noLoc.  If
there were any type errors in it, we got a very unhelpful message.

Now we propagate the splice location everywhere into the spliced code.
The location isn't very exact, because it refers to the splice site,
but it's better than before.

18 years ago[project @ 2005-07-12 14:50:56 by simonpj]
simonpj [Tue, 12 Jul 2005 14:50:56 +0000 (14:50 +0000)]
[project @ 2005-07-12 14:50:56 by simonpj]
Add an extra note about defaulting in GHCi

18 years ago[project @ 2005-07-12 14:50:10 by simonpj]
simonpj [Tue, 12 Jul 2005 14:50:10 +0000 (14:50 +0000)]
[project @ 2005-07-12 14:50:10 by simonpj]
An earlier commit, liberalising the defaulting rules for ghci,
messed up the handling of defaulting at the top level.  This
commit fixes it.

The current story is that if there's an ambiguous top-level
multi-parameter constraint (C a b), then a,b won't be defaulted,
regardless of how a,b are used otherwise.  A type variable is
defaulted only if it's constrained by single-parameter type classes,
even in the more-liberal GHCi.

tcfail142 tests this case.

18 years ago[project @ 2005-07-12 14:41:00 by simonmar]
simonmar [Tue, 12 Jul 2005 14:41:00 +0000 (14:41 +0000)]
[project @ 2005-07-12 14:41:00 by simonmar]
Give a more helpful error message on platforms for which FFI support
isn't implemented in GHCi (namely x86_64 at the moment).

18 years ago[project @ 2005-07-12 14:34:29 by simonmar]
simonmar [Tue, 12 Jul 2005 14:34:29 +0000 (14:34 +0000)]
[project @ 2005-07-12 14:34:29 by simonmar]
Fix cut-n-pasto in previous commit

18 years ago[project @ 2005-07-12 14:23:51 by simonmar]
simonmar [Tue, 12 Jul 2005 14:23:51 +0000 (14:23 +0000)]
[project @ 2005-07-12 14:23:51 by simonmar]
Disable a couple of assertions for the same reason as the previous commit.