simonmar [Fri, 13 May 2005 10:18:35 +0000 (10:18 +0000)]
[project @ 2005-05-13 10:18:35 by simonmar]
Export nameModule
krasimir [Fri, 13 May 2005 10:05:33 +0000 (10:05 +0000)]
[project @ 2005-05-13 10:05:32 by krasimir]
Fixed install-docs
simonmar [Fri, 13 May 2005 09:39:00 +0000 (09:39 +0000)]
[project @ 2005-05-13 09:39:00 by simonmar]
summariseFile: use a cached summary if one is available. Previously
we always preprocessed modules named by filename on each reload.
dons [Fri, 13 May 2005 01:46:20 +0000 (01:46 +0000)]
[project @ 2005-05-13 01:46:20 by dons]
Have SplitObjs=YES by default only on i386, powerpc and sparc.
Lowers the barrier to porting just a little.
simonpj [Thu, 12 May 2005 16:51:03 +0000 (16:51 +0000)]
[project @ 2005-05-12 16:51:03 by simonpj]
Fix bad interaction between operators and higher-rank types
Fixes Source bug #1200592 [GHC fails to pass dictionary in a rank-2 situation]
Merge to STABLE
simonmar [Thu, 12 May 2005 16:27:00 +0000 (16:27 +0000)]
[project @ 2005-05-12 16:27:00 by simonmar]
A start on a commentary section about the threaded/SMP runtime. This
will replace the old section which is a bit out of date now.
chak [Thu, 12 May 2005 12:55:32 +0000 (12:55 +0000)]
[project @ 2005-05-12 12:55:32 by chak]
Added a new section that describes GHC's hybrid type representation
`TypeRep.Type' and it's friends. This sufficiently subtle and GHC-specific
that it warrants extra treatment outside of the section on type checking.
stolz [Thu, 12 May 2005 11:36:50 +0000 (11:36 +0000)]
[project @ 2005-05-12 11:36:50 by stolz]
C89ify recent change
simonmar [Thu, 12 May 2005 11:11:58 +0000 (11:11 +0000)]
[project @ 2005-05-12 11:11:58 by simonmar]
SMP: we need to assign the result of resumeThread to BaseReg, because
we might now have a new Capability. (this was an interesting bug to find...)
simonmar [Thu, 12 May 2005 10:32:40 +0000 (10:32 +0000)]
[project @ 2005-05-12 10:32:40 by simonmar]
Declare checkNurserySanity()
simonmar [Thu, 12 May 2005 10:03:42 +0000 (10:03 +0000)]
[project @ 2005-05-12 10:03:42 by simonmar]
Fix more bugginess in allocateLocal().
simonmar [Wed, 11 May 2005 12:52:05 +0000 (12:52 +0000)]
[project @ 2005-05-11 12:52:05 by simonmar]
Another large block fix.
simonmar [Wed, 11 May 2005 12:45:55 +0000 (12:45 +0000)]
[project @ 2005-05-11 12:45:55 by simonmar]
allocating a large block: bump the block count on the nursery step,
rather than the global alloc_blocks counter. Also, change the
heap-full check to be "nursery full" rather than
alloc_blocks>=alloc_blocks_lim.
simonmar [Wed, 11 May 2005 12:44:26 +0000 (12:44 +0000)]
[project @ 2005-05-11 12:44:26 by simonmar]
allocateLocal(): bump the block count on the step, not the global
alloc_blocks count.
simonmar [Wed, 11 May 2005 12:43:48 +0000 (12:43 +0000)]
[project @ 2005-05-11 12:43:48 by simonmar]
SMP: add a missing insertHashTable()
simonmar [Wed, 11 May 2005 09:51:50 +0000 (09:51 +0000)]
[project @ 2005-05-11 09:51:50 by simonmar]
restore rev. 1.189, which appears to have been spammed in
rev. 1.190 (my fault, by the looks of it).
simonmar [Wed, 11 May 2005 09:09:03 +0000 (09:09 +0000)]
[project @ 2005-05-11 09:09:03 by simonmar]
Fix double-linking bug in new allocateLocal(), and fix one warning
sof [Wed, 11 May 2005 00:31:11 +0000 (00:31 +0000)]
[project @ 2005-05-11 00:31:11 by sof]
ocResolve_PEi386(): updated comment re: REL32/DISP32 relocations
simonmar [Tue, 10 May 2005 13:25:43 +0000 (13:25 +0000)]
[project @ 2005-05-10 13:25:41 by simonmar]
Two SMP-related changes:
- New storage manager interface:
bdescr *allocateLocal(StgRegTable *reg, nat words)
which allocates from the current thread's nursery (being careful
not to clash with the heap pointer). It can do this without
taking any locks; the lock only has to be taken if a block needs
to be allocated. allocateLocal() is now used instead of allocate()
in a few PrimOps.
This removes locks from most Integer operations, cutting down
the overhead for SMP a bit more.
To make this work, we have to be able to grab the current thread's
Capability out of thin air (i.e. when called from GMP), so the
Capability subsystem needs to keep a hash from thread IDs to
Capabilities.
- Small MVar optimisation: instead of taking the global
storage-manager lock, do our own locking of MVars with a bit of
inline assembly (x86 only for now).
simonmar [Tue, 10 May 2005 10:41:00 +0000 (10:41 +0000)]
[project @ 2005-05-10 10:41:00 by simonmar]
Mangler support for GNU/Hurd.
From: Thomas Schwinge
simonmar [Tue, 10 May 2005 10:35:57 +0000 (10:35 +0000)]
[project @ 2005-05-10 10:35:57 by simonmar]
Add -I options to SRC_CC_OPTS for bootstrapping
From: Thomas Schwinge
simonmar [Tue, 10 May 2005 10:29:49 +0000 (10:29 +0000)]
[project @ 2005-05-10 10:29:49 by simonmar]
Bootstrap fix from GNU/Hurd port
From: Thomas Schwinge
simonmar [Tue, 10 May 2005 10:27:20 +0000 (10:27 +0000)]
[project @ 2005-05-10 10:27:20 by simonmar]
GNU/Hurd platform (from Thomas Schwinge
<schwinge-list-ghc-users@nic-nac-project.de>)
simonmar [Tue, 10 May 2005 10:08:50 +0000 (10:08 +0000)]
[project @ 2005-05-10 10:08:50 by simonmar]
-ignore-package lang if GHC >= 6.3, fixes build breakage if wxHaskell
is installed.
chak [Mon, 9 May 2005 13:25:07 +0000 (13:25 +0000)]
[project @ 2005-05-09 13:25:07 by chak]
More details about type checking.
simonmar [Mon, 9 May 2005 10:18:05 +0000 (10:18 +0000)]
[project @ 2005-05-09 10:18:05 by simonmar]
printAllThreads: handle ThreadRelocated
simonmar [Mon, 9 May 2005 10:10:33 +0000 (10:10 +0000)]
[project @ 2005-05-09 10:10:33 by simonmar]
deleteAllThreads: handle ThreadRelocated
simonmar [Mon, 9 May 2005 09:00:04 +0000 (09:00 +0000)]
[project @ 2005-05-09 09:00:04 by simonmar]
ProjectPatchLevel hack: the STABLE branch versions now look like
6.4.1.
20050508 which confuses the compiler which thinks
ProjectPatchLevel should be an Int.
wolfgang [Sat, 7 May 2005 17:28:05 +0000 (17:28 +0000)]
[project @ 2005-05-07 17:28:05 by wolfgang]
GCC 4.0 Fix: Do not emit lvalue casts for foreign calls.
Note: This fix might break cmm code that directly assigns the result
of a foreign call to a "strange type" register (but we don't do that).
MERGE TO STABLE
josefs [Sat, 7 May 2005 12:17:01 +0000 (12:17 +0000)]
[project @ 2005-05-07 12:17:01 by josefs]
Allow unicode in string and character literals when pretty printing
external core.
simonpj [Fri, 6 May 2005 11:06:14 +0000 (11:06 +0000)]
[project @ 2005-05-06 11:06:14 by simonpj]
Rule overlap message should be only in ifdef DEBUG
sof [Fri, 6 May 2005 00:30:57 +0000 (00:30 +0000)]
[project @ 2005-05-06 00:30:56 by sof]
[mingw only]
Work around bug in win32 Console API which showed up in the GHCi UI:
if the user typed in characters prior to the appearance of the prompt,
the first of these characters always came out as a 'g'. The GHCi UI does
for good reasons one-character reads from 'stdin', which causes the
underlying APIs to become confused. A simple repro case is the following
piece of C code:
/*----------------------*/
#include <stdio.h>
#include <windows.h>
int main()
{
char ch1,ch2;
HANDLE hStdIn = GetStdHandle(STD_INPUT_HANDLE);
DWORD dw;
/* Type in some characters before the prompt appears and be amused.. */
sleep(1000); printf("? ");
ReadConsoleA(hStdIn,&ch1,1,&dw,NULL);
ReadConsoleA(hStdIn,&ch2,1,&dw,NULL);
/* or, if you want to use libc:
read(0,&ch1,1); read(0,&ch2,1); */
printf("%c%c\n", ch1,ch2);
return 0;
}
/*----------------------*/
This happens across win32 OSes, and I can't see anything untoward as far
as API usage goes (the GHC IO implementation uses read(), but that
reduces to ReadConsoleA() calls.) People inside the Behemoth might want
to have a closer look at this..
Not much we can do about this except work around the problem by flushing
the input buffer prior to reading from stdin. Not ideal, as type-ahead
is a useful feature. Flushing is handled by GHC.ConsoleHandler.flushConsole
Merge to STABLE.
sof [Thu, 5 May 2005 18:14:27 +0000 (18:14 +0000)]
[project @ 2005-05-05 18:14:27 by sof]
ocResolve_PEi386():
when fixing up REL32 relocations, _add_ displacement to value at the
given offset. The existing value has so far been assumed to be zero
(which we've asserted for), but curiously wxhaskell-0.9.4's wx.o
contains lots of interesting non-zero values. Information / specifications
are awfully thin on the ground as to how to precisely handle these
relocations, but adding rather than overwriting seems to have a
generally healthy effect; unable to crash wxhaskell-0.9.4 with a 6.4 build.
Merge to STABLE.
simonmar [Thu, 5 May 2005 13:17:47 +0000 (13:17 +0000)]
[project @ 2005-05-05 13:17:47 by simonmar]
Some fixes to the blackhole garbage collection strategy. conc049 is a
great test case.
simonpj [Thu, 5 May 2005 13:15:19 +0000 (13:15 +0000)]
[project @ 2005-05-05 13:15:19 by simonpj]
Report instances correctly in GHCi
simonpj [Thu, 5 May 2005 12:39:19 +0000 (12:39 +0000)]
[project @ 2005-05-05 12:39:19 by simonpj]
Only compare hi-boot iface with mother module if there *is* an hi-boot iface
simonpj [Thu, 5 May 2005 12:26:15 +0000 (12:26 +0000)]
[project @ 2005-05-05 12:26:15 by simonpj]
Be a bit more parsimonious about type-error contexts
simonmar [Thu, 5 May 2005 11:35:29 +0000 (11:35 +0000)]
[project @ 2005-05-05 11:35:29 by simonmar]
Treat the blackhole_queue as a weak list: it shouldn't keep its
elements alive, because otherwise we can't detect deadlock using the
GC. Fortunately the fix is quite simple.
simonmar [Thu, 5 May 2005 11:33:10 +0000 (11:33 +0000)]
[project @ 2005-05-05 11:33:10 by simonmar]
AP_STACK fix for SMP
simonmar [Thu, 5 May 2005 11:20:12 +0000 (11:20 +0000)]
[project @ 2005-05-05 11:20:12 by simonmar]
Fix the offsets and macros for AP_STACK closures (was wrong for SMP only)
simonmar [Thu, 5 May 2005 11:19:42 +0000 (11:19 +0000)]
[project @ 2005-05-05 11:19:42 by simonmar]
Sanity fix for SMP
ross [Thu, 5 May 2005 10:52:43 +0000 (10:52 +0000)]
[project @ 2005-05-05 10:52:43 by ross]
Stop the renamer from barfing on arrow notation outside of proc, since
this will be caught by the typechecker (tcfail120).
simonmar [Thu, 5 May 2005 09:40:37 +0000 (09:40 +0000)]
[project @ 2005-05-05 09:40:37 by simonmar]
Make GHC.modInfoPrintUnqualified work for package modules too. Also
refactor a bit: move mkExportEnv from TcRnDriver up to GHC which is
the only use of it.
simonpj [Thu, 5 May 2005 07:43:29 +0000 (07:43 +0000)]
[project @ 2005-05-05 07:43:28 by simonpj]
Make it so that you can deprecate a data constructor.
Previously {-# DEPRECATED T "no" #-} referred only to the type
or class T. Now it refers to the data constructor T as well,
just like in fixity declarations.
There's no way to deprecate the data constructor T without also
deprecating the type T, alas. Same problem in fixity decls.
Main problem is coming up with a suitable concrete syntax to do
so.
We could consider merging this to the STABLE branch.
NB: Sven, the manual fixes are not XML-valideated! I'm at home.
simonpj [Thu, 5 May 2005 07:35:43 +0000 (07:35 +0000)]
[project @ 2005-05-05 07:35:43 by simonpj]
Two small things
a) report duplicate declarations in canonical order
b) report deprecations for all uses (a longstanding bug)
both MERGE TO STABLE
sof [Thu, 5 May 2005 00:58:38 +0000 (00:58 +0000)]
[project @ 2005-05-05 00:58:38 by sof]
[mingw only]
Provide (unsatisfying) workaround for pesky Ctrl-C issue, whereby a
cygwin-based bash will terminate the 'ghci.exe' wrapper without the
wrapper process getting a chance to respond (and shut down its child,
if nothing else.) The result instead being that the child (ghc.exe) ends up
lingering in the background.
To steer users away from such badness, the wrapper checks to see whether
it is running in a *nix-like shell, and if it is, issue a warning that
it would be better to invoke GHCi using the 'ghcii.sh' shell script instead.
Merge to STABLE.
simonmar [Wed, 4 May 2005 16:20:27 +0000 (16:20 +0000)]
[project @ 2005-05-04 16:20:27 by simonmar]
getModuleInfo now does something reasonable for package modules.
simonmar [Wed, 4 May 2005 15:46:39 +0000 (15:46 +0000)]
[project @ 2005-05-04 15:46:39 by simonmar]
Fix instance-matching issue (affects nofib/real/prolog).
simonmar [Wed, 4 May 2005 15:44:59 +0000 (15:44 +0000)]
[project @ 2005-05-04 15:44:59 by simonmar]
Add lookupGlobalName
chak [Wed, 4 May 2005 15:19:37 +0000 (15:19 +0000)]
[project @ 2005-05-04 15:19:37 by chak]
Updated and extended the section about the renamer.
josefs [Wed, 4 May 2005 15:12:14 +0000 (15:12 +0000)]
[project @ 2005-05-04 15:12:14 by josefs]
Make GHC accept external core files with higher rank types.
simonmar [Wed, 4 May 2005 13:06:39 +0000 (13:06 +0000)]
[project @ 2005-05-04 13:06:39 by simonmar]
Fix porting instructions
simonpj [Wed, 4 May 2005 11:23:28 +0000 (11:23 +0000)]
[project @ 2005-05-04 11:23:28 by simonpj]
Further wibbles to unused-import reporting; merge to stable
ross [Wed, 4 May 2005 10:28:08 +0000 (10:28 +0000)]
[project @ 2005-05-04 10:28:07 by ross]
Another go at the handling of -< in arrow notation, continuing and
fixing the changes in
http://www.haskell.org/pipermail/cvs-all/2005-April/040391.html
Now do the same thing in the renamer as we do in the type checker,
i.e. return to the environment of the proc when considering the left
argument of -<.
This is much simpler than the old proc_level stuff, and matches the
type rules more clearly. But there is a change in error messages.
For the input
f :: Int -> Int
f = proc x -> (+x) -< 1
GHC 6.4 says
test.hs:6:
Command-bound variable `x' is not in scope here
Reason: it is used in the left argument of (-<)
In the second argument of `(+)', namely `x'
In the command: (+ x) -< 1
In the definition of `f': f = proc x -> (+ x) -< 1
but now we just get the blunt
test.hs:6:16: Not in scope: `x'
The beauty is all on the inside.
Similarly leakage of existential type variables (arrow1) is detected,
but the error message isn't very helpful.
simonpj [Tue, 3 May 2005 13:41:01 +0000 (13:41 +0000)]
[project @ 2005-05-03 13:41:01 by simonpj]
Check for illegal declarations in hs-boot files
simonpj [Tue, 3 May 2005 13:13:24 +0000 (13:13 +0000)]
[project @ 2005-05-03 13:13:24 by simonpj]
Second stab at the duplicate-import warnings
simonpj [Tue, 3 May 2005 11:10:09 +0000 (11:10 +0000)]
[project @ 2005-05-03 11:10:08 by simonpj]
Improve generation of 'duplicate import' warnings.
This involved changing (actually simplifying) the
definition of RdrName.ImportSpec.
I'm not sure whether this one merits merging or not.
Perhaps worth a try.
simonpj [Tue, 3 May 2005 10:53:01 +0000 (10:53 +0000)]
[project @ 2005-05-03 10:53:00 by simonpj]
Fix the test for duplicate local bindings, so that it works with
Template Haskell. Pre-TH, all the local bindings came into scope
at once, but with TH they come into scope in groups, and we must
check for conflict with existing local bindings.
MERGE TO STABLE
simonmar [Tue, 3 May 2005 10:38:19 +0000 (10:38 +0000)]
[project @ 2005-05-03 10:38:19 by simonmar]
Add a couple more lint tests
simonmar [Tue, 3 May 2005 10:29:19 +0000 (10:29 +0000)]
[project @ 2005-05-03 10:29:19 by simonmar]
MO_S_Conv folding: fold floating-point literals properly
sof [Tue, 3 May 2005 00:42:28 +0000 (00:42 +0000)]
[project @ 2005-05-03 00:42:28 by sof]
permit mingw_* vars to be overridden; merge to STABLE
sof [Tue, 3 May 2005 00:41:15 +0000 (00:41 +0000)]
[project @ 2005-05-03 00:41:15 by sof]
re-use prep-bin-dist-mingw by exec'ing it. Merge to STABLE
simonpj [Mon, 2 May 2005 13:08:39 +0000 (13:08 +0000)]
[project @ 2005-05-02 13:08:38 by simonpj]
In the :i command for ghci, load the interface files for
the home module of every in-scope type or class. That way
we are sure to see all their instance declarations.
MERGE TO STABLE branch
simonpj [Mon, 2 May 2005 12:33:06 +0000 (12:33 +0000)]
[project @ 2005-05-02 12:33:06 by simonpj]
Nuke bogus warnings in deriving; MERGE TO STABLE
wolfgang [Sat, 30 Apr 2005 15:45:58 +0000 (15:45 +0000)]
[project @ 2005-04-30 15:45:58 by wolfgang]
More Mac OS X Tiger / GCC 4.0 fixes.
MERGE TO STABLE
simonpj [Fri, 29 Apr 2005 23:39:13 +0000 (23:39 +0000)]
[project @ 2005-04-29 23:39:12 by simonpj]
Wibbles to new hs-boot instance story
simonpj [Fri, 29 Apr 2005 23:37:10 +0000 (23:37 +0000)]
[project @ 2005-04-29 23:37:10 by simonpj]
Better kind error reporting; MERGE TO STABLE
wolfgang [Fri, 29 Apr 2005 22:15:36 +0000 (22:15 +0000)]
[project @ 2005-04-29 22:15:36 by wolfgang]
Mac OS X (Tiger): Fix the Mangler for (Apple's version of) GCC 4.0
MERGE TO STABLE
sof [Fri, 29 Apr 2005 22:02:46 +0000 (22:02 +0000)]
[project @ 2005-04-29 22:02:46 by sof]
BINDIST_DOC_WAYS: permit variable to be overridden (in a mk/build.mk, perhaps); merge to STABLE
sof [Fri, 29 Apr 2005 21:56:06 +0000 (21:56 +0000)]
[project @ 2005-04-29 21:56:06 by sof]
leave out Java bits in include/ that mingw-3.2 supplies; temporarily disable PDF document generation
sof [Fri, 29 Apr 2005 21:52:38 +0000 (21:52 +0000)]
[project @ 2005-04-29 21:52:38 by sof]
gcc-mingw-3.4.x seems to have renamed .rodata to .rdata; look for either
sof [Fri, 29 Apr 2005 21:02:15 +0000 (21:02 +0000)]
[project @ 2005-04-29 21:02:15 by sof]
'ghcprof' is a perl script, but installed in the bin/ directory. Merge to STABLE
simonpj [Fri, 29 Apr 2005 16:58:19 +0000 (16:58 +0000)]
[project @ 2005-04-29 16:58:19 by simonpj]
The boot dfunid should be a LocalId
simonmar [Fri, 29 Apr 2005 16:18:58 +0000 (16:18 +0000)]
[project @ 2005-04-29 16:18:58 by simonmar]
(from 1.4.6.1 on 6-4-branch)
Fix some incorrect use of int/nat that breaks x86_64
krasimir [Fri, 29 Apr 2005 13:09:28 +0000 (13:09 +0000)]
[project @ 2005-04-29 13:09:27 by krasimir]
Small fixes that adds chm and HxS targets to the build system. The former is used
to build all documentation in HtmlHelp format while the letter uses HtmlHelp2 format.
simonpj [Fri, 29 Apr 2005 11:24:56 +0000 (11:24 +0000)]
[project @ 2005-04-29 11:24:56 by simonpj]
Fix typo causing loop in SpecConstr!
simonpj [Fri, 29 Apr 2005 11:10:42 +0000 (11:10 +0000)]
[project @ 2005-04-29 11:10:42 by simonpj]
XML wibble
simonpj [Fri, 29 Apr 2005 11:08:51 +0000 (11:08 +0000)]
[project @ 2005-04-29 11:08:51 by simonpj]
Document improvements in overlap handling
simonmar [Fri, 29 Apr 2005 08:59:30 +0000 (08:59 +0000)]
[project @ 2005-04-29 08:59:30 by simonmar]
Re-instate support for environment variable expansion and the -D flag.
Now it is done pre-parsing, however.
simonpj [Fri, 29 Apr 2005 08:19:49 +0000 (08:19 +0000)]
[project @ 2005-04-29 08:19:49 by simonpj]
Strip wired-in names from interface files
simonpj [Thu, 28 Apr 2005 23:37:53 +0000 (23:37 +0000)]
[project @ 2005-04-28 23:37:53 by simonpj]
Further stage-2 wibbles
simonpj [Thu, 28 Apr 2005 23:11:45 +0000 (23:11 +0000)]
[project @ 2005-04-28 23:11:45 by simonpj]
Missing import
simonpj [Thu, 28 Apr 2005 23:09:24 +0000 (23:09 +0000)]
[project @ 2005-04-28 23:09:24 by simonpj]
A couple of hs-boot files
simonpj [Thu, 28 Apr 2005 23:00:52 +0000 (23:00 +0000)]
[project @ 2005-04-28 23:00:52 by simonpj]
Further wibbles to the new tidying plumbing
simonmar [Thu, 28 Apr 2005 21:31:45 +0000 (21:31 +0000)]
[project @ 2005-04-28 21:31:45 by simonmar]
StgFunInfoExtra_slow_apply(): convert the slow_apply_offset to a W_
before arithmetic.
simonpj [Thu, 28 Apr 2005 16:05:57 +0000 (16:05 +0000)]
[project @ 2005-04-28 16:05:54 by simonpj]
Re-plumb the connections between TidyPgm and the various
code generators. There's a new type, CgGuts, to mediate this,
which has the happy effect that ModGuts can die earlier.
The non-O route still isn't quite right, because default methods
are being lost. I'm working on it.
simonmar [Thu, 28 Apr 2005 15:44:16 +0000 (15:44 +0000)]
[project @ 2005-04-28 15:44:16 by simonmar]
calcAllocated: fix small mis-calculation in the SMP case
simonmar [Thu, 28 Apr 2005 15:28:09 +0000 (15:28 +0000)]
[project @ 2005-04-28 15:28:05 by simonmar]
Small code-size optimisation: I forgot to add a specialised case for
functions with no argument words (which might happen if the function
takes a void argument, for example).
simonpj [Thu, 28 Apr 2005 13:13:27 +0000 (13:13 +0000)]
[project @ 2005-04-28 13:13:27 by simonpj]
Instance for wired-in tycons wibble
simonpj [Thu, 28 Apr 2005 10:09:51 +0000 (10:09 +0000)]
[project @ 2005-04-28 10:09:41 by simonpj]
This big commit does several things at once (aeroplane hacking)
which change the format of interface files.
So you'll need to recompile your libraries!
1. The "stupid theta" of a newtype declaration
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Retain the "stupid theta" in a newtype declaration.
For some reason this was being discarded, and putting it
back in meant changing TyCon and IfaceSyn slightly.
2. Overlap flags travel with the instance
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Arrange that the ability to support overlap and incoherence
is a property of the *instance declaration* rather than the
module that imports the instance decl. This allows a library
writer to define overlapping instance decls without the
library client having to know.
The implementation is that in an Instance we store the
overlap flag, and preseve that across interface files
3. Nuke the "instnce pool" and "rule pool"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A major tidy-up and simplification of the way that instances
and rules are sucked in from interface files. Up till now
an instance decl has been held in a "pool" until its "gates"
(a set of Names) are in play, when the instance is typechecked
and added to the InstEnv in the ExternalPackageState.
This is complicated and error-prone; it's easy to suck in
too few (and miss an instance) or too many (and thereby be
forced to suck in its type constructors, etc).
Now, as we load an instance from an interface files, we
put it straight in the InstEnv... but the Instance we put in
the InstEnv has some Names (the "rough-match" names) that
can be used on lookup to say "this Instance can't match".
The detailed dfun is only read lazily, and the rough-match
thing meansn it is'nt poked on until it has a chance of
being needed.
This simply continues the successful idea for Ids, whereby
they are loaded straightaway into the TypeEnv, but their
TyThing is a lazy thunk, not poked on until the thing is looked
up.
Just the same idea applies to Rules.
On the way, I made CoreRule and Instance into full-blown records
with lots of info, with the same kind of key status as TyCon or
DataCon or Class. And got rid of IdCoreRule altogether.
It's all much more solid and uniform, but it meant touching
a *lot* of modules.
4. Allow instance decls in hs-boot files
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Allowing instance decls in hs-boot files is jolly useful, becuase
in a big mutually-recursive bunch of data types, you want to give
the instances with the data type declarations. To achieve this
* The hs-boot file makes a provisional name for the dict-fun, something
like $fx9.
* When checking the "mother module", we check that the instance
declarations line up (by type) and generate bindings for the
boot dfuns, such as
$fx9 = $f2
where $f2 is the dfun generated by the mother module
* In doing this I decided that it's cleaner to have DFunIds get their
final External Name at birth. To do that they need a stable OccName,
so I have an integer-valued dfun-name-supply in the TcM monad.
That keeps it simple.
This feature is hardly tested yet.
5. Tidy up tidying, and Iface file generation
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
main/TidyPgm now has two entry points:
simpleTidyPgm is for hi-boot files, when typechecking only
(not yet implemented), and potentially when compiling without -O.
It ignores the bindings, and generates a nice small TypeEnv.
optTidyPgm is the normal case: compiling with -O. It generates a
TypeEnv rich in IdInfo
MkIface.mkIface now only generates a ModIface. A separate
procedure, MkIface.writeIfaceFile, writes the file out to disk.
simonmar [Thu, 28 Apr 2005 09:46:25 +0000 (09:46 +0000)]
[project @ 2005-04-28 09:46:25 by simonmar]
Run each nofib program multiple times, tunable by the $(NoFibRuns)
variable. nofib-analyse already knows how to average the times from
multiple runs.
sof [Wed, 27 Apr 2005 17:13:13 +0000 (17:13 +0000)]
[project @ 2005-04-27 17:13:13 by sof]
comment wibble; switch from Italian to English spelling of 'compatible'
simonmar [Wed, 27 Apr 2005 14:37:26 +0000 (14:37 +0000)]
[project @ 2005-04-27 14:37:26 by simonmar]
When using -H<size> in SMP mode, divide the total nursery size amongst
the various nurseries. -H<size> now does something reasonable with
SMP.
simonmar [Wed, 27 Apr 2005 14:25:18 +0000 (14:25 +0000)]
[project @ 2005-04-27 14:25:17 by simonmar]
Hold the sm_mutex around access to the mutable list.
The SMP RTS now seems quite stable, I've run my simple test program
with 64 threads without crashes.
simonmar [Wed, 27 Apr 2005 14:09:43 +0000 (14:09 +0000)]
[project @ 2005-04-27 14:09:43 by simonmar]
fprintf(stderr,..) --> debugBelch(...)
simonmar [Wed, 27 Apr 2005 12:54:45 +0000 (12:54 +0000)]
[project @ 2005-04-27 12:54:45 by simonmar]
Some extra sanity checking
simonmar [Wed, 27 Apr 2005 12:53:35 +0000 (12:53 +0000)]
[project @ 2005-04-27 12:53:35 by simonmar]
initCapability: initialise the rInHaskell field (found by Valgrind)
simonmar [Wed, 27 Apr 2005 12:52:52 +0000 (12:52 +0000)]
[project @ 2005-04-27 12:52:52 by simonmar]
expandTaskTable: we need to update the hash table too
(found by: Valgrind :-)
initTaskManager: take into account -N flag when sizing the initial
task table.
simonmar [Wed, 27 Apr 2005 11:31:22 +0000 (11:31 +0000)]
[project @ 2005-04-27 11:31:22 by simonmar]
i386 wibble
simonmar [Wed, 27 Apr 2005 11:15:16 +0000 (11:15 +0000)]
[project @ 2005-04-27 11:15:15 by simonmar]
Support for returning the renamed syntax from checkModule (untested).